-
Notifications
You must be signed in to change notification settings - Fork 0
/
MMM-NexusMetroRTI.njk
72 lines (72 loc) · 1.86 KB
/
MMM-NexusMetroRTI.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{# Copyright (C) 2024 jcktwd #}
<i class="
NMRTI_METRO_LOGO
fa-solid
icon-twmetro-logo
{% if config.colorize %}
NMRTI_YELLOW
{% endif %}
"
style="visibility:{{ "visible" if config.showStation else "hidden" }}"
></i>
<div class="NMRTI_CONTENT">
<div
class="NMRTI_HEADER_TEXT">
<span
class="NMRTI_STATION"
style="display:{{ "block" if config.showStation else "none" }};">
{{ data.station }}
</span>
<span
class="NMRTI_PLATFORM"
style="display:{{"block" if config.showPlatform else "none" }};">
{{ data.platform }}
</span>
</div>
<div class="NMRTI_TRAIN_LIST">
{% if data.trains.length === 0 %}
<div class="NMRTI_TRAIN_ITEM">
<i class="NMRTI_TRAIN_ICON fa-solid fa-triangle-exclamation"></i>
<div class="NMRTI_TRAIN_DESC">
No trains
</div>
</div>
{% else %}
{% for train in data.trains %}
<div class="NMRTI_TRAIN_ITEM">
<i class="NMRTI_TRAIN_ICON fa-solid icon-twmetro-train
{% if config.colorize %}
NMRTI_{{ train.line }}
{% endif %}
">
</i>
<div class="NMRTI_TRAIN_TEXT">
<span
class="NMRTI_DESTINATION
{% if config.colorize %}
NMRTI_{{ train.line }}
{% endif %}
"
style="display:{{ "block" if config.showDestination else "none" }};">
{{ train.destination }}
</span>
<span
class="NMRTI_LOCATION"
style="display:{{ "block" if config.showLocation else "none" }};">
{{ train.locationString }}
</span>
</div>
<span
class="NMRTI_ETA"
style="display:{{ "block" if config.showDueIn else "none" }};">
{% if train.dueIn == -1 %}
Arr
{% elif train.dueIn == 0 %}
Due
{% else %}
{{ train.dueIn }}m
{% endif %}
</span>
</div>
{% endfor %}
{% endif %}