feat: theme

This commit is contained in:
Barrett Ruth 2025-11-09 14:35:00 -05:00
parent 8df0766439
commit fb0229d80e
7 changed files with 89 additions and 13 deletions

View file

@ -12,6 +12,17 @@ const {
<!doctype html>
<html lang="en">
<head>
<script is:inline>
(function () {
const stored = localStorage.getItem("theme");
const theme =
stored ||
(matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light");
document.documentElement.setAttribute("data-theme", theme);
})();
</script>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />