Improvements to scripts and index page on text-only browser
This commit is contained in:
parent
ad03c0a6d0
commit
48fe7f041e
8 changed files with 72 additions and 71 deletions
|
|
@ -10,7 +10,7 @@ import DarkModeScriptInline from "./DarkModeScriptInline.astro";
|
|||
const colorSchemeSetup = () => {
|
||||
let colorScheme: ColorScheme = localStorage.colorScheme;
|
||||
if (!colorScheme || colorScheme === "auto") {
|
||||
colorScheme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
colorScheme = matchMedia("(prefers-color-scheme:dark)").matches ? "dark" : "light";
|
||||
}
|
||||
const toggleColorScheme = (e: MouseEvent) => {
|
||||
e.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue