memorium/routes/_layout.tsx

35 lines
1.0 KiB
TypeScript
Raw Permalink Normal View History

import { PageProps } from "$fresh/server.ts";
2023-09-08 13:33:29 +02:00
import { resources } from "@lib/resources.ts";
2025-01-20 23:37:03 +01:00
import { Link } from "@islands/Link.tsx";
2023-09-08 13:33:29 +02:00
import { Emoji } from "@components/Emoji.tsx";
export default function MyLayout({ Component }: PageProps) {
2023-09-08 13:33:29 +02:00
return (
<div
class="md:grid mx-auto"
style={{ gridTemplateColumns: "200px 1fr", maxWidth: "1024px" }}
>
<aside class="p-4 hidden md:block">
2023-09-08 13:33:29 +02:00
<nav class="min-h-fit rounded-3xl p-3 grid gap-3 fixed t-0">
{Object.values(resources).map((m) => {
return (
2025-01-20 23:37:03 +01:00
<Link
2023-09-08 13:33:29 +02:00
href={m.link}
2025-01-20 23:37:03 +01:00
class="flex items-center gap-2 text-white data-[current]:bg-white data-[current]:text-black p-3 text-xl w-full rounded-2xl"
2023-09-08 13:33:29 +02:00
>
2025-01-20 23:37:03 +01:00
<Emoji class="w-6 h-6" name={m.emoji} /> {m.name}
</Link>
2023-09-08 13:33:29 +02:00
);
})}
</nav>
</aside>
<main
class="py-5"
style={{ fontFamily: "Work Sans" }}
>
<Component />
2023-09-08 13:33:29 +02:00
</main>
</div>
);
}