2024-01-12 14:04:06 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2024-01-17 20:56:42 +00:00
|
|
|
{% block title %}{{ trip.title }} ({{ display_date(trip.start) }}){% endblock %}
|
|
|
|
|
2024-01-14 12:29:39 +00:00
|
|
|
{% from "macros.html" import trip_link, display_date_no_year, display_date, conference_row, accommodation_row, flight_row, train_row with context %}
|
2024-01-12 14:04:06 +00:00
|
|
|
|
|
|
|
{% set row = { "flight": flight_row, "train": train_row } %}
|
|
|
|
|
|
|
|
{% block style %}
|
2024-01-12 15:04:08 +00:00
|
|
|
|
2024-01-12 16:54:52 +00:00
|
|
|
{% if coordinates %}
|
2024-01-12 15:04:08 +00:00
|
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
|
|
|
|
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
|
|
|
|
crossorigin=""/>
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-16 20:43:28 +00:00
|
|
|
{% set conference_column_count = 7 %}
|
2024-01-12 14:04:06 +00:00
|
|
|
{% set accommodation_column_count = 7 %}
|
2024-01-14 18:16:20 +00:00
|
|
|
{% set travel_column_count = 8 %}
|
2024-01-12 14:04:06 +00:00
|
|
|
<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 */
|
|
|
|
}
|
2024-01-12 15:04:08 +00:00
|
|
|
|
|
|
|
#map {
|
2024-01-14 12:01:33 +00:00
|
|
|
height: 80vh;
|
2024-01-12 15:04:08 +00:00
|
|
|
}
|
|
|
|
|
2024-01-12 14:04:06 +00:00
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% set end = trip.end %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="p-2">
|
|
|
|
<h1>{{ trip.title }}<small class="text-muted">({{ display_date(trip.start) }})</small></h1>
|
|
|
|
<div>Countries: {{ trip.countries_str }}</div>
|
|
|
|
{% if end %}
|
2024-01-22 12:47:22 +00:00
|
|
|
<div>
|
|
|
|
Dates: {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }}
|
|
|
|
({{ (end - trip.start).days }} nights)
|
|
|
|
</div>
|
2024-01-12 14:04:06 +00:00
|
|
|
{% else %}
|
|
|
|
<div>Start: {{ display_date_no_year(trip.start) }} (end date missing)</div>
|
|
|
|
{% endif %}
|
2024-01-14 16:52:06 +00:00
|
|
|
|
2024-01-22 13:12:33 +00:00
|
|
|
{% set delta = human_readable_delta(trip.start) %}
|
|
|
|
{% if delta %}
|
|
|
|
<div>{{ delta }} time</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-12 14:04:06 +00:00
|
|
|
<div class="conferences">
|
2024-01-14 16:52:06 +00:00
|
|
|
{% for conf in trip.conferences %} {{ conference_row(conf, "going") }} {% endfor %}
|
2024-01-12 14:04:06 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="accommodation">
|
2024-01-14 16:52:06 +00:00
|
|
|
{% for conf in trip.accommodation %} {{ accommodation_row(conf, "going") }} {% endfor %}
|
2024-01-12 14:04:06 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="travel">
|
2024-01-14 16:52:06 +00:00
|
|
|
{% for item in trip.travel %} {{ row[item.type](item) }} {% endfor %}
|
2024-01-12 14:04:06 +00:00
|
|
|
</div>
|
|
|
|
|
2024-01-16 18:10:13 +00:00
|
|
|
{% if holidays %}
|
2024-01-16 18:08:50 +00:00
|
|
|
<div class="mt-3">
|
|
|
|
<h4>Holidays</h4>
|
|
|
|
|
|
|
|
<table class="table table-hover w-auto">
|
|
|
|
{% for item in holidays %}
|
|
|
|
{% set country = get_country(item.country) %}
|
|
|
|
<tr>
|
|
|
|
{% if loop.first or item.date != loop.previtem.date %}
|
|
|
|
<td class="text-end">{{ display_date(item.date) }}</td>
|
|
|
|
{% else %}
|
|
|
|
<td></td>
|
|
|
|
{% endif %}
|
|
|
|
<td>{{ country.flag }} {{ country.name }}</td>
|
|
|
|
<td>{{ item.display_name }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
2024-01-16 18:10:13 +00:00
|
|
|
{% endif %}
|
2024-01-16 18:08:50 +00:00
|
|
|
|
2024-01-14 12:29:39 +00:00
|
|
|
<p>
|
2024-01-14 12:35:15 +00:00
|
|
|
{% if prev_trip %}
|
|
|
|
previous: {{ trip_link(prev_trip) }} ({{ (trip.start - prev_trip.end).days }} days)
|
|
|
|
{% endif %}
|
|
|
|
{% if next_trip %}
|
|
|
|
next: {{ trip_link(next_trip) }} ({{ (next_trip.start - trip.end).days }} days)
|
|
|
|
{% endif %}
|
2024-01-14 12:29:39 +00:00
|
|
|
</p>
|
|
|
|
|
2024-01-12 16:54:52 +00:00
|
|
|
{% if coordinates %}
|
2024-01-12 15:04:08 +00:00
|
|
|
<div id="map"></div>
|
|
|
|
{% endif %}
|
2024-01-12 14:04:06 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
2024-01-12 15:04:08 +00:00
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
|
2024-01-12 16:54:52 +00:00
|
|
|
{% if coordinates %}
|
2024-01-12 15:04:08 +00:00
|
|
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
|
|
|
|
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
|
|
|
|
crossorigin=""></script>
|
|
|
|
|
2024-01-14 15:42:48 +00:00
|
|
|
<script src="https://unpkg.com/leaflet.geodesic@2.7.1/dist/leaflet.geodesic.umd.min.js"></script>
|
|
|
|
|
2024-01-14 12:01:33 +00:00
|
|
|
<script src="{{ url_for("static", filename="js/map.js") }}"></script>
|
|
|
|
|
2024-01-12 15:04:08 +00:00
|
|
|
<script>
|
2024-01-12 16:54:52 +00:00
|
|
|
var coordinates = {{ coordinates | tojson }};
|
2024-01-12 17:17:12 +00:00
|
|
|
var routes = {{ routes | tojson }};
|
2024-01-12 15:04:08 +00:00
|
|
|
|
2024-01-14 12:01:33 +00:00
|
|
|
build_map("map", coordinates, routes);
|
2024-01-12 17:17:12 +00:00
|
|
|
|
2024-01-12 15:04:08 +00:00
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|