{% macro display_actor_inline(follower, size=50) -%} {% if not follower.icon %} {% else %} {% endif %}
{{ follower.name or follower.preferredUsername }}
@{{ follower.preferredUsername }}@{{ follower.url | domain }}
{%- endmacro %} {% macro display_note(obj, perma=False, ui=False, likes=[], shares=[], meta={}, no_color=False) -%} {% set actor = obj.attributedTo | get_actor %}
{{ actor.name or actor.preferredUsername }} @{% if not no_color and obj.id | is_from_outbox %}{{ actor.preferredUsername }}{% else %}{{ actor.preferredUsername }}{% endif %}@{% if not no_color and obj.id | is_from_outbox %}{{ actor.url | domain }}{% else %}{{ actor.url | domain }}{% endif %} {% if not perma %} {% endif %} {% if obj.summary %}

{{ obj.summary | clean }}

{% endif %}
{{ obj.content | clean | safe }}
{% if obj.attachment %}
{% if obj.attachment | not_only_imgs %}

Attachment

{% endif %}
{% endif %}
{% if perma %}{{ obj.published | format_time }} {% else %} permalink {% if meta.count_reply %}{{ meta.count_reply }} replies{% endif %} {% if meta.count_boost %}{{ meta.count_boost }} boosts{% endif %} {% if meta.count_like %}{{ meta.count_like }} likes{% endif %} {% endif %} {% if ui and session.logged_in %} {% set aid = obj.id | quote_plus %} reply {% set perma_id = obj.id | permalink_id %} {% set redir = request.path + "#activity-" + perma_id %} {% if meta.boosted %}
{% else %}
{% endif %} {% if meta.liked %}
{% else %}
{% endif %} {% endif %} {% if session.logged_in %} {% if obj.id | is_from_outbox %}
{% else %}
{% endif %} {% endif %}
{% if likes or shares %}
{% if likes %}

{{ meta.count_like }} likes

{% for like in likes %} {{ display_actor_inline(like) }} {% endfor %}
{% endif %} {% if shares %}

{{ meta.count_boost }} boosts

{% for boost in shares %} {{ display_actor_inline(boost) }} {% endfor %}
{% endif %}
{% endif %}
{%- endmacro %} {% macro display_thread(thread, likes=[], shares=[]) -%} {% for reply in thread %} {% if reply._requested %} {{ display_note(reply.activity.object, perma=True, ui=False, likes=likes, shares=shares, meta=reply.meta) }} {% else %} {{ display_note(reply.activity.object, perma=False, ui=True, meta=reply.meta) }} {% endif %} {% endfor %} {% endmacro -%}