Add month headings to event list

Closes: #81
This commit is contained in:
Edward Betts 2023-12-10 22:34:15 +00:00
parent 25eb8fa23e
commit fb62dffa5c

View file

@ -141,10 +141,10 @@
<h3>Agenda</h3>
{% for event in events if event.as_date >= two_weeks_ago %}
{% if loop.first or event.date.year != loop.previtem.date.year %}
{% if loop.first or event.date.year != loop.previtem.date.year or event.date.month != loop.previtem.date.month %}
<div class="row mt-2">
<div class="col">
<h5>{{ event.date.year }}</h5>
<h4>{{ event.date.strftime("%B %Y") }}</h4>
</div>
</div>
{% endif %}