From 7104f8eac3ac7f31e876741a361898508cdd74de Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 5 Nov 2023 13:01:35 +0000 Subject: [PATCH] Add year headings to event list --- templates/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/index.html b/templates/index.html index 9b85c44..2354895 100644 --- a/templates/index.html +++ b/templates/index.html @@ -114,6 +114,13 @@

Agenda

{% for event in events if event.as_date >= last_week %} + {% if loop.first or event.date.year != loop.previtem.date.year %} +
+
+
{{ event.date.year }}
+
+
+ {% endif %}
{{event.as_date.strftime("%a, %d, %b")}}