forked from CFenner/MMM-Netatmo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netatmo.bubbles.njk
55 lines (55 loc) · 2.15 KB
/
netatmo.bubbles.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
<div class="netatmo {{ 'horizontal' if horizontal }}">
{% if loaded %}
<ul>
{% for module in moduleList %}
<li>
{% if showModuleNameOnTop %}
<div class="room {{ fontClassModuleName }}">{{ module.name }}</div>
{% endif %}
<div>
<table>
<tbody>
<tr>
<td class="primary">
<div class="{{ module.primary.class }}">
<div class="light bright {{ fontClassPrimary }}">{{ module.primary.value | safe }}</div>
<div class="xsmall">{{ module.primary.unit }}</div>
</div>
</td>
<td class="secondary">
<div class="{{ module.secondary.class }}">
<div class="visual {{ module.secondary.visualClass }}"></div>
<div class="value {{ fontClassSecondary }}">{{ module.secondary.value | safe }}{{ module.secondary.unit}}</div>
</div>
</td>
<td class="data">
{% for measurement in module.measurementList %}
<div class="{{ fontClassMeasurement }}">
{% if showMeasurementLabel %}
<span>{{ measurement.label|safe }}</span>
{% endif %}
{% if showMeasurementIcon and not measurement.icon == '' %}
<i class="fas fa-fw {{ measurement.icon }}"></i>
{% endif %}
<span class="value">{{ measurement.value|safe }}</span>
<span class="unit">{{ measurement.unit }}</span>
</div>
{% endfor %}
{# <div class="small flash">letzter Kontakt: vor 37 Minuten</div> #}
</td>
</tr>
</tbody>
</table>
</div>
{% if not showModuleNameOnTop %}
<div class="room {{ fontClassModuleName }}">{{ module.name }}</div>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<div class="dimmed light small">
{{ labelLoading|safe }}
</div>
{% endif %}
</div>