agenda/templates/weekends.html

46 lines
1,002 B
HTML
Raw Permalink Normal View History

{% extends "base.html" %}
{% block title %}Weekends - Edward Betts{% endblock %}
{% 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>
2024-07-01 20:28:15 +01:00
<td class="text-end text-nowrap">
{{ 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 %}
2024-03-05 11:29:52 +00:00
<strong>free</strong>
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}