<article id="events">
    <h2 class="major">Evènements et foyers</h2>

    {% if mds %}
        {% for md in mds %}
            <a class="event" href="#event-{{ md[0].strftime('%d-%m-%Y') }}-{{ md[1] }}">
                <div class="date">{{ md[0].strftime('%a %d %b %Y') }}</div>
                <div class="title">{{ md[1] }}</div>
                <div class="description">{{ md[2] | safe }}</div>
            </a>
        {% endfor %}
    {% else %}
        <p>Pas d'évènements prévus à ce jour :(</p>
    {% endif %}
</article>

{% if mds %}
    {% for md in mds %}
        <article id="event-{{ md[0].strftime('%d-%m-%Y') }}-{{ md[1] }}">
            <a class="previous" href="#events">Previous</a>
            <h2 class="major">
                {{ md[1] }}
                <div class="date">{{ md[0].strftime('%a %d %b %Y') }}</div>
            </h2>
            {{ md[3] | safe }}
        </article>
    {% endfor %}
{% endif %}