[calendar] Keep query params when navigating
Some checks failed
build & deploy / test (push) Successful in 1m52s
build & deploy / build-and-deploy (push) Has been cancelled

This commit is contained in:
2026-05-27 13:51:36 -04:00
parent 425abebc9a
commit 8afb227267

View File

@ -166,19 +166,18 @@ header.navbar { display: none !important; }
{% block content %}
<div class="calendar-wrapper">
<div class="filter-bar">
<a href="?date={{ current_month }}"
<a href="?date={{ year }}-{{ month|stringformat:'02d' }}"
{% if not active_filter %}class="active"{% endif %}>All</a>
{% for mt in media_types %}
<a href="?date={{ current_month }}&media_type={{ mt.name }}"
<a href="?date={{ year }}-{{ month|stringformat:'02d' }}&media_type={{ mt.name }}"
{% if active_filter == mt.name %}class="active"{% endif %}>{{ mt.emoji }} {{ mt.name }}</a>
{% endfor %}
<a href="/" class="home-btn">Home</a>
</div>
<div class="calendar-grid">
<div class="month-banner">
<a href="?date={{ prev_month }}">&larr;</a>
<a href="?date={{ prev_month }}{% if active_filter %}&media_type={{ active_filter }}{% endif %}">&larr;</a>
{{ month_name }} {{ year }}
<a href="?date={{ next_month }}">&rarr;</a>
<a href="?date={{ next_month }}{% if active_filter %}&media_type={{ active_filter }}{% endif %}">&rarr;</a>
</div>
{% for name in day_names %}
@ -202,9 +201,10 @@ header.navbar { display: none !important; }
{% endfor %}
<div class="calendar-footer">
<a href="?date={{ prev_month }}">&larr; Previous</a>
<a href="?date={{ current_month }}">Today</a>
<a href="?date={{ next_month }}">Next &rarr;</a>
<a href="/">Home</a>
<a href="?date={{ prev_month }}{% if active_filter %}&media_type={{ active_filter }}{% endif %}">&larr; Previous</a>
<a href="?date={{ current_month }}{% if active_filter %}&media_type={{ active_filter }}{% endif %}">Today</a>
<a href="?date={{ next_month }}{% if active_filter %}&media_type={{ active_filter }}{% endif %}">Next &rarr;</a>
</div>
</div>
</div>