-
Notifications
You must be signed in to change notification settings - Fork 0
/
MMM-FSAPI.njk
45 lines (41 loc) · 1.77 KB
/
MMM-FSAPI.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
<div class="fsapi">
{% if loading %}
<div class="dimmed light small">{{ phrases.loading | safe }}</div>
{% else %}
{% if data.power == 0 %}
<div class="header">{{ data.friendlyName }}</div>
{% else %}
<div class="header">{{ data.friendlyName }} - {{ data.display }}</div>
{% if data.graphicUri != "" or data.graphicUriStation != "" %}
<div class="cover">
{% if data.graphicUri != "" %}
<img id="albumCover" graphicUri src="{{ data.graphicUri }}" />
{% else %}
<img id="albumCover" graphicUriStation src="{{ data.graphicUriStation }}" />
{% endif %}
</div>
{% endif %}
<div class="info">
{% if data.artist != "" %}
<div id="name">{{ data.line1 }}</div>
<div id="artist">{{ data.artist }}</div>
<div id="album">{{ data.album }}</div>
{% elif data.type === "FM" %}
<div id="name">{{ data.line1 }}</div>
{% if config.showPI %}
<div id="pi">{{ data.pi }}</div>
{% endif %}
{% elif data.type === "DAB" %}
<div id="name">{{ data.line2 }}</div>
<div id="text">{{ data.line1 }}</div>
{% if config.showPI %}
<div id="pi">{{ data.pi }}</div>
{% endif %}
{% else %}
<div id="name">{{ data.line2 }}</div>
<div id="text">{{ data.line1 }}</div>
{% endif %}
</div>
{% endif %}
{% endif %}
</div>