fe improvements

This commit is contained in:
2026-02-04 08:06:17 -03:00
parent c97ef63756
commit 99826be6aa
3 changed files with 131 additions and 102 deletions

View File

@@ -148,24 +148,29 @@
"
>
<a href="/">Today</a>
<a href="/calendar/daily">Calendar</a>
<a href="/calendar/daily{% if tz_name %}?tz={{ tz_name }}{% endif %}"
>Calendar</a
>
<a href="/switches/daily">Switches</a>
<a href="/totals">All Time</a>
<select id="tz-selector" style="margin-left: auto; background: #2a2a2a; color: #e0e0e0; border: 1px solid #444; padding: 5px 10px; border-radius: 3px; font-family: monospace; font-size: 12pt;" onchange="window.location.href = window.location.pathname + '?tz=' + this.value">
{% for tz_value, tz_label in timezones %}<option value="{{ tz_value }}" {% if tz_name == tz_value or (not tz_name and loop.first) %}selected{% endif %}>{{ tz_label }}</option>{% endfor %}
</select>
</div>
<div class="nav-tabs">
<a
href="/switches/daily/{{ base_date.year }}/{{ base_date.month }}/{{ base_date.day }}"
href="/switches/daily/{{ base_date.year }}/{{ base_date.month }}/{{ base_date.day }}{% if tz_name %}?tz={{ tz_name }}{% endif %}"
class="{% if scope == 'daily' %}active{% endif %}"
>Daily</a
>
<a
href="/switches/weekly/{{ base_date.year }}/{{ base_date.month }}/{{ base_date.day }}"
href="/switches/weekly/{{ base_date.year }}/{{ base_date.month }}/{{ base_date.day }}{% if tz_name %}?tz={{ tz_name }}{% endif %}"
class="{% if scope == 'weekly' %}active{% endif %}"
>Weekly</a
>
<a
href="/switches/monthly/{{ base_date.year }}/{{ base_date.month }}/{{ base_date.day }}"
href="/switches/monthly/{{ base_date.year }}/{{ base_date.month }}/{{ base_date.day }}{% if tz_name %}?tz={{ tz_name }}{% endif %}"
class="{% if scope == 'monthly' %}active{% endif %}"
>Monthly</a
>
@@ -173,7 +178,7 @@
<div class="date-nav">
<a
href="/switches/{{ scope }}/{{ prev_date.year }}/{{ prev_date.month }}/{{ prev_date.day }}"
href="/switches/{{ scope }}/{{ prev_date.year }}/{{ prev_date.month }}/{{ prev_date.day }}{% if tz_name %}?tz={{ tz_name }}{% endif %}"
></a
>
{% if scope == 'daily' %}
@@ -184,7 +189,7 @@
<span class="date-info">{{ base_date.strftime('%B %Y') }}</span>
{% endif %}
<a
href="/switches/{{ scope }}/{{ next_date.year }}/{{ next_date.month }}/{{ next_date.day }}"
href="/switches/{{ scope }}/{{ next_date.year }}/{{ next_date.month }}/{{ next_date.day }}{% if tz_name %}?tz={{ tz_name }}{% endif %}"
></a
>
</div>