{% macro list_posts(posts, max, language_strings="", section_path="blog") %}
{% 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, language_strings=language_strings) }}
  • {% endif %} {% if post.draft %}
  • {{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}
  • {% endif %}

{{ post.title }}

{% if post.taxonomies.tags %}
{% for tag in post.taxonomies.tags %} {{ tag }} {% endfor %}
{% endif %}
{% if post.description %}

{{ post.description }}

{% elif post.summary %}

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

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