2024-01-01 21:26:39 +00:00
|
|
|
{% extends "base.html" %}
|
2024-01-14 17:57:02 +00:00
|
|
|
{% from "macros.html" import trip_link, accommodation_row with context %}
|
2024-04-16 22:01:16 +01:00
|
|
|
{% block title %}Accommodation - Edward Betts{% endblock %}
|
2024-01-01 21:26:39 +00:00
|
|
|
{% block style %}
|
2024-04-17 11:40:13 +01:00
|
|
|
{% set column_count = 9 %}
|
2024-01-01 21:26:39 +00:00
|
|
|
<style>
|
|
|
|
.grid-container {
|
|
|
|
display: grid;
|
2024-01-03 11:33:24 +00:00
|
|
|
grid-template-columns: repeat({{ column_count }}, auto);
|
2024-01-01 21:26:39 +00:00
|
|
|
gap: 10px;
|
|
|
|
justify-content: start;
|
|
|
|
}
|
|
|
|
|
|
|
|
.grid-item {
|
|
|
|
/* Additional styling for grid items can go here */
|
|
|
|
}
|
|
|
|
|
|
|
|
.heading {
|
2024-01-03 11:33:24 +00:00
|
|
|
grid-column: 1 / {{ column_count + 1 }}; /* Spans from the 1st line to the 7th line */
|
2024-01-01 21:26:39 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% macro section(heading, item_list, badge) %}
|
|
|
|
{% if item_list %}
|
|
|
|
<div class="heading"><h2>{{heading}}</h2></div>
|
2024-01-14 17:57:02 +00:00
|
|
|
{% for item in item_list %}
|
|
|
|
{{ accommodation_row(item, badge) }}
|
|
|
|
<div class="grid-item">{% if item.linked_trip %} trip: {{ trip_link(item.linked_trip) }} {% endif %}</div>
|
|
|
|
{% endfor %}
|
2024-01-01 21:26:39 +00:00
|
|
|
{% 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">
|
2024-04-08 08:08:57 +01:00
|
|
|
{{ section("Past", past) }}
|
|
|
|
{{ section("Current", current) }}
|
|
|
|
{{ section("Future", future) }}
|
2024-01-01 21:26:39 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|