parent
5ee0dc9c8d
commit
c3be926ff7
|
@ -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 %}
|
{% from "navbar.html" import navbar with context %}
|
||||||
<body>
|
<body>
|
||||||
|
@ -81,15 +81,9 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if current_trip %}
|
{% if current_trip %}
|
||||||
{% set end = current_trip.end %}
|
|
||||||
<div>
|
<div>
|
||||||
<div>Current trip: {{ trip_link(current_trip) }}</div>
|
<h3>Current trip</h3>
|
||||||
{% if end %}
|
{{ trip_item(current_trip) }}
|
||||||
<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 %}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,8 @@ async def index() -> str:
|
||||||
"event_list.html",
|
"event_list.html",
|
||||||
today=today,
|
today=today,
|
||||||
events=events,
|
events=events,
|
||||||
current_trip=get_current_trip(now.date()),
|
get_country=agenda.get_country,
|
||||||
|
current_trip=get_current_trip(today),
|
||||||
fullcalendar_events=calendar.build_events(events),
|
fullcalendar_events=calendar.build_events(events),
|
||||||
start_event_list=date.today() - timedelta(days=1),
|
start_event_list=date.today() - timedelta(days=1),
|
||||||
end_event_list=date.today() + timedelta(days=365 * 2),
|
end_event_list=date.today() + timedelta(days=365 * 2),
|
||||||
|
|
Loading…
Reference in a new issue