From f5a6a5927bfcc4a2b82c34db5041bfe3a49b95e6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 21 Aug 2021 12:11:35 +0200 Subject: refresh departure list every minute --- templates/departure_list.html | 81 +++++++++++++------------------------------ 1 file changed, 24 insertions(+), 57 deletions(-) (limited to 'templates/departure_list.html') diff --git a/templates/departure_list.html b/templates/departure_list.html index a9cda01..66e2900 100644 --- a/templates/departure_list.html +++ b/templates/departure_list.html @@ -1,59 +1,26 @@ - - - - {{ title }} - {% include 'header.html' %} - - - -{% include 'navbar.html' %} - -
-
- {% if warning %} -
-
- {{ warning["lead"] }} - {{ warning["body"] }} -
{{ warning["code"] }}
-
-
+{% for departure in departures %} +
  • + {{ departure.line.name }} + {% if departure.suffix %} + {{ departure.suffix }} {% endif %} - {% if not departures %} -
    Keine Abfahrten innerhalb der nächsten zwei Stunden
    + {{ departure.direction }} + + {% if departure.cancelled and departure.plannedWhen %} + + fällt aus + {{ departure.plannedWhen.strftime("%H:%M") }} + + {% else %} + + {% if departure.delay %} + ({{ departure.delay }}) + {% endif %} + {{ departure.relativeWhen }} + {% endif %} -
      - {% for departure in departures %} -
    • - {{ departure.line.name }} - {% if departure.suffix %} - {{ departure.suffix }} - {% endif %} - {{ departure.direction }} - - {% if departure.cancelled and departure.plannedWhen %} - - fällt aus - {{ departure.plannedWhen.strftime("%H:%M") }} - - {% else %} - - {% if departure.delay %} - ({{ departure.delay }}) - {% endif %} - {{ departure.relativeWhen }} - - {% endif %} - {% if departure.platform %} - {{ departure.platform }} - {% endif %} -
    • - {% endfor %} -
    -
  • -
    - -{% include 'footer.html' %} - - - + {% if departure.platform %} + {{ departure.platform }} + {% endif %} + +{% endfor %} -- cgit v1.2.3