Skip to content

Commit db4f044

Browse files
committed
feat: add danaVF font to html using localFont method
1 parent c84c7a5 commit db4f044

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

src/app/layout.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
import "./globals.css";
22
import { ThemeProvider } from "@/components/contexts/theme-provider";
33
import type { Metadata } from "next";
4-
import { Geist, Geist_Mono } from "next/font/google";
5-
6-
const geistSans = Geist({
7-
variable: "--font-geist-sans",
8-
subsets: ["latin"],
9-
});
10-
11-
const geistMono = Geist_Mono({
12-
variable: "--font-geist-mono",
13-
subsets: ["latin"],
14-
});
4+
import localFont from "next/font/local";
155

166
export const metadata: Metadata = {
177
title: "Create Next App",
188
description: "Generated by create next app",
199
};
2010

11+
const danaVF = localFont({ src: "../../public/fonts/dana/DanaVF.woff2" });
12+
2113
export default function RootLayout({
2214
children,
2315
}: Readonly<{
2416
children: React.ReactNode;
2517
}>) {
2618
return (
27-
<html lang="fa-IR" style={{colorScheme:"dark"}} className="dark" >
28-
<body
29-
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
30-
>
19+
<html
20+
lang="fa-IR"
21+
dir="rtl"
22+
style={{ colorScheme: "dark" }}
23+
className={`dark ${danaVF.className}`}
24+
>
25+
<body className="antialiased">
3126
<ThemeProvider>{children}</ThemeProvider>
3227
</body>
3328
</html>

0 commit comments

Comments
 (0)