feat: implement theme switching functionality with ThemeProvider and update Header component

This commit is contained in:
Jose Selesan
2026-05-28 16:45:28 -03:00
parent d6808fb595
commit bd5e29236b
4 changed files with 117 additions and 5 deletions

View File

@@ -4,6 +4,14 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Personal Admin</title>
<script>
(function() {
var theme = localStorage.getItem("theme");
if (theme === "dark" || (theme !== "light" && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
document.documentElement.classList.add("dark");
}
})();
</script>
</head>
<body>
<div id="root"></div>