{% macro post_card(article) %} {% if article.author.display_name %} {% set name = article.author.display_name %} {% else %} {% set name = article.author.username %} {% endif %}

{{ article.post.title }}

{{ article.post.content | safe | striptags | truncate(length=200) }}

{{ "By {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name | escape }}{{ link_4 }}" | _( link_1='', name=name, link_4="") }} ⋅ {{ article.date | date(format="%B %e") }} ⋅ {{ article.blog.title }}

{% endmacro post_card %} {% macro input(name, label, errors, form, type="text", props="", optional=false) %} {% if errors is defined and errors[name] %} {% for err in errors[name] %}

{{ err.message | default(value="Unknown error") | _ }}

{% endfor %} {% endif %} {% endmacro input %} {% macro paginate(page, total, previous="Previous page", next="Next page") %} {% endmacro %} {% macro comment(comm) %}
{{ comm.author.display_name | default(value=comm.author.username) }} @{{ comm.author.username }}
{{ comm.content | safe }}
{{ "Respond" | _ }} {% for res in comm.responses %} {{ self::comment(comm=res) }} {% endfor %}
{% endmacro %}