parent
7a9fbcec7b
commit
5ffb389c53
4 changed files with 96 additions and 4 deletions
|
|
@ -7,6 +7,7 @@
|
|||
{"endpoint": "travel_list", "label": "Travel" },
|
||||
{"endpoint": "accommodation_list", "label": "Accommodation" },
|
||||
{"endpoint": "gaps_page", "label": "Gaps" },
|
||||
{"endpoint": "weekends", "label": "Weekends" },
|
||||
{"endpoint": "launch_list", "label": "Space launches" },
|
||||
{"endpoint": "holiday_list", "label": "Holidays" },
|
||||
] %}
|
||||
|
|
|
|||
44
templates/weekends.html
Normal file
44
templates/weekends.html
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="p-2">
|
||||
|
||||
<h1>Weekends</h1>
|
||||
<table class="table table-hover w-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-end">Week</th>
|
||||
<th class="text-end">Date</th>
|
||||
<th>Saturday</th>
|
||||
<th>Sunday</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{% for weekend in items %}
|
||||
<tr>
|
||||
<td class="text-end">
|
||||
{{ weekend.date.isocalendar().week }}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{{ weekend.date.strftime("%-d %b %Y") }}
|
||||
</td>
|
||||
{% for day in "saturday", "sunday" %}
|
||||
<td>
|
||||
{% if weekend[day] %}
|
||||
{% for event in weekend[day] %}
|
||||
<a href="{{ event.url }}">{{ event.title }}</a>{% if not loop.last %},{%endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<em>🆓 🍃 📖</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue