import type { Metadata, Viewport } from "next"; import { readFileSync } from "node:fs"; import path from "node:path"; import { Bricolage_Grotesque, Spline_Sans_Mono } from "next/font/google"; import "./globals.css"; import { readEngineInfo } from "@/lib/engine-info"; const engine = readEngineInfo(); // Fonts are fetched once at build time and served from this site, so there is no // request to Google at runtime. Bricolage Grotesque does everything a person // reads, Spline Sans Mono is only ever code and file names. const display = Bricolage_Grotesque({ subsets: ["latin"], variable: "--font-display", axes: ["opsz", "wdth"], display: "swap", }); const mono = Spline_Sans_Mono({ subsets: ["latin"], variable: "--font-code", display: "swap", }); export const metadata: Metadata = { metadataBase: new URL("https://dssl-sable.vercel.app"), title: { default: "DSSL: a style language that tells you what you got wrong", template: "%s | DSSL" }, description: `DSSL is a styling language for the web: design tokens, its own cascade, loud errors and zero specificity wars. The engine is ${engine.gzKb} kB gzipped, with no build step.`, keywords: ["DSSL", "CSS alternative", "style language", "design tokens", "web"], icons: { icon: "/favicon.svg" }, openGraph: { type: "website", siteName: "DSSL", title: "DSSL: a style language that tells you what you got wrong" }, }; export const viewport: Viewport = { width: "device-width", initialScale: 1, }; // The ONLY non-DSSL styling in this app: a pre-paint shim so the very first // frame doesn't flash white before the DSSL engine boots (dark-mode respect). const prePaint = ` html { background: #f2f0f7; } @media (prefers-color-scheme: dark) { html { background: #130f1b; } } `; // v0.3.2, performance: the stylesheets ride INSIDE the HTML. The engine's // auto-boot picks these