From 4eeb0036ecd4497d3900f46a7c5371d0e6a0bad6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 23 Aug 2021 20:22:51 +0200 Subject: Add trip detail page --- templates/departure_list.html | 2 +- templates/departures_page.html | 2 +- templates/header.html | 4 +-- templates/landing_page.html | 2 +- templates/tripinfo.html | 72 ++++++++++++++++++++++++++++++++++++++++++ templates/tripinfo_page.html | 32 +++++++++++++++++++ 6 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 templates/tripinfo.html create mode 100644 templates/tripinfo_page.html (limited to 'templates') diff --git a/templates/departure_list.html b/templates/departure_list.html index 801e6d2..3df1e65 100644 --- a/templates/departure_list.html +++ b/templates/departure_list.html @@ -1,6 +1,6 @@ {% for departure in departures %}
  • - + {{ departure.line.name }} {% if departure.suffix %} {{ departure.suffix }} diff --git a/templates/departures_page.html b/templates/departures_page.html index 605acff..eeceb76 100644 --- a/templates/departures_page.html +++ b/templates/departures_page.html @@ -3,7 +3,7 @@ {{ title }} {% include 'header.html' %} - + diff --git a/templates/header.html b/templates/header.html index 9f57312..14953fe 100644 --- a/templates/header.html +++ b/templates/header.html @@ -12,11 +12,11 @@ --> - + + {% include 'navbar.html' %} diff --git a/templates/tripinfo.html b/templates/tripinfo.html new file mode 100644 index 0000000..bfe46d0 --- /dev/null +++ b/templates/tripinfo.html @@ -0,0 +1,72 @@ +
    + +
    +{% if tripinfo.arrival %} +An: +{% if tripinfo.arrivalDelay %} +{{ tripinfo.arrival.strftime('%H:%M') }} +
    Plan: {{ tripinfo.plannedArrival.strftime('%H:%M') }} +{% else %} +{{ tripinfo.arrival.strftime('%H:%M') }} +{% endif %} +{% endif %} +
    + +
    +{% if tripinfo.platform %} +Steig {{ tripinfo.platform }} +{% else %} +  +{% endif %} +
    + +
    +{% if tripinfo.arrival %} +Ab: +{% if tripinfo.departureDelay %} +{{ tripinfo.departure.strftime('%H:%M') }} +
    Plan: {{ tripinfo.plannedDeparture.strftime('%H:%M') }} +{% else %} +{{ tripinfo.departure.strftime('%H:%M') }} +{% endif %} +{% endif %} +
    + +
    + +