Files
public-blog/app/layout.tsx
Krishna Ayyalasomayajula 04adc7b896 feat: swap Merriweather → Inter + define @layer base
- Remove Merriweather font import and config from layout.tsx
- Add Inter with weight/style/adjustFontFallback
- Apply inter.className to body instead of font-serif
- Update --font-serif in @theme to use Inter
- Add @layer base with body, h1-h6, code, and link rules
2026-06-01 22:34:02 -05:00

53 lines
1.5 KiB
TypeScript

import type { Metadata } from 'next'
import { Inter, JetBrains_Mono } from 'next/font/google'
import { ThemeProvider } from '@wrksz/themes/next'
import './globals.css'
import 'katex/dist/katex.min.css'
import { Header } from '@/components/layout/Header'
import { Footer } from '@/components/layout/Footer'
import { ScrollProgress } from '@/components/ui/ScrollProgress'
import { Providers } from './providers'
const inter = Inter({
weight: ['300', '400', '500', '600', '700'],
style: ['normal', 'italic'],
subsets: ['latin'],
display: 'swap',
adjustFontFallback: true,
variable: '--font-inter',
})
const jetbrainsMono = JetBrains_Mono({
subsets: ['latin'],
display: 'swap',
variable: '--font-jetbrains-mono',
})
export const metadata: Metadata = {
title: { template: '%s | blog', default: 'blog' },
description: 'A sleek static blog with code and math.',
}
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" className={`${inter.variable} ${jetbrainsMono.variable}`} suppressHydrationWarning>
<body className={`antialiased bg-canvas text-ink ${inter.className}`}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<Providers>
<ScrollProgress />
<Header />
{children}
<Footer />
</Providers>
</ThemeProvider>
</body>
</html>
)
}