[charts] Add timemachine links
All checks were successful
build & deploy / test (push) Successful in 2m4s
build & deploy / build-and-deploy (push) Successful in 35s

This commit is contained in:
2026-05-28 16:57:57 -04:00
parent 37187f33dd
commit 034cb99c77

View File

@ -64,6 +64,30 @@
</div>
</div>
{% if period_type == "month" and month %}
<div class="row mb-2">
<div class="col-12">
<small class="text-muted me-2">Time machine:</small>
{% for y in chart_years %}
{% if y != year %}
<a href="?date={{ y }}-{{ month|stringformat:'02d' }}" class="btn btn-xs btn-outline-secondary" style="padding:1px 4px;font-size:10px;">{{ y }}</a>
{% endif %}
{% endfor %}
</div>
</div>
{% elif period_type == "week" and week %}
<div class="row mb-2">
<div class="col-12">
<small class="text-muted me-2">Time machine:</small>
{% for y in chart_years %}
{% if y != year %}
<a href="?date={{ y }}-W{{ week|stringformat:'02d' }}" class="btn btn-xs btn-outline-secondary" style="padding:1px 4px;font-size:10px;">{{ y }}</a>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
<div class="row">
{% if charts.artist %}
<div class="col-md-6 col-lg-4 chart-section">