{% extends "base.html" %} {% from "_icons.html" import icon %} {% set title = t('events.title') %} {% set description = c('events.intro') %} {% block crumbs %}/{{ t('nav.events') }}{% endblock %} {% block lead %}

{{ c('events.intro') }}

{% endblock %} {% macro event_card(e, past=False) %}
{{ mshort(e.event_date) }}{{ e.event_date.day }}
{% if e.image %}{{ tr(e, 'title') }}{% endif %}
{% if past %}{{ t('events.past_tag') }}{% endif %}

{{ tr(e, 'title') }}

{% if tr(e, 'description') %}
{{ tr(e, 'description')|safe }}
{% elif not past %}

{{ t('events.details_soon') }}

{% endif %} {% if e.link_url %}{{ t('events.more') }}{{ icon('arrow') }}{% endif %}
{% endmacro %} {% block content %} {% if upcoming %}

{{ t('events.upcoming') }}

{% for e in upcoming %}{{ event_card(e) }}{% endfor %}
{% endif %} {% if not upcoming and not past %}

{{ t('events.empty') }}

{% endif %} {% if past %}

{{ t('events.past') }}

{% for e in past %}{{ event_card(e, True) }}{% endfor %}
{% endif %} {% include "_cta.html" %} {% endblock %} {% block after %}{% include "_lightbox.html" %}{% endblock %}