mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 14:06:40 -04:00
fix font css vars
This commit is contained in:
@ -11,6 +11,7 @@ export const GeistSans = GeistSansLoader({
|
||||
"system-ui",
|
||||
"sans-serif",
|
||||
],
|
||||
variable: "--fonts-sans",
|
||||
preload: true,
|
||||
});
|
||||
|
||||
@ -28,5 +29,6 @@ export const GeistMono = GeistMonoLoader({
|
||||
"monospace",
|
||||
],
|
||||
adjustFontFallback: false,
|
||||
variable: "--fonts-mono",
|
||||
preload: true,
|
||||
});
|
||||
|
@ -1,4 +1,7 @@
|
||||
/*! Adapted from modern-normalize.css | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||
/*!
|
||||
* modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize/tree/v3.0.1
|
||||
*/
|
||||
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
@ -15,6 +18,7 @@ html {
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--fonts-sans);
|
||||
background-color: var(--colors-background-inner);
|
||||
}
|
||||
|
||||
code,
|
||||
|
@ -1,7 +1,3 @@
|
||||
.body {
|
||||
background-color: var(--colors-background-inner);
|
||||
}
|
||||
|
||||
.layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { JsonLd } from "react-schemaorg";
|
||||
import clsx from "clsx";
|
||||
import Analytics from "./analytics";
|
||||
import { ThemeProvider, ThemeScript } from "../contexts/ThemeContext";
|
||||
import Header from "../components/Header";
|
||||
import Footer from "../components/Footer";
|
||||
import { SkipToContentLink, SkipToContentTarget } from "../components/SkipToContent";
|
||||
import { SkipNavLink, SkipNavTarget } from "../components/SkipNav";
|
||||
import { defaultMetadata } from "../lib/helpers/metadata";
|
||||
import { setRootCssVariables } from "../lib/helpers/styles";
|
||||
import * as config from "../lib/config";
|
||||
import { BASE_URL, MAX_WIDTH } from "../lib/config/constants";
|
||||
import type { Metadata } from "next";
|
||||
@ -69,25 +69,21 @@ const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
||||
/>
|
||||
</head>
|
||||
|
||||
<body className={styles.body}>
|
||||
<style
|
||||
precedence={styles.layout}
|
||||
{...setRootCssVariables({
|
||||
"fonts-sans": GeistSans.style.fontFamily,
|
||||
"fonts-mono": GeistMono.style.fontFamily,
|
||||
"max-width": `${MAX_WIDTH}px`,
|
||||
})}
|
||||
/>
|
||||
|
||||
<body
|
||||
className={clsx(GeistSans.variable, GeistMono.variable)}
|
||||
style={{ ["--max-width" as string]: `${MAX_WIDTH}px` }}
|
||||
>
|
||||
<ThemeProvider>
|
||||
<SkipToContentLink />
|
||||
<SkipNavLink />
|
||||
|
||||
<div className={styles.layout}>
|
||||
<Header />
|
||||
|
||||
<main className={styles.default}>
|
||||
<SkipToContentTarget />
|
||||
<div className={styles.container}>{children}</div>
|
||||
<div className={styles.container}>
|
||||
<SkipNavTarget />
|
||||
{children}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<Footer />
|
||||
|
Reference in New Issue
Block a user