55 lines
2.1 KiB
TypeScript
55 lines
2.1 KiB
TypeScript
import type { Metadata } from 'next';
|
|
import Link from 'next/link';
|
|
import './globals.css';
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'unloze — server stats',
|
|
description: 'Playtime, population and map stats for the unloze server',
|
|
};
|
|
|
|
const NAV_ITEMS = [
|
|
{ href: '/', label: 'Overview' },
|
|
{ href: '/players', label: 'Players' },
|
|
{ href: '/maps', label: 'Maps' },
|
|
{ href: '/countries', label: 'Countries' },
|
|
];
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="en">
|
|
<body>
|
|
<div className="min-h-screen flex flex-col">
|
|
<header className="border-b border-base-border sticky top-0 z-10 bg-base/80 backdrop-blur-md">
|
|
<div className="max-w-6xl mx-auto px-6 py-4 flex items-center justify-between">
|
|
<Link href="/" className="flex items-center gap-2">
|
|
<span className="w-2 h-2 rounded-full bg-accent shadow-[0_0_8px_theme(colors.accent.DEFAULT)]" />
|
|
<span className="font-mono text-sm tracking-widest text-ink uppercase">
|
|
unloze playtime sessions
|
|
</span>
|
|
</Link>
|
|
<nav className="flex gap-6">
|
|
{NAV_ITEMS.map((item) => (
|
|
<Link
|
|
key={item.href}
|
|
href={item.href}
|
|
className="relative text-sm text-ink-muted hover:text-accent transition-colors group py-1"
|
|
>
|
|
{item.label}
|
|
<span className="absolute left-0 -bottom-0.5 h-px w-0 bg-accent transition-all duration-200 group-hover:w-full" />
|
|
</Link>
|
|
))}
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
<main className="flex-1 max-w-6xl w-full mx-auto px-6 py-8">{children}</main>
|
|
<footer className="border-t border-base-border py-4">
|
|
<div className="max-w-6xl mx-auto px-6 text-xs text-ink-faint font-mono">
|
|
unloze playtime stats
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|