{% extends "base.html" %} {% block title %}{{ trip.title }} ({{ display_date(trip.start) }}) - Edward Betts{% endblock %} {% from "macros.html" import trip_link, display_datetime, display_date_no_year, display_date, display_conf_date_no_year, conference_row, accommodation_row, flight_row, train_row, ferry_row, coach_row, bus_row with context %} {% set row = {"flight": flight_row, "train": train_row, "ferry": ferry_row, "coach": coach_row, "bus": bus_row} %} {% macro trip_duration(depart, arrive) -%} {%- set mins = ((arrive - depart).total_seconds() // 60) | int -%} {%- set h = mins // 60 -%} {%- set m = mins % 60 -%} {%- if h %}{{ h }}h {% endif -%} {%- if m %}{{ m }}m{% elif h %}0m{% endif -%} {%- endmacro %} {% macro next_and_previous() %}
{% 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 %}
{% endmacro %} {% block style %} {% if coordinates %} {% endif %} {% set conference_column_count = 7 %} {% set accommodation_column_count = 7 %} {% set travel_column_count = 9 %} {% endblock %} {% set end = trip.end %} {% set total_distance = trip.total_distance() %} {% set distances_by_transport_type = trip.distances_by_transport_type() %} {% set total_co2_kg = trip.total_co2_kg() %} {% set co2_by_transport_type = trip.co2_by_transport_type() %} {% block content %}{% if end %} {{ display_date_no_year(trip.start) }} to {{ display_date_no_year(end) }} ({{ (end - trip.start).days }} nights) {% else %} {{ display_date_no_year(trip.start) }} (end date missing) {% endif %}
| Destination | Timezone | Difference from UK |
|---|---|---|
| {{ item.destination_label }} | {{ item.timezone or "Unknown" }} | {{ item.offset_display }} |
Topic: {{ item.topic }} Venue: {{ item.venue }} Location: {{ item.location }} {% if country %} {{ country.flag if trip.show_flags }} {% elif item.online %} 💻 Online {% else %} country code {{ item.country }} not found {% endif %} {% if item.free %} free to attend {% elif item.price and item.currency %} price: {{ item.price }} {{ item.currency }} {% endif %}
{{ item.location }} {% if country %} {{ country.flag if trip.show_flags }} {% else %} country code {{ item.country }} not found {% endif %} {% if item.address %} · {{ item.address }}{% endif %} {% if g.user.is_authenticated and item.price and item.currency %} {{ item.price }} {{ item.currency }} {% endif %}
{{ item.depart.strftime("%H:%M") }} → {{ item.arrive.strftime("%H:%M") }}{% if is_overnight %} +1 day{% endif %} {% if item.class %} {{ item.class }} {% endif %} 🕒{{ trip_duration(item.depart, item.arrive) }} {% if item.distance %} 🛤️ {{ "{:,.0f} km".format(item.distance) }} {% endif %} {% if item.co2_kg is defined and item.co2_kg is not none %} CO₂ {{ "{:,.1f}".format(item.co2_kg) }} kg {% endif %} {% if item.coach %} 🛏️ Coach {{ item.coach }}{% if item.seat %}, Seat {% if item.seat is iterable and item.seat is not string %}{{ item.seat | join(" & ") }}{% else %}{{ item.seat }}{% endif %}{% endif %} {% endif %}
{{ item.depart.strftime("%H:%M") }} → {{ item.arrive.strftime("%H:%M") }} {% if item.class %} {{ item.class }} {% endif %} 🕒{{ trip_duration(item.depart, item.arrive) }} {% if item.distance %} 🛤️ {{ "{:,.0f} km".format(item.distance) }} {% endif %} {% if item.co2_kg is defined and item.co2_kg is not none %} CO₂ {{ "{:,.1f}".format(item.co2_kg) }} kg {% endif %}
Address: {{ item.address }} | Location: {{ item.location }} {% if country %} {{ country.flag if trip.show_flags }} {% else %} country code {{ item.country }} not found {% endif %} {% if g.user.is_authenticated and item.price and item.currency %} | price: {{ item.price }} {{ item.currency }} {% endif %}
| {{ display_date(item.date) }} | {% else %}{% endif %} | {{ country.flag if trip.show_flags }} {{ country.name }} | {{ item.display_name }} |
No public holidays during trip.
{% endif %}| {{ display_date(item.as_date) }} | to {{ display_date(item.end_as_date) }} | {{ item.title }} |
No UK school holidays during trip.
{% endif %}