{% extends "base.html" %}

{% block title %}{{ section.title }} · {{ config.title }}{% endblock title %}

{% block content %}
{% include "partials/section-header.html" %}

{{ section.content | safe }}

{% if section.pages %}
    <h2>Liste des articles</h2>
    <ul class="entry-list">
        {% for page in section.pages %}
            <li>
                <a href="{{ page.permalink | safe }}">{{ page.title }}</a>
                {% if page.date or page.description %}
                    <div class="entry-list__meta">
                        {% if page.date %}
                            <time datetime="{{ page.date }}">{{ page.date | date(format="%d/%m/%Y") }}</time>
                        {% endif %}
                        {% if page.date and page.description %} — {% endif %}
                        {% if page.description %}{{ page.description }}{% endif %}
                    </div>
                {% endif %}
            </li>
        {% endfor %}
    </ul>
{% endif %}
{% endblock content %}
