mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
27 lines
1.7 KiB
HTML
27 lines
1.7 KiB
HTML
{% set content_blocked = post.blocked_by_content_filter(content_filters)
|
|
or (current_user.hide_nsfw == 3 and post.nsfw)
|
|
or (current_user.hide_nsfl == 3 and post.nsfl)
|
|
or (current_user.ignore_bots == 3 and post.from_bot) -%}
|
|
{% set blur_content = (current_user.hide_nsfw == 2 and post.nsfw)
|
|
or (current_user.hide_nsfl == 2 and post.nsfl)
|
|
or (current_user.ignore_bots == 2 and post.from_bot) -%}
|
|
{% if content_blocked and content_blocked == '-1' -%}
|
|
{# do nothing - blocked by keyword filter #}
|
|
{% else -%}
|
|
<div class="h-entry pb-0 post_teaser type_{{ post.type }}{{ ' reported' if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator() }}{{ ' blocked' if content_blocked }}{{ ' blur' if blur_content }}"
|
|
{% if content_blocked -%} title="{{ _('Filtered: ') }}{{ content_blocked }}"{% else %} title="Post: {{ post.title }}" aria-label="Post: {{ post.title }}"{% endif %} id="post_{{ post.id }}" tabindex="0">
|
|
<div class="row">
|
|
{% if post.type == POST_TYPE_ARTICLE %}
|
|
{% include "post/post_teaser/_article.html" -%}
|
|
{% elif post.type == POST_TYPE_LINK %}
|
|
{% include "post/post_teaser/_link.html" -%}
|
|
{% elif post.type == POST_TYPE_POLL %}
|
|
{% include "post/post_teaser/_poll.html" -%}
|
|
{% elif post.type == POST_TYPE_IMAGE %}
|
|
{% include "post/post_teaser/_image.html" -%}
|
|
{% elif post.type == POST_TYPE_VIDEO %}
|
|
{% include "post/post_teaser/_video.html" -%}
|
|
{% endif -%}
|
|
</div>
|
|
</div>
|
|
{% endif -%}
|