feat: update layout to use Inter font and enhance Tailwind configuration for font family

This commit is contained in:
ngc2207 2025-01-29 13:19:47 +08:00
parent 25aec8223b
commit 29f1942367
2 changed files with 7 additions and 13 deletions

View File

@ -1,17 +1,10 @@
import "@/app/globals.css";
import { cn } from "@/lib/utils";
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { Inter } from "next/font/google";
import { ThemeProvider } from "@/components/theme-provider";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Create Next App",
@ -25,9 +18,7 @@ interface RootLayoutProps {
export default function RootLayout({ children }: Readonly<RootLayoutProps>) {
return (
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<body className={cn(inter.className, "antialiased min-h-screen")}>
<ThemeProvider
attribute="class"
defaultTheme="system"

View File

@ -9,6 +9,9 @@ export default {
],
theme: {
extend: {
fontFamily: {
sans: ["var(--font-sans)"],
},
colors: {
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",