<h2>{{ parameters.title }}</h2>

<ul class="actus--list tiles--list">
    {% for fiche in json.data %}
    <li class="actus--item tiles--item">
        <a
            class="tile tile-actu" 
            href="
                {% if fiche.fields.typecontenu_raw == 'externe' %}
                    {{ fiche.fields.urldetail }}
                {% else %}
                    {{ portal_url }}themes/tao/detail-actualite/{{ fiche.id }}/
                {% endif %}"
            >
            {% if fiche.fields.image %}
            <picture class="tile--picture">
                <img class="tile--img" loading="lazy" src="{% make_public_url url=fiche.fields.image.url %}"/>
            </picture>
            {% endif %}

            <div class="tile--body">
                <p class="tile--date">{{ fiche.fields.date|date:"d M Y" }}</p>
                <h3 class="tile--title">{{ fiche.fields.titre }}</h3>
                <p class="tile--resume">{{ fiche.fields.resume|linebreaksbr }}</p>
            </div>
        </a>
    </li>
    {% endfor %}
</ul>

{% include "combo/pagination.html" with paginate_by=parameters.page_limit %}
