From 7e439c1fdf63bc71c7dba11bc896253d8f985a4f Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 11 Oct 2023 17:31:16 +0100 Subject: [PATCH] Colour-code event types Closes: #23 --- templates/index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 23afe3f..04f8df2 100644 --- a/templates/index.html +++ b/templates/index.html @@ -27,6 +27,16 @@ } %} +{%set class_map = { + "bank_holiday": "bg-success-subtle", + "conference": "bg-primary-subtle", + "us_holiday": "bg-secondary-subtle", + "birthday": "bg-info-subtle", + "waste_schedule": "bg-danger-subtle", +} %} + + +
@@ -44,7 +54,7 @@ {{event.date.strftime("%a, %d, %b %Y")}} - + {{ event_labels.get(event.name) or event.name }} {%- if event.title -%}: {{ event.title }}{% endif %}