-
Notifications
You must be signed in to change notification settings - Fork 1
/
eta.njk
54 lines (54 loc) · 2.08 KB
/
eta.njk
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{% if currentETA %}
<table class="{{ config.tableClass }}">
{% if config.showHeader %}
<tr>
<th class="align-left bright">
{{ "LINE" | translate }}
</th>
<th class="align-left bright">
{{ "DESTINATION" | translate }}
</th>
<th class="align-right bright">
{{ "DEPARTURE" | translate }}
</th>
</tr>
{% endif %}
{% for f in currentETA %}
{% if f.etas | length %}
{% for eta in f.etas %}
<tr {% if config.colored %} class="colored" {% endif %}>
{% if f.line and loop.first %}
<td rowspan="{{ f.etas.length }}" class="align-left bright">
{{ f.line }}
</td>
{% endif %}
<td class="align-left bright">
{{ eta.dest }}
</td>
<td class="align-right bright">
{% if config.displayRelativeTime %}
{{ eta.time | fromNow }}
{% else %}
{{ eta.time | formatTime }}
{% endif %}
</td>
</tr>
{% endfor %}
{% else %}
<div class="dimmed light small">
{{ "EMPTY" | translate }}
</div>
{% endif %}
{% endfor %}
</table>
{% elseif error %}
<div class="small dimmed">
{{ "MODULE_CONFIG_ERROR" | translate({MODULE_NAME: "MMM-HK-Transport-ETA", ERROR: error}) | safe }}
</div>
{% else %}
<div class="dimmed light small">
{{ "LOADING" | translate }}
</div>
{% endif %}
<!-- Uncomment the line below to see the contents of the `forecast` object. -->
<!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{forecast | dump}}</div> -->