diff --git a/src/components/commonHead.astro b/src/components/commonHead.astro index 3114b09..ff61007 100644 --- a/src/components/commonHead.astro +++ b/src/components/commonHead.astro @@ -5,30 +5,36 @@ const { title } = Astro.props; --- - - - - - {title} - - + - + // Listen for system theme changes + window + .matchMedia("(prefers-color-scheme: dark)") + .addEventListener("change", updateTheme); + +