mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 06:38:30 -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 { useTheme } from "next-themes";
|
||||||
import Header from "./page-header/Header";
|
import Header from "./page-header/Header";
|
||||||
import Footer from "./page-footer/Footer";
|
import Footer from "./page-footer/Footer";
|
||||||
import { themeColorLight, themeColorDark } from "../lib/config";
|
import { themeColors } from "../lib/config";
|
||||||
|
|
||||||
import styles from "./Layout.module.css";
|
import styles from "./Layout.module.css";
|
||||||
|
|
||||||
@ -11,9 +11,11 @@ const Layout = ({ children }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{resolvedTheme && (
|
||||||
<Head>
|
<Head>
|
||||||
<meta name="theme-color" content={resolvedTheme === "dark" ? themeColorDark : themeColorLight} />
|
<meta name="theme-color" content={themeColors[resolvedTheme]} />
|
||||||
</Head>
|
</Head>
|
||||||
|
)}
|
||||||
|
|
||||||
<Header />
|
<Header />
|
||||||
<main className={styles.main}>
|
<main className={styles.main}>
|
||||||
|
@ -18,8 +18,11 @@ module.exports = {
|
|||||||
fathomSiteId: "WBGNQUKW",
|
fathomSiteId: "WBGNQUKW",
|
||||||
fathomCustomDomain: "https://blue-chilly.jarv.is",
|
fathomCustomDomain: "https://blue-chilly.jarv.is",
|
||||||
webmentionId: "jarv.is",
|
webmentionId: "jarv.is",
|
||||||
themeColorLight: "#fcfcfc",
|
themeColors: {
|
||||||
themeColorDark: "#252525",
|
// 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
|
// Me info
|
||||||
authorName: "Jake Jarvis",
|
authorName: "Jake Jarvis",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user