SPB Git
1.5 KB · 30 lines tsx
1import type { Metadata, Viewport } from "next";2import "./globals.css";3import { APP_URL, SITE_NAME, SITE_TAGLINE } from "@/lib/env";45export const metadata: Metadata = {6  metadataBase: new URL(APP_URL),7  title: { default: `${SITE_NAME} — ${SITE_TAGLINE}`, template: `%s · ${SITE_NAME}` },8  description: "An independently curated, source-cited encyclopedia of software, AI systems, APIs, data platforms, developer tools and academic tools, with verified links and honest limitations.",9  applicationName: SITE_NAME,10  openGraph: { type: "website", siteName: SITE_NAME, locale: "en_CA" },11  twitter: { card: "summary_large_image" },12  robots: { index: true, follow: true },13  alternates: { canonical: "/" },14};15export const viewport: Viewport = { themeColor: [{ media: "(prefers-color-scheme: light)", color: "#faf8f4" }, { media: "(prefers-color-scheme: dark)", color: "#0f1115" }], width: "device-width", initialScale: 1 };1617const themeScript = `(function(){try{var m=localStorage.getItem('theme');var d=m==='dark'||((!m||m==='system')&&matchMedia('(prefers-color-scheme: dark)').matches);if(d)document.documentElement.classList.add('dark');}catch(e){}})();`;1819export default function RootLayout({ children }: { children: React.ReactNode }) {20  return (21    <html lang="en" suppressHydrationWarning>22      <head><script dangerouslySetInnerHTML={{ __html: themeScript }} /></head>23      <body className="min-h-dvh flex flex-col">24        <a href="#main" className="skip-link">Skip to content</a>25        {children}26      </body>27    </html>28  );29}30
Files · 19c0ff748ee94e0979c734f5fb3afeefc11ee9e1
Menu

Theme