{% extends "base.html" %} {% block style %} {% set column_count = 7 %} {% endblock %} {% macro row(item, badge) %} {% set country = get_country(item.country) %} {% set nights = (item.to.date() - item.from.date()).days %}
{{ item.from.strftime("%a, %d %b %Y") }}
{{ item.to.strftime("%a, %d %b") }}
{% if nights == 1 %}1 night{% else %}{{ nights }} nights{% endif %}
{{ item.operator }}
{{ item.location }}
{% if country %} {{ country.flag }} {{ country.name }} {% else %} country code {{ item.country }} not found {% endif %}
{% if item.url %} {{ item.name }} {% else %} {{ item.name }} {% endif %}
{% endmacro %} {% macro section(heading, item_list, badge) %} {% if item_list %}

{{heading}}

{% for item in item_list %}{{ row(item, badge) }}{% endfor %} {% endif %} {% endmacro %} {% block content %}

Accommodation

{{ section("Accommodation", items) }}
{% endblock %}