Remove light mode and theme switcher: dark mode only
- base.html: hardcode data-bs-theme="dark", remove theme detection JS and theme selector form from sidebar footer - layout.css: replace dark/light theme selectors with unconditional dark background for .bc-main Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5163ca7b4a
commit
7a8f1aa4e5
@ -373,17 +373,10 @@ body.bc-body {
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
DARK THEME overrides
|
||||
============================================================ */
|
||||
[data-bs-theme="dark"] .bc-main {
|
||||
.bc-main {
|
||||
background: var(--bc-main-bg-dark);
|
||||
}
|
||||
|
||||
[data-bs-theme="light"] .bc-main {
|
||||
background: var(--bc-main-bg);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
CONTENT TYPOGRAPHY & UTILITIES
|
||||
============================================================ */
|
||||
|
||||
@ -30,8 +30,7 @@
|
||||
{% endmacro %}
|
||||
|
||||
<!doctype html>
|
||||
{% set _theme_pref = (current_user.theme_preference if current_user.is_authenticated else 'auto') %}
|
||||
<html lang="en" data-theme-preference="{{ _theme_pref }}">
|
||||
<html lang="en" data-bs-theme="dark" data-theme="dark">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{% block title %}Backupchecks{% endblock %}</title>
|
||||
@ -45,28 +44,6 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/sandbox.css') }}" />
|
||||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}" />
|
||||
{% block head %}{% endblock %}
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
try {
|
||||
var root = document.documentElement;
|
||||
var pref = root.getAttribute('data-theme-preference') || 'auto';
|
||||
var mq = window.matchMedia ? window.matchMedia('(prefers-color-scheme: dark)') : null;
|
||||
function applyTheme() {
|
||||
var theme = pref;
|
||||
if (pref === 'auto') { theme = (mq && mq.matches) ? 'dark' : 'light'; }
|
||||
root.setAttribute('data-bs-theme', theme);
|
||||
root.setAttribute('data-theme', theme);
|
||||
}
|
||||
applyTheme();
|
||||
if (mq && typeof mq.addEventListener === 'function') {
|
||||
mq.addEventListener('change', function () {
|
||||
if ((root.getAttribute('data-theme-preference') || 'auto') === 'auto') { applyTheme(); }
|
||||
});
|
||||
}
|
||||
} catch (e) {}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body class="bc-body">
|
||||
|
||||
@ -170,13 +147,6 @@
|
||||
</select>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form method="post" action="{{ url_for('main.set_theme_preference') }}" class="bc-theme-form">
|
||||
<select class="bc-select" name="theme" aria-label="Theme" onchange="this.form.submit()">
|
||||
<option value="light" {% if _theme_pref == 'light' %}selected{% endif %}>☀ Light</option>
|
||||
<option value="dark" {% if _theme_pref == 'dark' %}selected{% endif %}>◑ Dark</option>
|
||||
<option value="auto" {% if _theme_pref == 'auto' %}selected{% endif %}>◎ Auto</option>
|
||||
</select>
|
||||
</form>
|
||||
<a class="bc-logout" href="{{ url_for('auth.logout') }}" title="Logout">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6 2H3a1 1 0 00-1 1v10a1 1 0 001 1h3M10 11l3-3-3-3M13 8H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
</a>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user