2021-01-23 10:45:55 +01:00
|
|
|
{% if forecast %}
|
2025-09-11 13:10:53 +02:00
|
|
|
{% set numSteps = forecast | calcNumSteps %}
|
|
|
|
{% set currentStep = 0 %}
|
|
|
|
<table class="{{ config.tableClass }}">
|
|
|
|
{% if config.ignoreToday %}
|
|
|
|
{% set forecast = forecast.splice(1) %}
|
|
|
|
{% endif %}
|
|
|
|
{% set forecast = forecast.slice(0, numSteps) %}
|
|
|
|
{% for f in forecast %}
|
|
|
|
<tr
|
|
|
|
{% if config.colored %}class="colored"{% endif %}
|
|
|
|
{% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}
|
|
|
|
>
|
|
|
|
{% if (currentStep == 0) and config.ignoreToday == false and config.absoluteDates == false %}
|
|
|
|
<td class="day">{{ "TODAY" | translate }}</td>
|
|
|
|
{% elif (currentStep == 1) and config.ignoreToday == false and config.absoluteDates == false %}
|
|
|
|
<td class="day">{{ "TOMORROW" | translate }}</td>
|
|
|
|
{% else %}
|
|
|
|
<td class="day">{{ f.date.format("ddd") }}</td>
|
2021-08-01 09:39:07 +02:00
|
|
|
{% endif %}
|
2025-09-11 13:10:53 +02:00
|
|
|
<td class="bright weather-icon">
|
|
|
|
<span class="wi weathericon wi-{{ f.weatherType }}"></span>
|
|
|
|
</td>
|
|
|
|
<td class="align-right bright max-temp">{{ f.maxTemperature | roundValue | unit("temperature") | decimalSymbol }}</td>
|
|
|
|
<td class="align-right min-temp">{{ f.minTemperature | roundValue | unit("temperature") | decimalSymbol }}</td>
|
|
|
|
{% if config.showPrecipitationAmount %}
|
|
|
|
<td class="align-right bright precipitation-amount">{{ f.precipitationAmount | unit("precip", f.precipitationUnits) }}</td>
|
|
|
|
{% endif %}
|
|
|
|
{% if config.showPrecipitationProbability %}
|
|
|
|
<td class="align-right bright precipitation-prob">{{ f.precipitationProbability | unit('precip', '%') }}</td>
|
|
|
|
{% endif %}
|
|
|
|
{% if config.showUVIndex %}
|
|
|
|
<td class="align-right dimmed uv-index">
|
|
|
|
{{ f.uv_index }}
|
|
|
|
<span class="wi dimmed weathericon wi-hot"></span>
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% set currentStep = currentStep + 1 %}
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
2018-07-02 15:43:24 +02:00
|
|
|
{% else %}
|
2025-09-11 13:10:53 +02:00
|
|
|
<div class="dimmed light small">{{ "LOADING" | translate }}</div>
|
2018-05-21 10:57:22 +02:00
|
|
|
{% endif %}
|
2019-05-14 15:00:30 -05:00
|
|
|
<!-- Uncomment the line below to see the contents of the `forecast` object. -->
|
2025-09-11 13:10:53 +02:00
|
|
|
<!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{ forecast | dump }}</div> -->
|