{% macro post_card(article) %}
{% if article.cover %}
{% endif %}

{{ article.post.title }}

{% if article.post.subtitle | length > 0 %} {{ article.post.subtitle }} {% else %} {{ article.post.content | safe | striptags | truncate(length=200) }} {% endif %}

{{ "By {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name | escape }}{{ link_4 }}" | _( link_1='', name=article.author.name, link_4="") }} {% if article.post.published %}⋅ {{ article.date | date(format="%B %e") }}{% endif %} ⋅ {{ article.blog.title }} {% if not article.post.published %}⋅ {{ "Draft" | _ }}{% endif %}

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

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

{% endfor %} {% endif %} {% set default = default[name] | default(value="") %} {% endmacro input %} {% macro paginate(page, total, previous="Previous page", next="Next page", query="") %} {% if query %} {% set query = query ~ "&" %} {% endif %} {% endmacro %} {% macro comment(comm) %}
{{ macros::avatar(user=comm.author, pad=true) }} {{ comm.author.name }} @{{ comm.author.fqn }}
{% if comm.sensitive %}
{{ comm.spoiler_text }} {% endif %} {{ comm.content | safe }} {% if comm.sensitive %}
{% endif %}
{{ "Respond" | _ }} {% for res in comm.responses %} {{ self::comment(comm=res) }} {% endfor %}
{% endmacro %} {% macro tabs(links, titles, selected) %}
{% for link in links %} {% set idx = loop.index0 %} {{ titles[idx] | _ }} {% endfor %}
{% endmacro %} {% macro feather(name) %} {% endmacro %} {% macro home_feed(title, link, articles) %} {% if articles | length > 0 %}

{{ title | _ }} — {{ "View all" | _ }}

{% for article in articles %} {{ macros::post_card(article=article) }} {% endfor %}
{% endif %} {% endmacro %} {% macro avatar(user, size="small", pad=true) %}
{% endmacro %}