87 lines
2.3 KiB
TypeScript
Executable File
87 lines
2.3 KiB
TypeScript
Executable File
import type { Metadata } from "next";
|
|
import { Roboto } from "next/font/google";
|
|
import "./globals.css";
|
|
import {
|
|
BookOpenIcon,
|
|
CircleStackIcon,
|
|
Cog8ToothIcon,
|
|
PuzzlePieceIcon,
|
|
QuestionMarkCircleIcon,
|
|
} from "@heroicons/react/24/solid";
|
|
import Link from "next/link";
|
|
import { DevToolboxContextProvider } from "@/components/devtools/context";
|
|
|
|
const roboto = Roboto({ subsets: ["latin"], weight: "400" });
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Tabletop Commander",
|
|
description: "Rules and tools for tabletop games!",
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const navItems = [
|
|
{
|
|
to: "/game-systems",
|
|
icon: PuzzlePieceIcon,
|
|
text: "Game Systems",
|
|
},
|
|
{
|
|
to: "/schemas",
|
|
icon: CircleStackIcon,
|
|
text: "Schemas",
|
|
},
|
|
{
|
|
to: "/publications",
|
|
icon: BookOpenIcon,
|
|
text: "Publications",
|
|
},
|
|
{
|
|
to: "/settings",
|
|
icon: Cog8ToothIcon,
|
|
text: "Settings",
|
|
},
|
|
{
|
|
to: "/help",
|
|
icon: QuestionMarkCircleIcon,
|
|
text: "How do?",
|
|
},
|
|
];
|
|
|
|
return (
|
|
<html lang="en">
|
|
<body className={roboto.className + " flex min-h-[100vh]"}>
|
|
<nav className="h-[100vh] sticky top-0 left-0 bottom-0 p-8 rounded-r-3xl dark:bg-mixed-300 bg-primary-400 w-max shadow-2xl">
|
|
<h1 className="text-lg font-bold pb-6 border-b dark:border-dark-500 border-primary-600">
|
|
<Link href="/">Tabletop Commander</Link>
|
|
</h1>
|
|
<ul className="my-6 flex flex-col gap-6">
|
|
{navItems.map((n) => (
|
|
<li key={"nav-item" + n.text}>
|
|
<Link
|
|
href={n.to}
|
|
className="flex items-center gap-2 group hover:text-purple-300 transition-colors"
|
|
>
|
|
<n.icon className="w-6 h-6 group-hover:fill-purple-300 transition-colors" />
|
|
{n.text}
|
|
</Link>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</nav>
|
|
<DevToolboxContextProvider
|
|
isDev={process.env.NODE_ENV !== "production"}
|
|
>
|
|
<main className="p-8 w-full overflow-visible">
|
|
{children}
|
|
</main>
|
|
</DevToolboxContextProvider>
|
|
<div id="root-portal"></div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|