{% extends "base.html" %} {% block title %}Weekends - Edward Betts{% endblock %} {% block content %}

Weekends

{% set current_isocalendar = today.isocalendar() %} {% for weekend in items %} {% set week_number = weekend.date.isocalendar().week %} {% set iso_week_year = weekend.date.isocalendar().year %} {% if week_number == current_week_number and iso_week_year == current_isocalendar.year %} {% set extra_class = " bg-warning-subtle" %} {% else %} {% set extra_class = "" %} {% endif %} {% for day in "saturday", "sunday" %} {% if extra_class %} {% if extra_class %} {% if extra_class %} {% endfor %} {% endfor %}
Week Date Saturday Saturday Location Saturday Weather Sunday Sunday Location Sunday Weather
{{ week_number }} {{ weekend.date.strftime("%-d %b %Y") }} {% else %}{% endif %} {% if weekend[day] %} {% for event in weekend[day] %} {{ event.title }}{% if not loop.last %},{%endif %} {% endfor %} {% else %} free {% endif %} {% else %}{% endif %} {% set city, country = weekend[day + '_location'] %} {% if city %} {{ city }}, {{ country.flag }} {{ country.name }} {% endif %} {% else %}{% endif %} {% set w = weekend[day + '_weather'] %} {% if w %} {{ w.status }} {{ w.temp_min }}–{{ w.temp_max }}°C {% endif %}
{% endblock %}