dark light mode
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user