| 1 | import type { Metadata, Viewport } from "next"; |
| 2 | import { Archivo, JetBrains_Mono, Fraunces } from "next/font/google"; |
| 3 | import "./globals.css"; |
| 4 | import { SiteHeader } from "@/components/site-header"; |
| 5 | import { SiteFooter } from "@/components/site-footer"; |
| 6 | |
| 7 | |
| 8 | const archivo = Archivo({ |
| 9 | subsets: ["latin"], |
| 10 | weight: ["500", "600", "700", "800", "900"], |
| 11 | variable: "--font-display", |
| 12 | display: "swap", |
| 13 | }); |
| 14 | |
| 15 | const jetbrains = JetBrains_Mono({ |
| 16 | subsets: ["latin"], |
| 17 | weight: ["400", "500", "600", "700"], |
| 18 | variable: "--font-mono", |
| 19 | display: "swap", |
| 20 | }); |
| 21 | |
| 22 | const fraunces = Fraunces({ |
| 23 | subsets: ["latin"], |
| 24 | weight: ["400", "500"], |
| 25 | style: ["normal", "italic"], |
| 26 | variable: "--font-prose", |
| 27 | display: "swap", |
| 28 | }); |
| 29 | |
| 30 | export const metadata: Metadata = { |
| 31 | title: { |
| 32 | default: "Docket - what the government did this week", |
| 33 | template: "%s · Docket", |
| 34 | }, |
| 35 | description: |
| 36 | "Bills, votes, and dollars from official US records. Plain English, every fact sourced. Zero spin.", |
| 37 | applicationName: "Docket", |
| 38 | authors: [{ name: "Docket" }], |
| 39 | icons: { |
| 40 | icon: "/favicon.svg", |
| 41 | apple: "/apple-touch-icon.png", |
| 42 | }, |
| 43 | }; |
| 44 | |
| 45 | export const viewport: Viewport = { |
| 46 | themeColor: "#0B0C0E", |
| 47 | width: "device-width", |
| 48 | initialScale: 1, |
| 49 | }; |
| 50 | |
| 51 | export default function RootLayout({ |
| 52 | children, |
| 53 | }: { |
| 54 | children: React.ReactNode; |
| 55 | }) { |
| 56 | return ( |
| 57 | <html |
| 58 | lang="en" |
| 59 | className={`${archivo.variable} ${jetbrains.variable} ${fraunces.variable}`} |
| 60 | suppressHydrationWarning |
| 61 | > |
| 62 | <head> |
| 63 | { |
| 64 | } |
| 65 | <script |
| 66 | dangerouslySetInnerHTML={{ |
| 67 | __html: `(function(){try{var s=localStorage.getItem('docket-display');var m=(s==='light')?'light':'dark';var c=document.documentElement.classList;c.remove('dark','light','plain');if(m!=='dark')c.add(m);document.documentElement.dataset.display=m;}catch(e){}})();`, |
| 68 | }} |
| 69 | /> |
| 70 | </head> |
| 71 | <body className="min-h-dvh bg-ink text-paper antialiased"> |
| 72 | <a |
| 73 | href="#main" |
| 74 | className="skip-link focus-ring label" |
| 75 | > |
| 76 | Skip to content |
| 77 | </a> |
| 78 | <div className="relative flex min-h-dvh flex-col"> |
| 79 | <SiteHeader /> |
| 80 | <main id="main" className="flex-1"> |
| 81 | {children} |
| 82 | </main> |
| 83 | <SiteFooter /> |
| 84 | </div> |
| 85 | </body> |
| 86 | </html> |
| 87 | ); |
| 88 | } |