fix: self-host Google Fonts (Inter, JetBrains Mono) via localFont; fix tailwind border-border color
This commit is contained in:
1 parent
adda6ae880
commit
be6e37b11f
4 files changed
+72
-40
No files matched your search
+20
-19
@@ -1,23 +1,24 @@
|
||||
import localFont from "next/font/local";
|
||||
import { Inter, JetBrains_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { getDefaultLocale } from "./lib/functions/utils";
|
||||
import { ThemeProvider } from "./lib/providers/theme-provider";
|
||||
import localFont from 'next/font/local';
|
||||
import './globals.css';
|
||||
import { getDefaultLocale } from './lib/functions/utils';
|
||||
import { ThemeProvider } from './lib/providers/theme-provider';
|
||||
|
||||
const mikhak = localFont({
|
||||
src: "lib/fonts/mikhak-v32/variable/Mikhak[DSTY,KSHD,wght].woff2",
|
||||
variable: "--font-mikhak",
|
||||
weight: "100 900",
|
||||
src: 'lib/fonts/mikhak-v32/variable/Mikhak[DSTY,KSHD,wght].woff2',
|
||||
variable: '--font-mikhak',
|
||||
weight: '100 900',
|
||||
});
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-inter",
|
||||
const inter = localFont({
|
||||
src: 'lib/fonts/inter/variable/Inter-Variable.woff2',
|
||||
variable: '--font-inter',
|
||||
weight: '100 900',
|
||||
});
|
||||
|
||||
const jetbrainsMono = JetBrains_Mono({
|
||||
subsets: ["latin"],
|
||||
variable: "--font-jetbrains-mono",
|
||||
const jetbrainsMono = localFont({
|
||||
src: 'lib/fonts/jetbrains-mono/variable/JetBrainsMono-Variable.woff2',
|
||||
variable: '--font-jetbrains-mono',
|
||||
weight: '100 800',
|
||||
});
|
||||
|
||||
export default async function RootLayout({
|
||||
@@ -28,18 +29,18 @@ export default async function RootLayout({
|
||||
const defaultLocale = await getDefaultLocale();
|
||||
|
||||
return (
|
||||
<html lang={defaultLocale} dir={defaultLocale === "fa" ? "rtl" : "ltr"} suppressHydrationWarning>
|
||||
<html lang={defaultLocale} dir={defaultLocale === 'fa' ? 'rtl' : 'ltr'} suppressHydrationWarning>
|
||||
<body
|
||||
suppressHydrationWarning={true}
|
||||
className={`${mikhak.variable} ${inter.variable} ${jetbrainsMono.variable} relative flex h-full w-full flex-col items-center justify-between antialiased`}
|
||||
className={${mikhak.variable} relative flex h-full w-full flex-col items-center justify-between antialiased}
|
||||
>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="dark"
|
||||
attribute='class'
|
||||
defaultTheme='dark'
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<div className="main flex h-full w-full flex-wrap justify-center">
|
||||
<div className='main flex h-full w-full flex-wrap justify-center'>
|
||||
{children}
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user