1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-28 00:35:48 -04:00

set html class to light theme in static output

This commit is contained in:
2022-06-03 09:52:18 -04:00
parent acc6b11fa7
commit 3f931e01ce
8 changed files with 117 additions and 106 deletions

View File

@@ -1,15 +1,16 @@
import { Html, Head, Main, NextScript } from "next/document";
import ThemeScript from "../components/ThemeScript/ThemeScript";
import { getCssText, preloadFonts } from "../lib/styles/stitches.config";
import { themeClassNames, themeDefault, themeStorageKey } from "../lib/config/themes";
import * as config from "../lib/config";
// https://nextjs.org/docs/advanced-features/custom-document
const Document = () => {
return (
<Html lang={config.siteLocale}>
<Html lang={config.siteLocale} className={themeClassNames[themeDefault]}>
<Head>
{/* inject a small script to set/restore the user's theme ASAP */}
<ThemeScript />
<ThemeScript {...{ themeClassNames, themeStorageKey }} />
{/* preload highest priority fonts defined in ../lib/styles/fonts/ */}
{preloadFonts.map((font) => (

View File

@@ -118,7 +118,7 @@ const Index = () => {
</H1>
<H2>
I'm a frontend web developer based in{" "}
I'm a frontend web developer based in the{" "}
<ColorfulLink
href="https://www.youtube-nocookie.com/embed/rLwbzGyC6t4?hl=en&amp;fs=1&amp;showinfo=1&amp;rel=0&amp;iv_load_policy=3"
title='"Boston Accent Trailer - Late Night with Seth Meyers" on YouTube'
@@ -126,8 +126,8 @@ const Index = () => {
darkColor="#ff5146"
>
Boston
</ColorfulLink>
.
</ColorfulLink>{" "}
area.
</H2>
<Paragraph>