F(frontend): bundle Vazirmatn locally
This commit is contained in:
BIN
src/app/fonts/Vazirmatn-variable.woff2
Normal file
BIN
src/app/fonts/Vazirmatn-variable.woff2
Normal file
Binary file not shown.
@@ -1,10 +1,19 @@
|
|||||||
import type { Metadata } from "next";
|
import type { Metadata } from "next";
|
||||||
|
import localFont from "next/font/local";
|
||||||
import Navbar from "@/components/Navbar";
|
import Navbar from "@/components/Navbar";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
import Providers from "@/components/providers";
|
import Providers from "@/components/providers";
|
||||||
import { siteUrl } from "@/lib/site";
|
import { siteUrl } from "@/lib/site";
|
||||||
import "../index.css";
|
import "../index.css";
|
||||||
|
|
||||||
|
const vazirmatn = localFont({
|
||||||
|
src: "./fonts/Vazirmatn-variable.woff2",
|
||||||
|
display: "swap",
|
||||||
|
weight: "100 900",
|
||||||
|
variable: "--font-vazirmatn",
|
||||||
|
fallback: ["Tahoma", "Arial", "sans-serif"],
|
||||||
|
});
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
metadataBase: new URL(siteUrl),
|
metadataBase: new URL(siteUrl),
|
||||||
title: {
|
title: {
|
||||||
@@ -22,7 +31,7 @@ export default function RootLayout({
|
|||||||
}>) {
|
}>) {
|
||||||
return (
|
return (
|
||||||
<html lang="fa" dir="rtl" suppressHydrationWarning>
|
<html lang="fa" dir="rtl" suppressHydrationWarning>
|
||||||
<body>
|
<body className={`${vazirmatn.variable} font-sans antialiased`}>
|
||||||
<Providers>
|
<Providers>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -2,10 +2,6 @@
|
|||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: 'Vazirmatn', sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Definition of the design system. All colors, gradients, fonts, etc should be defined here.
|
/* Definition of the design system. All colors, gradients, fonts, etc should be defined here.
|
||||||
All colors MUST be HSL.
|
All colors MUST be HSL.
|
||||||
*/
|
*/
|
||||||
@@ -104,6 +100,6 @@ All colors MUST be HSL.
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background font-sans text-foreground;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default {
|
|||||||
},
|
},
|
||||||
extend: {
|
extend: {
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
sans: ['Vazirmatn', 'sans-serif'],
|
sans: ["var(--font-vazirmatn)", "Tahoma", "Arial", "sans-serif"],
|
||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
border: "hsl(var(--border))",
|
border: "hsl(var(--border))",
|
||||||
|
|||||||
Reference in New Issue
Block a user