Dark Mode folgt Browser-Einstellung (prefers-color-scheme), Toggle entfernt
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Bewerbungs-Tracker</title>
|
||||
<!-- Apply the dark class before first paint to avoid a light-mode flash (FOUC). -->
|
||||
<!-- Apply the dark class before first paint to avoid a light-mode flash (FOUC).
|
||||
Theme follows the browser/OS setting (prefers-color-scheme) — no manual toggle. -->
|
||||
<script>
|
||||
(function () {
|
||||
try {
|
||||
var dm = localStorage.getItem('darkMode');
|
||||
if (dm === 'enabled' || (!dm && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
} catch (e) { /* ignore */ }
|
||||
@@ -15,7 +15,6 @@
|
||||
<!-- Tailwind CSS CDN -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script>
|
||||
// Toggle dark mode via the `.dark` class (default is `media`, i.e. OS-driven)
|
||||
tailwind.config = { darkMode: 'class' };
|
||||
</script>
|
||||
<!-- Custom CSS -->
|
||||
|
||||
Reference in New Issue
Block a user