{% if posts|length > 0 %}
    {% for post in posts %}
        {% include 'components/card-post.html.twig' with {'post': post} only %}
    {% endfor %}

    {% include 'partials/pagination.html.twig' %}
{% else %}
    <div class="alert alert-secondary" role="alert">
        {{ __('No posts were found.') }}
    </div>
{% endif %}
