From ea33722f698b2ef94c28e117163fbeb80ce66c03 Mon Sep 17 00:00:00 2001 From: Edward Betts <edward@4angle.com> Date: Thu, 4 Jan 2024 22:57:05 +0000 Subject: [PATCH] Add missing template --- templates/trips.html | 69 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 templates/trips.html diff --git a/templates/trips.html b/templates/trips.html new file mode 100644 index 0000000..48005d3 --- /dev/null +++ b/templates/trips.html @@ -0,0 +1,69 @@ +{% extends "base.html" %} + +{% from "macros.html" import conference_row, accommodation_row, flight_row, train_row with context %} + +{% block style %} +{% set conference_column_count = 6 %} +{% set accommodation_column_count = 7 %} +{% set travel_column_count = 7 %} +<style> +.conferences { + display: grid; + grid-template-columns: repeat({{ conference_column_count }}, auto); /* 7 columns for each piece of information */ + gap: 10px; + justify-content: start; +} + +.accommodation { + display: grid; + grid-template-columns: repeat({{ accommodation_column_count }}, auto); + gap: 10px; + justify-content: start; +} + +.travel { + display: grid; + grid-template-columns: repeat({{ travel_column_count }}, auto); + gap: 10px; + justify-content: start; +} + +.grid-item { + /* Additional styling for grid items can go here */ +} +</style> +{% endblock %} + +{% block content %} +<div class="p-2"> + + {% set row = { "flight": flight_row, "train": train_row } %} + + <h1>Trips</h1> + {% for trip in trips %} + <div class="border border-2 rounded mb-2 p-2"> + <h4>{{ trip.title }}</h4> + <p>Countries: {{ trip.countries_str }}</p> + <div class="conferences"> + {% for conf in trip.conferences %} + {{ conference_row(conf, "going") }} + {% endfor %} + </div> + + <div class="accommodation"> + {% for conf in trip.accommodation %} + {{ accommodation_row(conf, "going") }} + {% endfor %} + </div> + + <div class="travel"> + {% for item in trip.travel %} + {{ row[item.type](item) }} + {% endfor %} + </div> + </div> + {% endfor %} +</div> + +{% endblock %} +