summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-05-30 18:03:49 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-05-30 18:03:49 +0200
commitdfbbf9fead33864c196ec6097b5360bfb45b610b (patch)
tree465edec4e6c18cbdfa94d96348a3c6cb1090cbab /templates
parent886b9e56dc515c6536129711494f91262d402214 (diff)
proper departure list and css
Diffstat (limited to 'templates')
-rw-r--r--templates/departure_list.html19
1 files changed, 15 insertions, 4 deletions
diff --git a/templates/departure_list.html b/templates/departure_list.html
index 464951b..37f259b 100644
--- a/templates/departure_list.html
+++ b/templates/departure_list.html
@@ -21,10 +21,21 @@
<div class="content">
<ul class="departures">
{% for departure in departures %}
- <li onclick="location.href='https://dbf.finalrewind.org/map/{{ departure.tripId }}/0';">
- <span class="line {{ departure.line.mode }}">{{ departure.line.name }}</span>
- <span class="dest" aria-label="nach {{ departure.direction }}">{{ departure.direction }}</span>
- <span class="time" aria-label="um {{ departure.when.strftime('%H:%M') }}">{{ departure.when.strftime('%H:%M') }}</span>
+ <li class="{{ departure.classes }}" onclick="location.href='https://dbf.finalrewind.org/map/{{ departure.tripId }}/0';">
+ <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="um {{ departure.plannedWhen }}">{{ departure.plannedWhen.strftime("%H:%M") }}</span>
+ {% else %}
+ <span class="time" aria-label="in {{ departure.relativeWhen }}">{{ departure.relativeWhen }}</span>
+ {% endif %}
+ {% if departure.platform %}
+ <span class="platform" aria-label="Gleis/Bussteig {{ departure.platform }}">{{ departure.platform }}</span>
+ {% endif %}
</li>
{% endfor %}
</ul>