diff --git a/src/app/layout.tsx b/src/app/layout.tsx index aea75b8..45790e5 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,44 +1,38 @@ import type { Metadata } from "next"; -import Link from 'next/link'; -import "./scss/nbn.scss"; +import "@/scss/nbn.scss"; +import NavbarClient from "@/components/Navbar"; export const metadata: Metadata = { - title: "Spectrum Next Registers", - description: "A platform for exploring the Spectrum Next registers", - robots: { index: true, follow: true }, - formatDetection: { email: false, address: false, telephone: false }, + title: "Spectrum Next Explorer", + description: "A platform for exploring the Spectrum Next hardware", + robots: { index: true, follow: true }, + formatDetection: { email: false, address: false, telephone: false }, }; -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { - return ( - - - -
- {children} -
- - - ); -} +const noFlashThemeScript = ` +(function() { + try { + var cookieMatch = document.cookie.match(/(?:^|; )theme=([^;]+)/); + var stored = cookieMatch ? decodeURIComponent(cookieMatch[1]) : null; + var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; + var effective = (stored === 'light' || stored === 'dark') ? stored : (prefersDark ? 'dark' : 'light'); + var el = document.documentElement; + if (el.getAttribute('data-bs-theme') !== effective) { + el.setAttribute('data-bs-theme', effective); + } + } catch(_) {} +})();`; + +export default function RootLayout({ children }: { children: React.ReactNode }) { + return ( + + +