mirror of
https://github.com/MichMich/MagicMirror.git
synced 2026-06-09 11:45:27 +00:00
Since the project's inception, I've missed a clear separation between default and third-party modules. This increases complexity within the project (exclude `modules`, but not `modules/default`), but the mixed use is particularly problematic in Docker setups. Therefore, with this pull request, I'm moving the default modules to a different directory. ~~I've chosen `default/modules`, but I'm not bothered about it; `defaultmodules` or something similar would work just as well.~~ Changed to `defaultmodules`. Let me know if there's a majority in favor of this change.
47 lines
2.2 KiB
Plaintext
47 lines
2.2 KiB
Plaintext
{% if forecast %}
|
|
{% 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(config.forecastDateFormat) }}</td>
|
|
{% endif %}
|
|
<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>
|
|
{% else %}
|
|
<div class="dimmed light small">{{ "LOADING" | translate }}</div>
|
|
{% endif %}
|
|
<!-- Uncomment the line below to see the contents of the `forecast` object. -->
|
|
<!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{ forecast | dump }}</div> -->
|