Commit graph

239 commits

Author SHA1 Message Date
Edward Betts 3dd322475f Show ferry detail on individual trip page
Closes: #154
2025-07-24 22:30:31 +01:00
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
Edward Betts 72940be3d2 Fix flightradar24 URL to use IATA code over ICAO
Fixes #165
2025-07-21 07:34:47 +02:00
Edward Betts 37e74404d5 Add meteor info page
Fixes #164
2025-07-16 12:42:21 +02:00
Edward Betts 0e2c95117c Add debug page for trip objects
Add /trip/<start>/debug endpoint that displays the complete trip object
data in pretty-printed JSON format with syntax highlighting. Includes
both raw data and computed properties for debugging purposes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 11:25:17 +02:00
Edward Betts 02350ef4db Use None in place of "Bristol" for home
Also fix some more location bugs.
2025-07-16 07:55:20 +02:00
Edward Betts 663dc479c2 Weekends: Don't both showing 'home' when home. 2025-07-16 04:30:13 +02:00
Edward Betts af492750cb Add location tracking to weekend page
Weekend page now shows specific location (city and country) for each
Saturday and Sunday based on travel history:

- Analyzes flight arrivals and accommodation check-ins to determine exact location
- Shows "home" when at Bristol, UK
- Shows "City, 🏴 Country" format when traveling
- Handles multi-location trips by finding most recent travel within trip period
- Optimized to parse YAML files once instead of per-date lookup

Closes #191

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 03:59:35 +02:00
Edward Betts f41930f811 Use get_country for Schengen report 2025-07-15 18:12:11 +02:00
Edward Betts f499015466 Adjust weekend page high pithing
Don't highlight a week number when showing weekends for different year.

Example: https://edwardbetts.com/agenda/weekends?year=2100&week=1

Closes: #198
2025-07-15 17:48:44 +02:00
Edward Betts a68df381fe Add CO2 breakdown by transport type to trip list and detail pages
Implements bug #194 by adding CO2 emission display by transport type:
- Add co2_by_transport_type() method to Trip class
- Display CO2 breakdown on trip list page and individual trip items
- Display CO2 breakdown on individual trip detail pages
- Show both total CO2 and breakdown by transport type (flight/train/ferry)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:57:19 +02:00
Edward Betts af49dac232 Add new country count display to trip statistics
Show the number of new countries visited each year in parentheses next to the total country count.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:32:59 +02:00
Edward Betts d65981ef7e Reorganize navbar with Trip and Conference dropdowns
- Move trip-related pages (Future trips, Past trips, Trip statistics) to a "Trips" dropdown
- Move conference-related pages (Conferences, Past conferences) to a "Conferences" dropdown
- Position both dropdowns between Calendar and Travel in the navbar
- Maintain active state highlighting for dropdown items and parent dropdowns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:18:41 +02:00
Edward Betts 06a7d03404 Update trip statistics CO2 display with transport breakdown
- Change label from "Flight CO₂" to "Total CO₂" for accuracy
- Add CO₂ breakdown by transport type (flight/train/ferry)
- Show values in kg for <1000kg, tonnes for ≥1000kg
- Track CO₂ emissions by transport type in stats calculation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:04:07 +02:00
Edward Betts 8363a581c7 Add trip linking and names to Schengen compliance report
- Add trip_date and trip_name fields to SchengenStay dataclass
- Implement extract_schengen_stays_with_trip_info() to associate stays with trips
- Update schengen_report.html to show trip names with clickable links
- Add Trip column to stays table and trip name column to compliance history
- Links navigate to individual trip pages using existing URL structure

Closes #197

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 15:06:09 +02:00
Edward Betts 1d37f92cfb Add margin to schengen report page 2025-07-15 13:54:20 +01:00
Edward Betts e95570a014 No need for title case in h1 2025-07-15 14:51:12 +02:00
Edward Betts fc31856f8c No need for title case 2025-07-15 14:48:18 +02:00
Edward Betts d2c4fa69ee Implement Schengen Area Compliance Report
How many close am I to 90 days in the last 180.

Fixes #193.
2025-07-15 14:43:37 +02:00
Edward Betts 084e5f44e3 Add conference count display to conference list sections
- Show count of conferences in each section (Current/Future/Past)
- Include proper pluralization (1 conference vs N conferences)
- Use Jinja2 template logic for count calculation and display

Fixes #195
2025-07-15 11:28:15 +02:00
Edward Betts 63c7c54bfc Show CO₂ for flights on trip list. 2025-05-26 10:07:37 -05:00
Edward Betts a66565a785 Show CO₂ for flights on travel page. 2025-05-26 04:48:13 -05:00
Edward Betts 9a5035d9fd Fix for flight number on trip page. 2025-05-12 13:45:26 +01:00
Edward Betts 503d39e6b8 Prefer ICAO flight number for some airlines 2025-04-28 12:13:23 +03:00
Edward Betts 8cd2335630 Add nowrap to conference list date fields 2025-04-18 14:48:22 +01:00
Edward Betts 24c3242189 Show CO₂ on stats page. 2025-01-30 13:34:36 +00:00
Edward Betts f5a8676336 Weekend page to show full year.
Highlight current week.
2025-01-24 20:49:16 +01:00
Edward Betts 2f574264e5 Show new badge next to new countries on travel stats page. 2025-01-24 20:19:25 +01:00
Edward Betts 340905ecff Less flags.
Only show flags for international trips to more than one country.
2025-01-24 20:01:41 +01:00
Edward Betts c3be926ff7 Current trip summary on index page
Closes: #169
2025-01-11 15:29:07 -06:00
Edward Betts 5ee0dc9c8d Move code from trip list to macros 2025-01-11 15:20:00 -06:00
Edward Betts 19ef9c24ba Show space launch images 2025-01-11 15:05:17 -06:00
Edward Betts 77f0b17b37 Bug fix trip stats page 2024-12-12 20:47:21 +00:00
Edward Betts 7a08c4b56d Adjust size of map on trip page to avoid scrollbar. 2024-11-13 14:32:00 +00:00
Edward Betts 1caf233075 Show airline counts on trip stats page 2024-11-10 21:02:37 +00:00
Edward Betts 9f1f64708f Remove old unused code. 2024-10-31 08:27:40 +00:00
Edward Betts 1ce82858ae Avoid empty 'Past' seciton on conference page 2024-10-31 08:26:10 +00:00
Edward Betts 6333587cc2 Add hover text for country flags on space launch page
Closes: #174
2024-10-23 07:10:31 +01:00
Edward Betts 34d1ee3b30 Add photo links to trip and day summaries
Enhance trip UI by adding photo links for authenticated
users. This provides quick access to relevant trip photos.
Closes: #184
2024-10-21 10:20:09 +01:00
Edward Betts 662808b545 Restore trip stats link in trip list 2024-10-21 09:52:21 +01:00
Edward Betts 3c0694de19 🇬🇧 Hide UK flags for all UK trips with show_flags logic 🏴
Implement show_flags property to conditionally display country flags for international trips. Remove unnecessary UK flags on purely UK-based trips. Closes: #183

🔧 Updated templates to use show_flags property.
📝 Adjusted map and trip details to reflect flag changes.
2024-10-19 19:43:48 +01:00
Edward Betts 81b0234794 Add map size toggle button to trip list page 2024-10-13 10:39:28 +01:00
Edward Betts 7587c3d3b7 Add map size toggle button to trip page
Closes: #178
2024-10-13 10:12:39 +01:00
Edward Betts 02fd6dbbe6 Bug fix train_row macro 2024-10-01 10:43:24 +01:00
Edward Betts 4b449d0d98 Show space launch weather concerns 2024-09-23 09:21:13 +01:00
Edward Betts 82b2f69005 Fix text wrapping on gaps page 2024-09-02 09:00:37 +01:00
Edward Betts 259642ff52 Show current trip on home page 2024-08-11 12:51:06 +02:00
Edward Betts 23aa70bb84 Add option to filter launches by orbit 2024-08-05 14:03:37 +02:00
Edward Betts 15c5053e44 Show page render time on events list 2024-08-04 12:01:54 +08:00
Edward Betts 11bc0419b3 Reorder accommodation list 2024-08-04 11:45:13 +08:00