frontpage/pages/index.tsx

46 lines
2.0 KiB
TypeScript
Raw Normal View History

2021-12-14 23:45:00 +01:00
import type { NextPage } from "next";
2021-12-17 18:55:00 +01:00
import Head from "next/head";
2021-12-17 20:43:54 +01:00
import Link from "next/link";
2021-12-17 20:55:14 +01:00
import { GithubLogo, InstagramLogo, DiscordLogo, GameController } from "phosphor-react";
2021-12-26 16:51:35 +01:00
import { useRef } from "react";
2021-12-15 18:56:32 +01:00
import REPL from "../components/REPL";
2021-12-16 01:03:54 +01:00
import styles from "../styles/Home.module.css";
2021-11-30 23:48:54 +01:00
const Home: NextPage = () => {
2021-12-26 16:51:35 +01:00
const inputRef = useRef<HTMLInputElement>();
2022-01-05 17:52:20 +01:00
const focusInput = () => {if (inputRef.current) inputRef.current.focus();};
2021-12-26 16:51:35 +01:00
2021-12-17 18:55:00 +01:00
return (<>
<Head>
<title>c0ntroller.de</title>
</Head>
2021-12-16 01:03:54 +01:00
<div className={styles.container}>
2021-12-26 16:41:56 +01:00
<div className={styles.header}>
2021-12-26 16:51:35 +01:00
<span className={styles.spacer} onClick={focusInput}>&nbsp;</span>
2021-12-17 20:43:54 +01:00
<Link href="https://git.c0ntroller.de/c0ntroller/frontpage"><a>Source</a></Link>
<span className={styles.divider}>|</span>
<Link href="https://git.c0ntroller.de/c0ntroller/frontpage/issues/new"><a>Bug?</a></Link>
<span className={styles.divider}>|</span>
2021-12-17 20:55:14 +01:00
<Link href="https://github.com/C0ntroller" passHref><GithubLogo color="var(--repl-color)" className={styles.iconLink} /></Link>
2021-12-17 20:43:54 +01:00
<span className={styles.divider}>|</span>
2021-12-17 20:55:14 +01:00
<Link href="https://www.instagram.com/c0ntroller/" passHref><InstagramLogo color="var(--repl-color)" className={styles.iconLink} /></Link>
2021-12-17 20:43:54 +01:00
<span className={styles.divider}>|</span>
2021-12-26 17:22:06 +01:00
<Link href="https://steamcommunity.com/id/c0ntroller/" passHref><GameController color="var(--repl-color)" className={styles.iconLink} /></Link>
<span className={styles.divider}>|</span>
2021-12-17 20:55:14 +01:00
<Link href="https://discordapp.com/users/224208617820127233" passHref>
2021-12-26 17:22:06 +01:00
<span className={styles.tooltip} style={{cursor: "pointer"}}>
2021-12-17 20:55:14 +01:00
<DiscordLogo color="var(--repl-color)" className={styles.iconLink} />
2021-12-17 20:43:54 +01:00
<span className={styles.tooltiptext}>
C0ntroller_Z#3883
</span>
</span>
2021-12-26 17:22:06 +01:00
</Link><span className={styles.spacer} onClick={focusInput}>&nbsp;</span>
2021-12-17 20:43:54 +01:00
</div>
2021-12-26 16:51:35 +01:00
<REPL inputRef={inputRef} />
2021-12-16 01:03:54 +01:00
</div>
2021-12-17 18:55:00 +01:00
</>);
2021-12-14 23:45:00 +01:00
};
2021-11-30 23:48:54 +01:00
2021-12-14 23:45:00 +01:00
export default Home;