96 lines
2.9 KiB
HTML
96 lines
2.9 KiB
HTML
|
{% extends "base.html" %}
|
||
|
|
||
|
{% block travel %}
|
||
|
{% endblock %}
|
||
|
|
||
|
{% macro display_datetime(dt) %}{{ dt.strftime("%a, %d, %b %Y %H:%M %z") }}{% endmacro %}
|
||
|
{% macro display_time(dt) %}{{ dt.strftime("%H:%M %z") }}{% endmacro %}
|
||
|
|
||
|
{% block style %}
|
||
|
<style>
|
||
|
.grid-container {
|
||
|
display: grid;
|
||
|
grid-template-columns: repeat(7, auto); /* 7 columns for each piece of information */
|
||
|
gap: 10px;
|
||
|
justify-content: start;
|
||
|
}
|
||
|
|
||
|
.train-grid-container {
|
||
|
display: grid;
|
||
|
grid-template-columns: repeat(6, auto); /* 7 columns for each piece of information */
|
||
|
gap: 10px;
|
||
|
justify-content: start;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
.grid-item {
|
||
|
/* Additional styling for grid items can go here */
|
||
|
}
|
||
|
</style>
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block content %}
|
||
|
|
||
|
<div class="container-fluid mt-2">
|
||
|
|
||
|
<h1>Travel</h1>
|
||
|
|
||
|
<p><a href="{{ url_for("index") }}">← back to agenda</a></p>
|
||
|
|
||
|
<h3>flights</h3>
|
||
|
|
||
|
<div class="grid-container">
|
||
|
<div class="grid-item text-end">date</div>
|
||
|
<div class="grid-item">route</div>
|
||
|
<div class="grid-item">take-off</div>
|
||
|
<div class="grid-item">land</div>
|
||
|
<div class="grid-item">duration</div>
|
||
|
<div class="grid-item">flight</div>
|
||
|
<div class="grid-item">reference</div>
|
||
|
|
||
|
{% for item in flights | sort(attribute="depart") if item.arrive %}
|
||
|
<div class="grid-item text-end">{{ item.depart.strftime("%a, %d %b %Y") }}</div>
|
||
|
<div class="grid-item">{{ item.from }} → {{ item.to }}</div>
|
||
|
<div class="grid-item">{{ item.depart.strftime("%H:%M") }}</div>
|
||
|
<div class="grid-item">
|
||
|
{% if item.arrive %}
|
||
|
{{ item.arrive.strftime("%H:%M") }}
|
||
|
{% if item.arrive.date() != item.depart.date() %}+1 day{% endif %}
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
<div class="grid-item">{{ item.duration }}</div>
|
||
|
<div class="grid-item">{{ item.airline }}{{ item.flight_number }}</div>
|
||
|
<div class="grid-item">{{ item.booking_reference }}</div>
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
|
||
|
<h3 class="mt-4">trains</h3>
|
||
|
|
||
|
<div class="train-grid-container">
|
||
|
<div class="grid-item text-end">date</div>
|
||
|
<div class="grid-item">route</div>
|
||
|
<div class="grid-item">depart</div>
|
||
|
<div class="grid-item">arrive</div>
|
||
|
<div class="grid-item">operator</div>
|
||
|
<div class="grid-item">reference</div>
|
||
|
|
||
|
{% for item in trains | sort(attribute="depart") if item.arrive %}
|
||
|
<div class="grid-item text-end">{{ item.depart.strftime("%a, %d %b %Y") }}</div>
|
||
|
<div class="grid-item">{{ item.from }} → {{ item.to }}</div>
|
||
|
<div class="grid-item">{{ item.depart.strftime("%H:%M") }}</div>
|
||
|
<div class="grid-item">
|
||
|
{% if item.arrive %}
|
||
|
{{ item.arrive.strftime("%H:%M") }}
|
||
|
{% if item.arrive.date() != item.depart.date() %}+1 day{% endif %}
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
<div class="grid-item">{{ item.operator }}</div>
|
||
|
<div class="grid-item">{{ item.booking_reference }}</div>
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
{% endblock %}
|