💄 style(css): remove light mode overrides
- delete CSS rules for light mode to maintain a single dark mode theme
♻️ refactor(html): enforce dark mode and remove theme toggle
- simplify theme management by permanently enabling dark mode
- remove theme toggle button and related JavaScript logic
This commit is contained in:
parent
79aa77348b
commit
c6a2ed928b
2 changed files with 2 additions and 67 deletions
|
|
@ -22,16 +22,8 @@
|
|||
<link rel="stylesheet" href="/static/style.css" />
|
||||
|
||||
<script>
|
||||
// Apply persisted theme preference; default is dark.
|
||||
(function () {
|
||||
const stored = localStorage.getItem("fleetledger-theme");
|
||||
const html = document.getElementById("html-root");
|
||||
if (stored === "light") {
|
||||
html.classList.remove("dark");
|
||||
} else {
|
||||
html.classList.add("dark");
|
||||
}
|
||||
})();
|
||||
// Always force dark mode (no toggle).
|
||||
document.documentElement.classList.add("dark");
|
||||
</script>
|
||||
|
||||
{% block extra_head %}{% endblock %}
|
||||
|
|
@ -103,13 +95,6 @@
|
|||
{% if not loop.last %}<span class="text-slate-700">|</span>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button
|
||||
id="theme-toggle"
|
||||
class="rounded-lg border border-slate-700 bg-slate-900/60 px-2.5 py-1 text-slate-300 hover:border-slate-500 hover:text-white"
|
||||
type="button"
|
||||
>
|
||||
🌓
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -129,13 +114,6 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
// Theme toggle button handler
|
||||
document.getElementById("theme-toggle").addEventListener("click", () => {
|
||||
const html = document.getElementById("html-root");
|
||||
const isDark = html.classList.toggle("dark");
|
||||
localStorage.setItem("fleetledger-theme", isDark ? "dark" : "light");
|
||||
});
|
||||
|
||||
// Register service worker for PWA
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue