Skip to content

Commit

Permalink
fix: bad fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
icco committed Dec 17, 2023
1 parent a4b0287 commit 03a80a6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

body,
p {
font-family: "Roboto", sans-serif;
font-family: var(--font-roboto);
color: theme('colors.text');
background-color: theme('colors.background');
}
Expand All @@ -17,7 +17,7 @@ pre {
}

p code {
font-family: monospace;
font-family: var(--font-roboto-mono);
overflow-wrap: break-word;
padding: 0.2em;
}
Expand All @@ -27,7 +27,7 @@ h2,
h3,
h4,
.header {
font-family: "Roboto Slab", serif;
font-family: var(--font-roboto-slab);
}


Expand Down Expand Up @@ -179,4 +179,4 @@ article hr {
article ul {
margin-left: 0.5rem;
}
}
}
23 changes: 19 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
import "./globals.css"

import type { Metadata } from "next"
import { Roboto } from "next/font/google"
import { Roboto, Roboto_Mono, Roboto_Slab } from "next/font/google"

import Footer from "@/components/Footer"
import Header from "@/components/Header"

const font = Roboto({
const roboto = Roboto({
weight: "400",
variable: "--font-roboto",
subsets: ["latin"],
})

const robotoSlab = Roboto_Slab({
variable: "--font-roboto-slab",
subsets: ["latin"],
})

const robotoMono = Roboto_Mono({
subsets: ["latin"],
variable: "--font-roboto-mono",
display: "swap",
})

export const metadata: Metadata = {
title: "Nat? Nat. Nat!",
description: "The personal blog of Nat Welch",
Expand All @@ -22,8 +34,11 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
<html lang="en">
<body className={font.className}>
<html
lang="en"
className={`${roboto.variable} ${robotoSlab.variable} ${robotoMono.variable}`}
>
<body>
<Header />
<main>{children}</main>
<Footer />
Expand Down

0 comments on commit 03a80a6

Please sign in to comment.