diff --git a/index.html b/index.html index 1f2bd47..b68e7ca 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,9 @@ - - + + + diff --git a/src/components/site-header.tsx b/src/components/site-header.tsx index 35b405e..8c05e16 100644 --- a/src/components/site-header.tsx +++ b/src/components/site-header.tsx @@ -35,11 +35,16 @@ export function SiteHeader() { return (
-
+
+
void, () => void] { root.classList.toggle('dark', theme === 'dark') root.style.colorScheme = theme window.localStorage.setItem(THEME_KEY, theme) + + const color = theme === 'dark' ? '#1c1c1c' : '#faf9f8' + document + .querySelectorAll('meta[name="theme-color"]') + .forEach((m) => { + m.setAttribute('content', color) + }) }, [theme]) const toggle = () => setTheme((t) => (t === 'dark' ? 'light' : 'dark'))