dark light mode

This commit is contained in:
Filipriec
2026-08-21 09:53:37 +02:00
parent ab8f2e5f5f
commit 4e13535729
7 changed files with 203 additions and 104 deletions

View File

@@ -11,6 +11,13 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Komp Accounting{% endblock %} · Komp Accounting</title>
<script>
// Runs before any stylesheet so the `dark` class is already on <html> at
// first paint — otherwise the page would flash light before this fires.
// Dark is the default: only an explicit "light" choice in localStorage
// (set by the toggle in ui/navbar.html) turns it off.
document.documentElement.classList.toggle('dark', localStorage.getItem('theme') !== 'light');
</script>
{#
Cascade order, declared before anything ships CSS so that it is this line
that decides it. `app` is static/app.css, which is wrapped in that layer: