52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
import type { Metadata } from 'next'
|
|
import { Fraunces, 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 fraunces = Fraunces({
|
|
weight: ['400', '500', '600', '700', '800'],
|
|
style: ['normal', 'italic'],
|
|
subsets: ['latin'],
|
|
display: 'swap',
|
|
adjustFontFallback: false,
|
|
variable: '--font-fraunces',
|
|
})
|
|
|
|
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={`${fraunces.variable} ${jetbrainsMono.variable}`} suppressHydrationWarning>
|
|
<body className={`antialiased bg-canvas text-ink ${fraunces.className}`}>
|
|
<ThemeProvider
|
|
attribute="class"
|
|
defaultTheme="system"
|
|
enableSystem
|
|
disableTransitionOnChange
|
|
>
|
|
<Providers>
|
|
<ScrollProgress />
|
|
<Header />
|
|
{children}
|
|
<Footer />
|
|
</Providers>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|