Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
m1k1o
GitHub Repository: m1k1o/neko
Path: blob/master/webpage/src/pages/index.tsx
1007 views
1
// This is handler for old links that were used in v2.
2
// They were used only as hash links, so we need to redirect them to the new links.
3
if (typeof window !== 'undefined' && window.location.hash) {
4
let hash = window.location.hash.substring(1);
5
hash = hash.replace('?id=', '#');
6
if (/^[a-z0-9\-#\/]+$/.test(hash)) {
7
// if id starts with known path
8
if (hash.startsWith('/getting-started')) {
9
// remove /getting-started
10
hash = hash.replace('/getting-started', '');
11
// add /docs/v2
12
window.location.href = '/docs/v2' + hash;
13
}
14
}
15
}
16
17
import type {ReactNode} from 'react';
18
import clsx from 'clsx';
19
import Link from '@docusaurus/Link';
20
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
21
import Layout from '@theme/Layout';
22
import HomepageUseCases from '@site/src/components/HomepageUseCases';
23
import HomepageShowcase from '@site/src/components/HomepageShowcase';
24
import HomepageFeatures from '@site/src/components/HomepageFeatures';
25
import Heading from '@theme/Heading';
26
27
import styles from './index.module.css';
28
29
function HomepageHeader() {
30
const {siteConfig} = useDocusaurusContext();
31
return (
32
<header className={clsx('hero hero--primary', styles.heroBanner)}>
33
<div className="container">
34
<Heading as="h1" className="hero__title">
35
<img
36
alt="n.eko"
37
className={styles.heroLogo}
38
src="img/logo.png"
39
width="450"
40
/>
41
</Heading>
42
<p className="hero__subtitle">{siteConfig.tagline}</p>
43
<div className={styles.buttons}>
44
<Link
45
className="button button--secondary button--lg"
46
to="/docs/v3/quick-start">
47
Get started
48
</Link>
49
<span className={styles.indexCtasGitHubButtonWrapper}>
50
<iframe
51
className={styles.indexCtasGitHubButton}
52
src="https://ghbtns.com/github-btn.html?user=m1k1o&amp;repo=neko&amp;type=star&amp;count=true&amp;size=large"
53
width={160}
54
height={30}
55
title="GitHub Stars"
56
/>
57
</span>
58
</div>
59
</div>
60
</header>
61
);
62
}
63
64
export default function Home(): ReactNode {
65
const {siteConfig} = useDocusaurusContext();
66
return (
67
<Layout
68
description={siteConfig.tagline}>
69
<HomepageHeader />
70
<main>
71
<section className={styles.description}>
72
<div className="container">
73
<p className="text--center">
74
Welcome to Neko, a self-hosted virtual browser that runs in Docker and uses WebRTC technology. Neko allows you to <strong>run a fully-functional browser in a virtual environment</strong>, providing <strong>secure and private internet access</strong> from anywhere. It's perfect for developers, privacy-conscious users, and anyone needing a <strong>virtual browser</strong>.
75
</p>
76
</div>
77
</section>
78
<HomepageUseCases />
79
<HomepageShowcase />
80
<HomepageFeatures />
81
</main>
82
</Layout>
83
);
84
}
85
86