{% extends "base.html" %} {% from "_header.html" import nav_btns, settings_btn, title_block, section_tabs %} {% block title %}Weather · Dashboard{% endblock %} {% block page %}
{# the grid's "head" area: the bar + the sub-heading under it #}
{{ nav_btns() }} {% set cur = v.tabs | selectattr("on") | first %} {{ title_block("Weather", "/weather" ~ (("?loc=" ~ cur.idx) if cur and cur.idx else "")) }} {{ settings_btn("weather") }}
{% if v.tabs|length > 1 %}{# the place: click → the other places (no browser dialogs) #}
{{ v.location }} ▾
{% for t in v.tabs %}{{ t.name }}{% endfor %}
{% else %}{{ v.location }}{% endif %}{% if v.updated %} · {{ v.updated }}{% endif %} · Open-Meteo
{% if plugin_section("weather").tabs | length > 1 %}{{ section_tabs("weather", "/weather") }}{% endif %}{# Forecast | Stations #}
{% if v.status %}
Weather for {{ v.location }} could not be loaded ({{ v.status }}). Reload the page to try again.
{% else %} {% set n = v.now %} {# ---- left: now + its values, then the sun's arc | air quality (as the phone app) ---- #}
{{ n.temp }}
{{ n.desc }}
feels {{ n.feels }} · {{ n.hl }}
{% for g, value, tip, deg in n.stats %}
{% if g == "wind" %}{% else %}{{ g }}{% endif %}{{ value }}
{% endfor %}
{% set s = n.sun %}
{% if s.day %}{% endif %} {% if s.day %}{% endif %}
{{ s.daylight }}
↑ {{ s.rise }}↓ {{ s.set }}
{% if v.aq %}{% set a = v.aq %}
Air quality
{{ a.aqi }}{{ a.label }}
{% for name, val in a.parts[:2] %}{{ name }} {{ "%.0f" | format(val) }}{% if not loop.last %} · {% endif %}{% endfor %}
{% endif %}
{# ---- right top: next 48 hours ---- #} {% set h = v.hourly %}
Next 48 hours
TemperatureFeels likeRain chanceWind / gusts {{ v.spd_u }}
{% for t in h.ticks %}
{{ t.hour }}
{% endfor %}
{% for d in h.days %} {{ d.label }}{% endfor %} {% for b in h.bars %}{% endfor %} {% for t in h.ticks %} {{ t.temp }} {% if t.rain >= 10 %}{{ t.rain }}%{% endif %}{% endfor %}
{% for w in h.wind %}
{{ w.speed }}/{{ w.gust }}
{% endfor %}
{# ---- right bottom: 14 days ---- #}
14 days
{% for d in v.days %}
{{ d.label }}
{{ d.date }}
{{ d.hi }}
{{ d.lo }}
{{ d.rain_p }}{{ d.rain_mm }} mm
{{ d.wind }}
UV {{ d.uv }}
{% endfor %}
{% endif %} {% endblock %}