Add dark mode, simplify nav, and UI polish
- Dark mode via prefers-color-scheme: pure CSS, no JS, follows OS setting - CSS custom properties for all colors; dark palette redefines variables - Nav: brand is now a home link, Dashboard link removed, nowrap keeps it single-line on mobile; compact padding at 640px breakpoint - Battery health % uses CSS classes (health-good/warn/bad) instead of inline Jinja colors — readable in both light and dark modes - Stat card counts use CSS color variables for dark mode support - Fix duplicate display:none on bulk toolbar - input[type=date] added to themed input selector
This commit is contained in:
@@ -46,11 +46,11 @@
|
||||
{{ battery.capacity_mah }} mAh
|
||||
{% if battery.tested_capacity_mah %}
|
||||
{% set pct = (battery.tested_capacity_mah / battery.capacity_mah * 100)|round|int %}
|
||||
{% if pct >= 80 %}{% set health_color = "#166534" %}
|
||||
{% elif pct >= 60 %}{% set health_color = "#92400e" %}
|
||||
{% else %}{% set health_color = "#991b1b" %}
|
||||
{% if pct >= 80 %}{% set health_class = "health-good" %}
|
||||
{% elif pct >= 60 %}{% set health_class = "health-warn" %}
|
||||
{% else %}{% set health_class = "health-bad" %}
|
||||
{% endif %}
|
||||
→ tested <strong style="color:{{ health_color }};">{{ battery.tested_capacity_mah }} mAh ({{ pct }}%)</strong>
|
||||
→ tested <strong class="{{ health_class }}">{{ battery.tested_capacity_mah }} mAh ({{ pct }}%)</strong>
|
||||
{% if battery.tested_date %}<span class="text-muted">on {{ battery.tested_date }}</span>{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user