summaryrefslogtreecommitdiff
path: root/templates/departure_list.html
blob: 08be97ea13731ab138707a8f2700d2b9aeb7c839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% for departure in departures %}
	<li class="{{ departure.classes }}" data-timestamp="{{ departure.sort_by }}">
		{% if departure.line.productName and departure.line.fahrtNr %}
			<div class="anchor" id="{{departure.line.productName}}{{departure.line.fahrtNr}}">
		{% endif %}
		<a href="/trip/{{ departure.tripId }}?line={{ departure.quoted_line_name }}&amp;highlight={{ departure.quoted_stop_name }}&amp;platform={{ departure.quoted_platform() }}">
			<span class="line {{ departure.line.css_class }}">{{ departure.line.name }}</span>
			{% if departure.direction_area %}
				<span class="destsuffix">{{ departure.direction_area }}</span>
			{% endif %}
			<span class="dest" aria-label="nach {{ departure.direction_stop }}">{{ departure.direction_stop }}
			</span>
			{% if departure.cancelled and departure.plannedWhen %}
				<span class="time" aria-label="fällt aus, planmäßige Abfahrt um {{ departure.plannedWhen }}">
					{{ 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>
					{% elif departure.delay is none %}
						<span class="no-realtime" aria-hidden="true"><i class="material-icons">gps_off</i></span>
					{% endif %}
					{{ departure.relativeWhen }}
				</span>
			{% endif %}
			{% if departure.cancelled %}
				<span class="cancelled" aria-hidden="true">entfällt</span>
			{% elif departure.platform %}
				<span class="platform" aria-label="Steig {{ departure.platform }}">{{ departure.platform }}</span>
			{% endif %}
		</a>
	</li>
{% endfor %}