ls-deno/components/Page.tsx
2022-10-01 14:03:15 -05:00

29 lines
978 B
TypeScript

import { JSX } from "preact";
const NAV_ITEM_CLASSES = "flex justify-center items-center px-4 py-2";
const HEADER_CLASSES = "bg-gray-200 dark:bg-gray-800";
export function Page(props: JSX.HTMLAttributes<HTMLDivElement>) {
return (
<div class="relative min-h-screen flex flex-col">
<header class="flex justify-start items-center">
<nav class={`flex w-full drop-shadow-md ${HEADER_CLASSES}`}>
<a href="/" class={`${NAV_ITEM_CLASSES} text-black dark:text-white`}>
<h1 class="text-2xl">LyricScreen</h1>
</a>
<a href="/note" class={NAV_ITEM_CLASSES}>Notes</a>
<a href="/register" class={NAV_ITEM_CLASSES}>Register</a>
<a href="/login" class={NAV_ITEM_CLASSES}>Login</a>
</nav>
</header>
<main class="p-2">
{props.children}
</main>
<footer class={`p-2 w-full mt-auto ${HEADER_CLASSES}`}>
"It's a bit much, really..."
</footer>
</div>
);
}