{%- import 'util/macros.html' as macros with context -%} {% if v %} {% include "modals/award.html" %} {% endif %} {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% endif %} {% include "popover.html" %} {% set disable_votes = request.path.startswith('/@') and u != v and v and v.admin_level < PERMS['ENABLE_VOTE_BUTTONS_ON_USER_PAGE'] %} {% set post_permalinks = [] %} {% for p in listing if can_see(v, p) %}
{{post_permalinks.append(p.permalink)}}
{% set ups=p.upvotes %} {% set downs=p.downvotes %} {% set score=ups-downs %} {% if v %} {% set voted= p.voted %} {% else %} {% set voted=-2 %} {% endif %} {% set v_forbid_deleted = (p.deleted_utc != 0 or p.is_banned) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id == p.author_id) %} {{macros.reports(p, 'post')}}
{% if v %}
{{score}}
{% else %} {{score}} {% endif %}
{% if not v_forbid_deleted %}
{% if not p.url %} post thumbnail {% elif p.is_image %} post thumbnail {% elif p.is_video or p.is_audio %} post thumbnail {% if p.is_video %} {% endif %} {% elif p.is_youtube %} post thumbnail {% else %} post thumbnail {% endif %}
{% endif %}
{% if p.cw %} CHILD WARNING {% endif %} {% if p.effortpost %} EFFORTPOST {% endif %} {% if p.flair %}{{p.flair | safe}}{% endif %} {{p.realtitle(v) | safe}}
  • {{p.comment_count}} {% if v and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %} {% endif %}
  • {% if p.realbody(v) or (p.embed and p.domain == "twitter.com") %} {% endif %} {% if v %}
  • {% endif %} {% if v %}
  • {{score}}
  • {% else %}
  • {{score}}
  • {% endif %}
{% if v %} {% endif %} {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% include "post_admin_actions_mobile.html" %} {% endif %} {% if not v_forbid_deleted %} {% if p.is_video %}

{% elif p.is_audio %}
{% elif p.is_youtube %}
{{p.embed | safe}}
{% endif %} {% if p.realbody(v) or (p.embed and p.domain == "twitter.com") %}
{% if p.domain == "twitter.com" %} {{p.embed | safe}} {% endif %} {{p.realbody(v) | safe}}
{% endif %} {% endif %}
{% else %}
{% if u %} {% if "/saved/" in request.path %} {% set text = "You haven't saved any posts yet!" %} {% elif "/subscribed/" in request.path %} {% set text = "You haven't subscribed to any posts yet!" %} {% elif v and v.id == u.id %} {% set text = "You haven't made any posts yet!" %} {% else %} {% set text = "@" ~ u.username ~ " hasn't made any posts yet!" %} {% endif %} {% else %} {% set text = "No posts found!" if request.path.startswith('/search') else "There are no posts here (yet)." %} {% endif %} {{macros.ghost_box(text, '', 1)}}
{% endfor %} {% if v %} {% include "modals/delete_post.html" %} {% include "modals/report_post.html" %} {% include "modals/change_hole.html" %} {% if v.admin_level >= PERMS['USER_BAN'] %} {% include "modals/punish.html" %} {% endif %} {% include "modals/emoji.html" %} {% include "modals/gif.html" %} {% endif %} {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% endif %}