agenda/templates
Edward Betts 672ca4b849 Generalize and enhance yearly statistics
The accommodation page has been updated to provide a more comprehensive and dynamic view of travel statistics.

Previously, the page only displayed hard-coded statistics for total nights away and abroad for the year 2024. This required manual updates each year and didn't provide historical context.

This commit introduces the following changes:

*   **Dynamically Calculate Yearly Stats:** The `accommodation_list` view in `web_view.py` now calculates statistics for every year found in the accommodation data. It correctly handles stays that span across multiple years.
*   **Display All Years:** The `accommodation.html` template now iterates through a list of all calculated yearly stats, displaying a summary for each year automatically.
*   **Add Percentage of Year:** The template also calculates and displays what percentage of the year the "total nights" and "nights abroad" represent. This includes logic to correctly account for leap years (366 days) for an accurate calculation.

These changes make the statistics more informative and ensure the page remains relevant over time without needing further manual code adjustments.
2025-07-23 22:52:22 +01:00
..
trip Add CO2 breakdown by transport type to trip list and detail pages 2025-07-15 16:57:19 +02:00
accommodation.html Generalize and enhance yearly statistics 2025-07-23 22:52:22 +01:00
base.html Avoid CDN for frontend CSS and Javascript 2024-03-30 10:18:21 +00:00
birthday_list.html Show year on birthday page 2024-07-15 02:23:13 +08:00
calendar.html Add missing calendar template 2024-06-19 22:16:22 +01:00
conference_list.html Add conference count display to conference list sections 2025-07-15 11:28:15 +02:00
event_list.html Current trip summary on index page 2025-01-11 15:29:07 -06:00
gaps.html Fix text wrapping on gaps page 2024-09-02 09:00:37 +01:00
holiday_list.html Ensure all pages have a title 2024-04-16 22:01:16 +01:00
launches.html Show space launch images 2025-01-11 15:05:17 -06:00
macros.html Fix flightradar24 URL to use IATA code over ICAO 2025-07-21 07:34:47 +02:00
meteors.html Add meteor info page 2025-07-16 12:42:21 +02:00
navbar.html Add meteor info page 2025-07-16 12:42:21 +02:00
schengen_report.html Use get_country for Schengen report 2025-07-15 18:12:11 +02:00
show_error.html Ensure all pages have a title 2024-04-16 22:01:16 +01:00
travel.html Show CO₂ for flights on travel page. 2025-05-26 04:48:13 -05:00
trip_debug.html Add debug page for trip objects 2025-07-16 11:25:17 +02:00
trip_list_text.html Add page to generate a list of trips as text 2024-01-30 10:35:57 +00:00
trip_page.html Add CO2 breakdown by transport type to trip list and detail pages 2025-07-15 16:57:19 +02:00
weekends.html Use None in place of "Bristol" for home 2025-07-16 07:55:20 +02:00