dac4d94bfe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbMbJPadPzVwvt9rU9GBNo
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import Head from 'next/head';
|
|
import Link from 'next/link';
|
|
import { useRouter } from 'next/router';
|
|
import { ReactNode } from 'react';
|
|
|
|
const LINKS = [
|
|
{ href: '/', label: 'Overview' },
|
|
{ href: '/papers', label: 'Papers' },
|
|
{ href: '/landscape', label: 'Landscape' },
|
|
{ href: '/contents', label: 'Contents' },
|
|
];
|
|
|
|
export default function Layout({ title, children }: { title?: string; children: ReactNode }) {
|
|
const { pathname } = useRouter();
|
|
return (
|
|
<>
|
|
<Head>
|
|
<title>{title ? `${title} · LLM Survey 2026` : 'LLM Research Survey 2026'}</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
</Head>
|
|
<nav className="nav">
|
|
<Link href="/" className="brand">LLM Survey 2026</Link>
|
|
{LINKS.map((l) => (
|
|
<Link key={l.href} href={l.href} className={(l.href === '/' ? pathname === '/' : pathname.startsWith(l.href)) ? 'active' : ''}>
|
|
{l.label}
|
|
</Link>
|
|
))}
|
|
</nav>
|
|
<main className="wrap">{children}</main>
|
|
</>
|
|
);
|
|
}
|