From 4c651198f34777f930b9f363998cb31a5717f20a Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 3 Jun 2024 19:30:14 +0100 Subject: [PATCH] Add birthday list page --- templates/birthday_list.html | 17 +++++++++++++++++ templates/navbar.html | 4 +++- web_view.py | 13 +++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 templates/birthday_list.html diff --git a/templates/birthday_list.html b/templates/birthday_list.html new file mode 100644 index 0000000..7346bae --- /dev/null +++ b/templates/birthday_list.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% from "macros.html" import display_date %} +{% block title %}Birthdays - Edward Betts{% endblock %} + +{% block content %} +
+

Birthdays

+ + {% for event in items %} + + + + + {% endfor %} +
{{event.as_date.strftime("%a, %d, %b")}}{{ event.title }}
+
+{% endblock %} diff --git a/templates/navbar.html b/templates/navbar.html index 04fa3f9..42626fd 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -11,7 +11,9 @@ {"endpoint": "weekends", "label": "Weekend" }, {"endpoint": "launch_list", "label": "Space launch" }, {"endpoint": "holiday_list", "label": "Holiday" }, -] %} + ] + ([{"endpoint": "birthday_list", "label": "Birthdays" }] + if g.user.is_authenticated else []) + %}