{% macro list_posts(posts, max) %}
{% for post in posts %} {% if loop.index <= max %} {% if loop.index == max %}
{% elif loop.last %}
{% else %}
{% endif %} {% if post.date %}
{{ macros_format_date::format_date(date=post.date, short=false) }}
{% endif %}
{% if post.taxonomies.tags %}
{% for tag in post.taxonomies.tags %} {{ tag }} {% endfor %}
{% endif %}
{% if post.description %}

{{ post.description | striptags | safe }}

{% elif post.summary %}

{{ post.summary | striptags | safe | trim_end_matches(pat=".") }}…

{% endif %}
{{ macros_translate::translate(key="read_more", default="Read more") }} →
{% endif %} {% if not loop.last %} {% if loop.index == max %} {% endif %} {% endif %} {% endfor %}
{% endmacro %}