{%- 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 v and v.admin_level < PERMS['ENABLE_VOTE_BUTTONS_ON_USER_PAGE'] %} {% for p in listing if can_see(v, p) %} {% 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 %}
  • {{p.comment_count}} {% if v and v.admin_level >= PERMS['ADMIN_HOME_VISIBLE'] %} {% endif %}
  • {% if p.realbody(v) %} {% 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.realbody(v) %}
{{p.realbody(v) | safe}}
{% endif %} {% if p.is_video %}

{% elif p.is_audio %}
{% elif p.is_youtube %}
{{p.embed | 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 "" %} {% endif %} {{macros.ghost_box(text, '', 1)}}
{% endfor %} {% if v %} {% include "modals/delete_post.html" %} {% include "modals/report_post.html" %} {% if v.admin_level >= PERMS['USER_BAN'] %} {% include "modals/punish.html" %} {% endif %} {% include "modals/emoji.html" %} {% endif %} {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% endif %}