feat: podpora dark mode
This commit is contained in:
@@ -10,6 +10,17 @@
|
||||
<link rel="apple-touch-icon" href="/logo192.png" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<title>Luncher</title>
|
||||
<script>
|
||||
(function() {
|
||||
var saved = localStorage.getItem('theme_preference');
|
||||
var theme = 'light';
|
||||
if (saved === 'dark') theme = 'dark';
|
||||
else if (saved === 'system' || !saved) {
|
||||
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
}
|
||||
document.documentElement.setAttribute('data-bs-theme', theme);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user