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
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { Metadata } from 'next'
|
||||
import { Inter, Merriweather, JetBrains_Mono } from 'next/font/google'
|
||||
import { Inter, JetBrains_Mono } from 'next/font/google'
|
||||
import { ThemeProvider } from '@wrksz/themes/next'
|
||||
import './globals.css'
|
||||
import 'katex/dist/katex.min.css'
|
||||
@@ -9,17 +9,14 @@ 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 merriweather = Merriweather({
|
||||
weight: ['400', '700'],
|
||||
subsets: ['latin'],
|
||||
display: 'swap',
|
||||
variable: '--font-merriweather',
|
||||
})
|
||||
|
||||
const jetbrainsMono = JetBrains_Mono({
|
||||
subsets: ['latin'],
|
||||
@@ -34,8 +31,8 @@ export const metadata: Metadata = {
|
||||
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="en" className={`${inter.variable} ${merriweather.variable} ${jetbrainsMono.variable}`} suppressHydrationWarning>
|
||||
<body className="antialiased bg-canvas text-ink font-serif">
|
||||
<html lang="en" className={`${inter.variable} ${jetbrainsMono.variable}`} suppressHydrationWarning>
|
||||
<body className={`antialiased bg-canvas text-ink ${inter.className}`}>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
|
||||
Reference in New Issue
Block a user