Weather: default to 5-day forecast, add weekday+date header line

- forecast_days now defaults to 5 (was 3) across default_settings(),
  check()'s fallback, and the settings form's pre-selected option.
- New show_date setting (on by default): weekday + date in the same
  "Samstag, 25. Juli" format Clock already used. Combined with the
  city name into one header line above the icon/temp block when both
  are on ("Münster · Samstag, 25. Juli"), each independently
  toggleable.
- Moved the weekday/month name lists and the "Weekday, D. Month"
  formatting out of clock.py into render_utils.format_date_de(), so
  Weather reuses the exact same formatting instead of a second copy
  that could drift.
This commit is contained in:
Honey committed 2026-07-25 10:38:14 +02:00
1 parent 78337a99d2
commit 7601f746fe
5 files changed
+50 -32

No files matched your search

+6 -2
View File
@@ -24,8 +24,8 @@
<div class="field">
<label for="forecast_days">Days to show</label>
<select id="forecast_days" name="forecast_days">
<option value="3" {{ "selected" if settings.forecast_days == 3 or not settings.forecast_days }}>3 days</option>
<option value="5" {{ "selected" if settings.forecast_days == 5 }}>5 days</option>
<option value="3" {{ "selected" if settings.forecast_days == 3 }}>3 days</option>
<option value="5" {{ "selected" if settings.forecast_days == 5 or not settings.forecast_days }}>5 days</option>
<option value="7" {{ "selected" if settings.forecast_days == 7 }}>7 days</option>
</select>
</div>
@@ -39,6 +39,10 @@
<input type="checkbox" name="show_city" {{ "checked" if settings.show_city != False }}>
City name
</label>
<label class="checkbox">
<input type="checkbox" name="show_date" {{ "checked" if settings.show_date != False }}>
Weekday + date
</label>
<label class="checkbox">
<input type="checkbox" name="show_hourly_graph" {{ "checked" if settings.show_hourly_graph != False }}>
Hourly temperature graph