feat: dark modesupport

This commit is contained in:
2026-06-06 12:08:17 +05:30
parent cdb7ded29d
commit f99ba7e9a7
17 changed files with 291 additions and 149 deletions

View File

@@ -8,6 +8,18 @@
<meta name="theme-color" content="#2C1810" />
<link rel="apple-touch-icon" href="/icon-192.png" />
<title>brew</title>
<script>
(function() {
try {
const theme = localStorage.getItem('brew-theme') || 'system';
if (theme === 'dark' || (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
} catch (e) {}
})();
</script>
</head>
<body>
<div id="root"></div>