diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-08-21 12:11:35 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-08-21 12:11:35 +0200 |
commit | f5a6a5927bfcc4a2b82c34db5041bfe3a49b95e6 (patch) | |
tree | d9508512ae32be6ecc865607539c16566db2756e /templates/departure_list.html | |
parent | 8a04cf20c5d6dc577a7de7745cbeb292bf78529d (diff) |
refresh departure list every minute0.2.0
Diffstat (limited to 'templates/departure_list.html')
-rw-r--r-- | templates/departure_list.html | 81 |
1 files changed, 24 insertions, 57 deletions
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 @@ -<!DOCTYPE html> -<html lang="de"> -<head> - <title>{{ title }}</title> - {% include 'header.html' %} -</head> -<body> - -{% include 'navbar.html' %} - -<div class="container"> - <div class="content"> - {% if warning %} - <div class="content"> - <div class="warning"> - <strong>{{ warning["lead"] }}</strong> - {{ warning["body"] }} - <div class="errcode">{{ warning["code"] }}</div> - </div> - </div> +{% for departure in departures %} + <li class="{{ departure.classes }}" onclick="location.href='https://dbf.finalrewind.org/map/{{ departure.tripId }}/0?from={{ departure.quoted_stop_name }}';"> + <span class="line {{ departure.line.css_class }}">{{ departure.line.name }}</span> + {% if departure.suffix %} + <span class="destsuffix">{{ departure.suffix }}</span> {% endif %} - {% if not departures %} - <div class="globalnote">Keine Abfahrten innerhalb der nächsten zwei Stunden</div> + <span class="dest" aria-label="nach {{ departure.direction }}">{{ departure.direction }} + </span> + {% if departure.cancelled and departure.plannedWhen %} + <span class="time" aria-label="fällt aus, planmäßige Abfahrt um {{ departure.plannedWhen }}"> + <span class="delay">fällt aus</span> + {{ departure.plannedWhen.strftime("%H:%M") }} + </span> + {% else %} + <span class="time" aria-label="Abfahrtszeit: {{ departure.relativeWhen }}"> + {% if departure.delay %} + <span class="delay" aria-label="{{ departure.delay }} Minuten Verspätung">({{ departure.delay }})</span> + {% endif %} + {{ departure.relativeWhen }} + </span> {% endif %} - <ul class="departures"> - {% for departure in departures %} - <li class="{{ departure.classes }}" onclick="location.href='https://dbf.finalrewind.org/map/{{ departure.tripId }}/0?from={{ departure.quoted_stop_name }}';"> - <span class="line {{ departure.line.css_class }}">{{ departure.line.name }}</span> - {% if departure.suffix %} - <span class="destsuffix">{{ departure.suffix }}</span> - {% endif %} - <span class="dest" aria-label="nach {{ departure.direction }}">{{ departure.direction }} - </span> - {% if departure.cancelled and departure.plannedWhen %} - <span class="time" aria-label="fällt aus, planmäßige Abfahrt um {{ departure.plannedWhen }}"> - <span class="delay">fällt aus</span> - {{ departure.plannedWhen.strftime("%H:%M") }} - </span> - {% else %} - <span class="time" aria-label="Abfahrtszeit: {{ departure.relativeWhen }}"> - {% if departure.delay %} - <span class="delay" aria-label="{{ departure.delay }} Minuten Verspätung">({{ departure.delay }})</span> - {% endif %} - {{ departure.relativeWhen }} - </span> - {% endif %} - {% if departure.platform %} - <span class="platform" aria-label="Gleis/Bussteig {{ departure.platform }}">{{ departure.platform }}</span> - {% endif %} - </li> - {% endfor %} - </ul> - </div> -</div> - -{% include 'footer.html' %} - -</body> -</html> + {% if departure.platform %} + <span class="platform" aria-label="Gleis/Bussteig {{ departure.platform }}">{{ departure.platform }}</span> + {% endif %} + </li> +{% endfor %} |