Files
zeekay 51200cc4af the face is Zen, and it ships from @hanzo/font
One family. Font stacks name Zen and fall back to the native faces, tokens
name the role rather than a face, and the packages that used to supply a
face now point at @hanzo/font.

Self-hosted @font-face blocks are removed rather than renamed: rewriting the
family in one would leave a src pointing at a file this repo no longer ships.
@hanzo/font carries the binaries and declares the faces, so the local copies
go with the declaration that used them.

Comments naming a face we no longer use are deleted, not reworded.
2026-09-01 13:40:03 -07:00

95 lines
2.7 KiB
TypeScript

import './global.css';
import { RootProvider } from '@hanzo/docs/ui/provider/base';
import { NextProvider } from '@hanzo/docs/core/framework/next';
import { Inter, Roboto_Mono } from 'next/font/google';
import type { ReactNode } from 'react';
import { SearchDialog } from '@/components/search-dialog';
import config from '@/rfc.config';
const inter = Inter({
subsets: ['latin'],
variable: '--font-sans',
display: 'swap',
});
const robotoMono = Roboto_Mono({
subsets: ['latin'],
variable: '--font-mono',
display: 'swap',
});
export const metadata = {
title: {
default: config.title,
template: `%s | ${config.name}`,
},
description: config.description,
keywords: [config.shortName, 'proposals', 'standards', 'documentation'],
authors: [{ name: config.name }],
metadataBase: new URL(config.baseUrl),
openGraph: {
title: config.title,
description: config.description,
type: 'website',
siteName: config.name,
images: [
{
url: '/og.png',
width: 1200,
height: 630,
alt: config.title,
},
],
},
twitter: {
card: 'summary_large_image',
title: config.title,
description: config.description,
images: ['/twitter.png'],
},
};
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={`${inter.variable} ${robotoMono.variable}`} suppressHydrationWarning>
<head>
{/* Prevent flash - respect system preference or stored preference */}
<script
dangerouslySetInnerHTML={{
__html: `
(function() {
const stored = localStorage.getItem('${config.theme.storageKey}');
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
if (stored === 'dark' || (stored !== 'light' && prefersDark)) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
})();
`,
}}
/>
</head>
<body className="min-h-svh bg-background font-sans antialiased">
<NextProvider>
<RootProvider
search={{
enabled: false,
}}
theme={{
enabled: true,
defaultTheme: config.theme.defaultTheme,
storageKey: config.theme.storageKey,
}}
>
<SearchDialog />
<div className="relative flex min-h-svh flex-col bg-background">
{children}
</div>
</RootProvider>
</NextProvider>
</body>
</html>
);
}