54 lines
1.3 KiB
HTML
54 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block style %}
|
|
<style>
|
|
.grid-container {
|
|
display: grid;
|
|
grid-template-columns: repeat(6, auto);
|
|
gap: 10px;
|
|
justify-content: start;
|
|
}
|
|
|
|
.grid-item {
|
|
/* Additional styling for grid items can go here */
|
|
}
|
|
|
|
.heading {
|
|
grid-column: 1 / 7; /* Spans from the 1st line to the 7th line */
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% macro row(item, badge) %}
|
|
<div class="grid-item text-end">{{ item.from.strftime("%a, %d %b %Y") }}</div>
|
|
<div class="grid-item text-end">{{ item.to.strftime("%a, %d %b") }}</div>
|
|
<div class="grid-item text-end">{{ (item.to.date() - item.from.date()).days }}</div>
|
|
<div class="grid-item">{{ item.name }}</div>
|
|
<div class="grid-item">{{ item.operator }}</div>
|
|
<div class="grid-item">{{ item.location }}</div>
|
|
{% endmacro %}
|
|
|
|
{% macro section(heading, item_list, badge) %}
|
|
{% if item_list %}
|
|
<div class="heading"><h2>{{heading}}</h2></div>
|
|
{% for item in item_list %}{{ 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 %}
|