doordesk-js/frontend/src/root.tsx

69 lines
2.5 KiB
TypeScript
Raw Normal View History

2023-06-16 00:05:37 -04:00
// @refresh reload
import { Suspense } from "solid-js";
import {
useLocation,
A,
Body,
ErrorBoundary,
FileRoutes,
Head,
Html,
Meta,
Routes,
Scripts,
Title,
} from "solid-start";
2023-06-16 20:46:05 -04:00
2023-06-16 00:05:37 -04:00
import "./root.css";
2023-12-16 18:18:44 -05:00
export const DENNIS = "https://dennis.doordesk.net";
2023-06-18 16:01:30 -04:00
2023-06-16 20:46:05 -04:00
2023-06-16 00:05:37 -04:00
export default function Root() {
const location = useLocation();
const active = (path: string) =>
path == location.pathname
2023-06-16 20:46:05 -04:00
? "border-orange-700"
: "border-transparent hover:border-orange-700 duration-300";
2023-06-16 00:05:37 -04:00
return (
2023-06-17 04:15:28 -04:00
<Html lang="en" class="text-orange-50 antialiased font-mono tracking-tighter">
2023-06-16 00:05:37 -04:00
<Head>
<Title>doordesk</Title>
<Meta charset="utf-8" />
<Meta name="viewport" content="width=device-width, initial-scale=1" />
</Head>
2023-06-17 00:12:25 -04:00
<Body class="bg-gradient-to-br from-zinc-900 to-zinc-950 ">
2023-06-16 00:05:37 -04:00
<Suspense>
<ErrorBoundary>
2023-06-17 00:12:25 -04:00
<nav class="bg-gradient-to-b from-zinc-800 to-zinc-900 shadow-lg sticky top-0">
2023-06-16 20:46:05 -04:00
<ul class="container flex items-center p-3">
2023-06-16 00:05:37 -04:00
<li class={`border-b-2} mx-1.5 sm:mx-6`}>
DoorDesk
</li>
<li class={`border-b-2 ${active("/")} mx-1.5 sm:mx-6`}>
<A href="/">Home</A>
</li>
<li class={`border-b-2 ${active("/blog")} mx-1.5 sm:mx-6`}>
<A href="/blog">Blog</A>
</li>
<li class={`border-b-2 ${active("/projects")} mx-1.5 sm:mx-6`}>
<A href="/projects">Projects</A>
</li>
2024-01-14 22:01:25 -05:00
<li class={`border-b-2 ${active("/git")} mx-1.5 sm:mx-6`}>
<A href="https://git.doordesk.net">Git</A>
</li>
2023-06-16 00:05:37 -04:00
</ul>
</nav>
<Routes>
<FileRoutes />
</Routes>
</ErrorBoundary>
</Suspense>
<Scripts />
2023-06-17 04:15:28 -04:00
<p class="text-center hover:rotate-180 duration-200"><A href="https://open.spotify.com/playlist/3JRNw9gpt1w5ptsw8uDeYc?si=8f7e4191113f41f9">:)</A></p><br />
2023-06-16 00:05:37 -04:00
</Body>
</Html>
);
2023-06-16 20:46:05 -04:00
};