Add year headings to event list

This commit is contained in:
Edward Betts 2023-11-05 13:01:35 +00:00
parent 15c52246b7
commit 7104f8eac3

View file

@ -114,6 +114,13 @@
<h3>Agenda</h3>
{% for event in events if event.as_date >= last_week %}
{% if loop.first or event.date.year != loop.previtem.date.year %}
<div class="row mt-2">
<div class="col">
<h5>{{ event.date.year }}</h5>
</div>
</div>
{% endif %}
<div class="row border border-1 {% if event.name in class_map %} {{ class_map[event.name]}}{% endif %}">
<div class="col-md-3">
{{event.as_date.strftime("%a, %d, %b")}}