mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 13:18:26 -04:00
don't set theme-color until we know for sure what the resolvedTheme
is
This commit is contained in:
parent
ce39750b0b
commit
b7313985db
@ -2,7 +2,7 @@ import Head from "next/head";
|
||||
import { useTheme } from "next-themes";
|
||||
import Header from "./page-header/Header";
|
||||
import Footer from "./page-footer/Footer";
|
||||
import { themeColorLight, themeColorDark } from "../lib/config";
|
||||
import { themeColors } from "../lib/config";
|
||||
|
||||
import styles from "./Layout.module.css";
|
||||
|
||||
@ -11,9 +11,11 @@ const Layout = ({ children }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<meta name="theme-color" content={resolvedTheme === "dark" ? themeColorDark : themeColorLight} />
|
||||
</Head>
|
||||
{resolvedTheme && (
|
||||
<Head>
|
||||
<meta name="theme-color" content={themeColors[resolvedTheme]} />
|
||||
</Head>
|
||||
)}
|
||||
|
||||
<Header />
|
||||
<main className={styles.main}>
|
||||
|
@ -18,8 +18,11 @@ module.exports = {
|
||||
fathomSiteId: "WBGNQUKW",
|
||||
fathomCustomDomain: "https://blue-chilly.jarv.is",
|
||||
webmentionId: "jarv.is",
|
||||
themeColorLight: "#fcfcfc",
|
||||
themeColorDark: "#252525",
|
||||
themeColors: {
|
||||
// used for `<meta name="theme-color" ...>`, should be the same as CSS `--background-outer` var in styles/colors.css
|
||||
light: "#fcfcfc",
|
||||
dark: "#252525",
|
||||
},
|
||||
|
||||
// Me info
|
||||
authorName: "Jake Jarvis",
|
||||
|
Loading…
x
Reference in New Issue
Block a user