From 8508a9ae3eee0471897f73a409c9ae62b7bd4c1d Mon Sep 17 00:00:00 2001 From: Sonny Nguyen Date: Thu, 18 Apr 2024 19:35:13 -0700 Subject: [PATCH] fixed font for production --- src/app/globals.css | 1 - src/app/layout.tsx | 11 ++++++++--- tailwind.config.ts | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index fd1f1fa..6d79953 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,7 +1,6 @@ @tailwind base; @tailwind components; @tailwind utilities; -@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Rowdies:wght@300;400;700&display=swap"); :root { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 5bc84d4..0cf0d38 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,10 +1,15 @@ import type { Metadata } from "next"; -import { Inter } from "next/font/google"; +import { Inter, Rowdies } from "next/font/google"; import "./globals.css"; import { SpeedInsights } from "@vercel/speed-insights/next"; import NavBar from "./_components/Navbar"; -const inter = Inter({ subsets: ["latin"] }); +const inter = Inter({ subsets: ["latin"], variable: "--font-inter" }); +const rowdies = Rowdies({ + subsets: ["latin"], + weight: "400", + variable: "--font-rowdies", +}); export const metadata: Metadata = { title: "Pomoparty", @@ -18,7 +23,7 @@ export default function RootLayout({ }>) { return ( - + {children} diff --git a/tailwind.config.ts b/tailwind.config.ts index 2b1980b..c622102 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -16,7 +16,7 @@ const config: Config = { neutral: colors.neutral, }, fontFamily: { - title: "Rowdies", + title: ["var(--font-rowdies)"], }, backgroundImage: { "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",