feat(component): integrate Ubuntu font

Add @fontsource/ubuntu dependency and update global styles to use the Ubuntu font. Removed local font imports from layout.tsx and updated body font-family in globals.css.
This commit is contained in:
Mathis H (Avnyr) 2024-09-27 12:05:52 +02:00
parent 11f472646d
commit bce1c393b3
Signed by: Mathis
GPG Key ID: DD9E0666A747D126
4 changed files with 13 additions and 13 deletions

View File

@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@fontsource/ubuntu": "^5.1.0",
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-alert-dialog": "^1.1.1",

8
pnpm-lock.yaml generated
View File

@ -8,6 +8,9 @@ importers:
.:
dependencies:
'@fontsource/ubuntu':
specifier: ^5.1.0
version: 5.1.0
'@hookform/resolvers':
specifier: ^3.9.0
version: 3.9.0(react-hook-form@7.53.0(react@18.3.1))
@ -200,6 +203,9 @@ packages:
'@floating-ui/utils@0.2.8':
resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==}
'@fontsource/ubuntu@5.1.0':
resolution: {integrity: sha512-0XG/HrFsfP1q3phf4QN8IO7tetd0zOZKHZSHcTnBuVoQedoo1wS/hXxY2FMZuqoG+mVfrXh+Q614MDVmQPJq2w==}
'@hookform/resolvers@3.9.0':
resolution: {integrity: sha512-bU0Gr4EepJ/EQsH/IwEzYLsT/PEj5C0ynLQ4m+GSHS+xKH4TfSelhluTgOaoc4kA5s7eCsQbM4wvZLzELmWzUg==}
peerDependencies:
@ -1873,6 +1879,8 @@ snapshots:
'@floating-ui/utils@0.2.8': {}
'@fontsource/ubuntu@5.1.0': {}
'@hookform/resolvers@3.9.0(react-hook-form@7.53.0(react@18.3.1))':
dependencies:
react-hook-form: 7.53.0(react@18.3.1)

View File

@ -3,7 +3,7 @@
@tailwind utilities;
body {
font-family: Arial, Helvetica, sans-serif;
font-family: 'Ubuntu', sans-serif;
}
@layer utilities {

View File

@ -1,17 +1,8 @@
import type { Metadata } from "next";
import localFont from "next/font/local";
import '@fontsource/ubuntu/400.css';
import '@fontsource/ubuntu/500.css';
import "./globals.css";
const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
});
export const metadata: Metadata = {
title: "Create Next App",
@ -26,7 +17,7 @@ export default function RootLayout({
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
className={`antialiased`}
>
{children}
</body>