From aa7d7b7e6c8eef364ec1f9c774ac5980badd2897 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Mon, 1 Jan 2024 21:26:39 +0000 Subject: [PATCH] Add accommodation page Closes: #88 --- templates/accommodation.html | 67 ++++++++++++++++++++++++++++++++++ templates/conference_list.html | 2 + templates/gaps.html | 2 + templates/index.html | 2 + templates/travel.html | 2 + web_view.py | 25 +++++++++++++ 6 files changed, 100 insertions(+) create mode 100644 templates/accommodation.html diff --git a/templates/accommodation.html b/templates/accommodation.html new file mode 100644 index 0000000..5a78d6d --- /dev/null +++ b/templates/accommodation.html @@ -0,0 +1,67 @@ +{% extends "base.html" %} +{% block style %} + +{% endblock %} + +{% macro row(item, badge) %} +
{{ item.from.strftime("%a, %d %b %Y") }}
+
{{ item.to.strftime("%a, %d %b") }}
+
{{ (item.to.date() - item.from.date()).days }}
+
{{ item.name }}
+
{{ item.operator }}
+
{{ item.location }}
+{% endmacro %} + +{% macro section(heading, item_list, badge) %} +{% if item_list %} +

{{heading}}

+{% for item in item_list %}{{ row(item, badge) }}{% endfor %} +{% endif %} +{% endmacro %} + +{% block content %} + +
+ +

Accommodation

+ +

+ ← back to agenda + | + travel + | + conference + | + gaps + | + accommodation +

+ + + + + +
+ {{ section("Accommodation", items) }} +
+
+ +{% endblock %} diff --git a/templates/conference_list.html b/templates/conference_list.html index 0190d94..05bd4e7 100644 --- a/templates/conference_list.html +++ b/templates/conference_list.html @@ -61,6 +61,8 @@ conference | gaps + | + accommodation

diff --git a/templates/gaps.html b/templates/gaps.html index d4487b7..cbb5e5c 100644 --- a/templates/gaps.html +++ b/templates/gaps.html @@ -12,6 +12,8 @@ conference | gaps + | + accommodation

diff --git a/templates/index.html b/templates/index.html index 2dcf2c8..81d30ff 100644 --- a/templates/index.html +++ b/templates/index.html @@ -115,6 +115,8 @@ conference | gaps + | + accommodation