{% macro avatar(username, size="24px", selector_type="username") -%} @{{ username }} {%- endmacro %} {% macro community_avatar(id, community=false, size="24px") -%} {% if community %} {{ community.title }} {% else %} {{ id }} {% endif %} {%- endmacro %} {% macro community_listing_card(community) -%} {{ components::community_avatar(id=community.id, community=community, size="48px") }}

{{ community.context.display_name }}

{{ community.member_count }} members
{%- endmacro %} {% macro username(user) -%}
{% if user.settings.display_name %} {{ user.settings.display_name }} {% else %} {{ user.username }} {% endif %}
{%- endmacro %} {% macro likes(id, asset_type, likes=0, dislikes=0) -%} {%- endmacro %} {% macro post(post, owner, secondary=false, community=false, show_community=true) -%}
{{ components::avatar(username=post.owner, size="52px", selector_type="id") }}
{% if user %}
{{ components::likes(id=post.id, asset_type="Post", likes=post.likes, dislikes=post.dislikes) }}
{% endif %}
{{ icon "message-circle" }} {{ post.comment_count }} {{ icon "external-link" }} {% if user %} {% if (user.id == post.owner) or is_helper %} {% endif %} {% endif %}
{%- endmacro %}