Add OpenWeatherMap weather forecasts. Closes #48
Show 8-day Bristol home weather on the index and weekends pages. Show destination weather per day on the trip list and trip page. Cache forecasts in ~/lib/data/weather/ and refresh via update.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
61e17d9c96
commit
b4f0a5bf5d
7 changed files with 217 additions and 0 deletions
|
|
@ -70,6 +70,19 @@
|
|||
Sunset: {{ sunset.strftime("%H:%M:%S") }}</li>
|
||||
</ul>
|
||||
|
||||
{% if home_weather %}
|
||||
<div class="mb-2">
|
||||
<strong>Bristol weather:</strong>
|
||||
{% for day in home_weather %}
|
||||
<span class="me-3 text-nowrap">
|
||||
<small class="text-muted">{{ day.date_obj.strftime("%-d %b") }}</small>
|
||||
<img src="https://openweathermap.org/img/wn/{{ day.icon }}.png" alt="{{ day.status }}" title="{{ day.detailed_status }}" width="25" height="25">
|
||||
{{ day.temp_min }}–{{ day.temp_max }}°C
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if errors %}
|
||||
{% for error in errors %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue