mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 17:46:39 -04:00
fontsource -> next/font
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { Html, Head, Main, NextScript } from "next/document";
|
||||
import ThemeScript from "../components/ThemeScript";
|
||||
import { getCssText, themeClassNames, themeStorageKey } from "../lib/styles/stitches.config";
|
||||
import { Inter, RobotoMono } from "../lib/styles/fonts";
|
||||
import * as config from "../lib/config";
|
||||
|
||||
// https://nextjs.org/docs/advanced-features/custom-document
|
||||
@ -12,11 +11,6 @@ const Document = () => {
|
||||
{/* inject a small script to set/restore the user's theme ASAP */}
|
||||
<ThemeScript id="restore-theme" {...{ themeClassNames, themeStorageKey }} />
|
||||
|
||||
{/* preload highest priority fonts defined in ../lib/styles/fonts/ */}
|
||||
{[...Inter.preloads, ...RobotoMono.preloads].map(({ href, type }) => (
|
||||
<link key={href} rel="preload" as="font" {...{ type, href }} crossOrigin="anonymous" />
|
||||
))}
|
||||
|
||||
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
|
||||
</Head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user