Colour-code event types

Closes: #23
This commit is contained in:
Edward Betts 2023-10-11 17:31:16 +01:00
parent 3eb5091fe2
commit 7e439c1fdf

View file

@ -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",
} %}
<body>
<div class="container mt-2">
@ -44,7 +54,7 @@
<td class="text-end">
{{event.date.strftime("%a, %d, %b %Y")}}
</td>
<td>
<td class="text-end{% if event.name in class_map %} {{ class_map[event.name]}}{% endif %}">
{{ event_labels.get(event.name) or event.name }}
{%- if event.title -%}: {{ event.title }}{% endif %}
</td>