mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 04:27:47 +01:00
next/font/google downloads the faces during next build, so the build failed whenever Google Fonts did not answer. The same files ship in @bitbaum/design-tokens 1.3.1; app/fonts.ts is the next/font/local module its design-tokens-next-fonts command writes. --font-inter and --font-fraunces (400-700, normal and italic), subsets and preloads are what next/font/google produced. The layout's serif const is now fraunces: the export name becomes the family name, and serif is the CSS generic. Only the font module, the layout's font lines and the dependency change. Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 Co-authored-by: Claude <noreply@anthropic.com>
66 lines
2.4 KiB
TypeScript
66 lines
2.4 KiB
TypeScript
import { Header } from '@/components/Header';
|
|
import { Footer } from '@/components/Footer';
|
|
import { Providers } from '@/components/Providers';
|
|
import { site } from '@/lib/site';
|
|
import './globals.css';
|
|
import { Toaster } from 'sonner';
|
|
import { fraunces, sans } from './fonts';
|
|
import Script from 'next/script';
|
|
|
|
// Brand typeface: a serif display (Fraunces) carries the editorial / "real
|
|
// counsel" identity for headings & wordmark; Inter handles UI/body copy.
|
|
// Bound to CSS vars consumed by the @theme block in globals.css (font-sans /
|
|
// font-serif). Named --font-inter/--font-fraunces so the @theme aliases
|
|
// --font-sans/--font-serif can reference them without a circular var().
|
|
// Both ship in @bitbaum/design-tokens; ./fonts is generated from it.
|
|
export const metadata = {
|
|
// Load-bearing: Next resolves the generated og:image against metadataBase.
|
|
// Without it the tag is emitted as http://localhost:3000/opengraph-image —
|
|
// present, plausible, and unfetchable by every social scraper.
|
|
metadataBase: new URL(site.url),
|
|
title: `${site.name} — ${site.tagline}`,
|
|
description: site.description,
|
|
openGraph: {
|
|
title: `${site.name} — ${site.tagline}`,
|
|
description: site.description,
|
|
url: site.url,
|
|
siteName: site.name,
|
|
type: 'website',
|
|
},
|
|
};
|
|
|
|
// Public project token (same string as the site snippet). Next inlines
|
|
// process.env.* at `next build` — a runtime-only .env after deploy will not
|
|
// resurrect a Script branch that was tree-shaken when the var was empty.
|
|
// Fallback keeps the embed live even if CI/box env drifts; override via env.
|
|
const LOKI_FEEDBACK_TOKEN =
|
|
process.env.LOKI_FEEDBACK_TOKEN || 'fcw_73518de7a20c97c968d6c53bf964874d';
|
|
|
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html lang="en" className={`${sans.variable} ${fraunces.variable}`}>
|
|
<body className="bg-paper font-sans text-ink">
|
|
<Providers>
|
|
<Header />
|
|
<main className="pt-16">{children}</main>
|
|
<Footer />
|
|
<Toaster
|
|
position="top-right"
|
|
richColors
|
|
closeButton
|
|
toastOptions={{
|
|
duration: 4000,
|
|
}}
|
|
/>
|
|
</Providers>
|
|
<Script
|
|
src="https://loki.orangecat.ch/widget.js"
|
|
strategy="afterInteractive"
|
|
data-fc-project={LOKI_FEEDBACK_TOKEN}
|
|
data-fc-bottom="88"
|
|
/>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|