2020-08-01 02:59:08 -04:00
|
|
|
{% if hourly or weatherData %}
|
|
|
|
{% if weatherData %}
|
|
|
|
{% set hourly = weatherData.hours %}
|
|
|
|
{% endif %}
|
|
|
|
{% set numSteps = hourly | calcNumEntries %}
|
2020-06-30 02:40:41 -04:00
|
|
|
{% set currentStep = 0 %}
|
|
|
|
<table class="{{ config.tableClass }}">
|
2020-08-01 02:59:08 -04:00
|
|
|
{% set hours = hourly.slice(0, numSteps) %}
|
2020-06-30 02:40:41 -04:00
|
|
|
{% for hour in hours %}
|
|
|
|
<tr {% if config.colored %}class="colored"{% endif %} {% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}>
|
2020-07-01 05:08:04 -04:00
|
|
|
<td class="day">{{ hour.date | formatTime }}</td>
|
2020-06-30 02:40:41 -04:00
|
|
|
<td class="bright weather-icon"><span class="wi weathericon wi-{{ hour.weatherType }}"></span></td>
|
2020-07-01 05:08:04 -04:00
|
|
|
<td class="align-right bright">
|
2020-06-30 02:40:41 -04:00
|
|
|
{{ hour.temperature | roundValue | unit("temperature") }}
|
|
|
|
</td>
|
|
|
|
{% if config.showPrecipitationAmount %}
|
|
|
|
<td class="align-right bright precipitation">
|
|
|
|
{{ hour.precipitation | unit("precip") }}
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% set currentStep = currentStep + 1 %}
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<div class="dimmed light small">
|
2021-01-20 13:47:32 -05:00
|
|
|
{{ "LOADING" | translate }}
|
2020-06-30 02:40:41 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2020-08-01 02:59:08 -04:00
|
|
|
<!-- Uncomment the line below to see the contents of the `hourly` object. -->
|
|
|
|
<!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{weatherData | dump}}</div> -->
|