-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMMM-MeteoFrance.njk
173 lines (151 loc) · 6.77 KB
/
MMM-MeteoFrance.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<div class="wrapper">
{% if loading or error %}
<div class="current-conditions-wrapper">
<span class="current-conditions">
{% if error %}
<img class="icon" src="modules/MMM-MeteoFrance/resources/error.svg" />
<div class="small">{{ phrases.error | safe }}</div>
{% else %}
<div class="loadingDisplayer">
<div class="loadingDisplayerLogo"><img class="loadingLogo" src="modules/MMM-MeteoFrance/resources/logo.png"></img></div>
<div class="loadingDisplayerVideo">
<video autoplay muted loop class="loadingVideo" src="modules/MMM-MeteoFrance/resources/splash_video.mp4"></video>
</div>
</div>
{% endif %}
</span>
</div>
{% else %}
{# -------------- Current Conditions -------------- #}
{% if config.display.CurrentConditions %}
<div class="background {{ forecast.currently.background }}"></div>
{% if forecast.place %}
<div class="place">{{ forecast.place }}</div>
{% endif %}
<div class="current-conditions {% if forecast.place %}withPlace{% endif %}">
<img class="icon" src="{{ forecast.currently.iconPath }}" />
<div class= "temperatures-container">
<span class="temperature large light">{{ forecast.currently.temperature }}</span>
{% if config.display.Feels %}
<span class="feels-temperature">{{ forecast.currently.feels }}</span>
{% endif %}
</div>
</div>
{% endif %}
{# -------------- Extra Current Conditions -------------- #}
{% if config.display.ExtraCurrentConditions %}
<div class="extra-current-conditions small">
<div class="sun-container">
{% if config.display.SunCondition %}
<span class="wi wi-sunrise"></span>
<span class="sun-time"> {{ forecast.currently.sunRise }}</span>
<span class="wi wi-sunset"></span>
<span class="sun-time"> {{ forecast.currently.sunSet }}</span>
{% endif %}
{% if config.display.UV %}
<span class="uv-container">
<span class="inline-icon icon_uv"></span>
<span class="uv{{ forecast.currently.uv }}"> {{ forecast.currently.uv }}</span>
</span>
{% endif %}
</div>
<div class="temperature-container">
<span class="wi wi-thermometer"></span>
<span class="low-temperature">{{ forecast.currently.tempRange.low }}</span>
<span class="temperature-separator">/</span>
<span class="high-temperature">{{ forecast.currently.tempRange.high }}</span>
</div>
<div class="Precip-humidity-container">
{% if config.display.Precipitation %}
<span class="precipitation-container">
<span class="wi wi-raindrop"></span>
{% if forecast.currently.precipitation.accumulation %}
<span class="pop">{{ forecast.currently.precipitation.accumulation }}</span>
{% endif %}
</span>
{% endif %}
{% if config.display.Humidity %}
<span class="wi wi-humidity"></span>
<span class="humidity"> {{ forecast.currently.humidity }}</span>
{% endif %}
</div>
{% if config.display.Wind %}
<div class="wind-container">
<span class="wi wi-wind-beaufort-{{ forecast.currently.wind.Beaufort }}"></span>
<span class="wind-speed">{{ forecast.currently.wind.windSpeed }}</span>
{% if forecast.currently.wind.windIcon %}
<img class="feels-sun-container inline-icon arrowIcon" src="{{ forecast.currently.wind.windIcon }}" />
{% endif %}
</div>
{% if forecast.currently.wind.windSpeedGust %}
<div class="wind-alert-container">
<span class="wi wi-strong-wind"></span>
<span class="wind-speed-gust">RAFALES {{ forecast.currently.wind.windSpeedGust }}</span>
</div>
{% endif %}
{% endif %}
</div>
{% endif %}
{# -------------- description -------------- #}
{% if config.display.Summary %}
<div class="description small">{{ forecast.summary }}</div>
{% endif %}
{# -------------- Forecast -------------- #}
{% if config.display.HourlyForecast or config.display.DailyForecast %}
<div class="forecast-container">
{# Hourly #}
{% if config.display.HourlyForecast %}
{% for h in forecast.hourly %}
<div class="forecast-item daily">
{#<span class="time">{{ h.time }}</span>#}
<span class="time wi wi-time-{{ h.time }}"></span>
<span class="forecast-icon-container">
<img class="forecast-icon" src="{{ h.iconPath }}" />
</span>
<span class="temperature small">{{ h.temperature }}</span>
{% if config.display.Wind %}
<span class="beaufort">
<span class="wi wi-wind-beaufort-{{ h.wind.Beaufort }}"></span>
</span>
<span class="wind-container">
<span class="wind-speed">{{ h.wind.windSpeed }}</span>
</span>
<span class="forecast-icon-arrow-container">
<img class="inline-icon wind arrowIcon" src="{{ h.wind.windIcon }}" />
</span>
{% endif %}
</div>
{% endfor %}
{% endif %}
{# Daily #}
{% if config.display.DailyForecast %}
{% for d in forecast.daily %}
<div class="forecast-item daily">
<span class="day-name">{{ d.day }}</span>
<span class="forecast-icon-container">
<img class="forecast-icon" src="{{ d.iconPath }}" />
</span>
<span class="temperature-container small">
<span class="low-temperature">{{ d.tempRange.low }}</span>
<span class="temperature-separator">/</span>
<span class="high-temperature">{{ d.tempRange.high }}</span>
</span>
{% if config.display.Wind %}
<span class="beaufort">
<span class="wi wi-wind-beaufort-{{ d.wind.Beaufort }}"></span>
</span>
<span class="wind-container">
<span class="wind-speed">{{ d.wind.windSpeed }}</span>
</span>
<span class="forecast-icon-arrow-container">
<img class="inline-icon arrowIcon" src="{{ d.wind.windIcon }}" />
</span>
{% endif %}
</div>
{% endfor %}
{% endif %}
</div>
{% endif %}
<div class="last_update small dimmed">Mise à jour depuis Météo France, le {{ update }}</div>
{% endif %}
</div>