Edward Betts
ce9faa654f
Creating a new entity called a trip. This will group together any travel accommodation and conferences that happen together on one trip. A trip is assumed to start when leaving home and finish when returning home. The start date of a trip in is the trip ID. The date is written in ISO format. This assumes there cannot be multiple trips one one day. This assumption might be wrong, for example a morning day trip by rail, then another trip starts in the afternoon. I can change my choice of using dates as trip IDs if that happens. Sometimes during the planning of a trip the start date is unknown. For now we make up a start date, we can always change it later. If we use the start date in URLs then the URLs will change. Might need to keep a file of redirects, or could think of a different style of identifier. Trip ID have been added to accommodation, conferences, trains and flights. Later there will be a trips.yaml with notes about each trip.
47 lines
1 KiB
HTML
47 lines
1 KiB
HTML
{% extends "base.html" %}
|
|
{% from "macros.html" import accommodation_row with context %}
|
|
{% block style %}
|
|
{% set column_count = 7 %}
|
|
<style>
|
|
.grid-container {
|
|
display: grid;
|
|
grid-template-columns: repeat({{ column_count }}, auto);
|
|
gap: 10px;
|
|
justify-content: start;
|
|
}
|
|
|
|
.grid-item {
|
|
/* Additional styling for grid items can go here */
|
|
}
|
|
|
|
.heading {
|
|
grid-column: 1 / {{ column_count + 1 }}; /* Spans from the 1st line to the 7th line */
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% macro section(heading, item_list, badge) %}
|
|
{% if item_list %}
|
|
<div class="heading"><h2>{{heading}}</h2></div>
|
|
{% for item in item_list %}{{ accommodation_row(item, badge) }}{% endfor %}
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="container-fluid mt-2">
|
|
|
|
<h1>Accommodation</h1>
|
|
|
|
<ul>
|
|
<li>Total nights away in 2024: {{ total_nights_2024 }}</li>
|
|
<li>Total nights abroad in 2024: {{ nights_abroad_2024 }}</li>
|
|
</ul>
|
|
|
|
<div class="grid-container">
|
|
{{ section("Accommodation", items) }}
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|