Current trip summary on index page

Closes: #169
This commit is contained in:
Edward Betts 2025-01-11 15:29:07 -06:00
parent 5ee0dc9c8d
commit c3be926ff7
2 changed files with 5 additions and 10 deletions

View file

@ -39,7 +39,7 @@
} %}
{% from "macros.html" import trip_link, display_date_no_year with context %}
{% from "macros.html" import trip_link, display_date_no_year, trip_item with context %}
{% from "navbar.html" import navbar with context %}
<body>
@ -81,15 +81,9 @@
{% endfor %}
{% if current_trip %}
{% set end = current_trip.end %}
<div>
<div>Current trip: {{ trip_link(current_trip) }}</div>
{% if end %}
<div>Dates: {{ display_date_no_year(current_trip.start) }} to {{ display_date_no_year(end) }}</div>
{% else %}
<div>Start: {{ display_date_no_year(current_trip.start) }} (end date missing)</div>
{% endif %}
<h3>Current trip</h3>
{{ trip_item(current_trip) }}
</div>
{% endif %}