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
|
|
@ -12,8 +12,10 @@
|
|||
<th class="text-end">Date</th>
|
||||
<th>Saturday</th>
|
||||
<th>Saturday Location</th>
|
||||
<th>Saturday Weather</th>
|
||||
<th>Sunday</th>
|
||||
<th>Sunday Location</th>
|
||||
<th>Sunday Weather</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -51,6 +53,13 @@
|
|||
{{ city }}, {{ country.flag }} {{ country.name }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if extra_class %}<td class="{{ extra_class|trim }}">{% else %}<td>{% endif %}
|
||||
{% set w = weekend[day + '_weather'] %}
|
||||
{% if w %}
|
||||
<img src="https://openweathermap.org/img/wn/{{ w.icon }}.png" alt="{{ w.status }}" title="{{ w.detailed_status }}" width="25" height="25">
|
||||
{{ w.temp_min }}–{{ w.temp_max }}°C
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue