mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-02 16:21:32 -08:00
blur nsfw and nsfl thumbnails when viewed outside of a nsfw/l community
This commit is contained in:
parent
684d4f741d
commit
75c4ece82f
3 changed files with 9 additions and 4 deletions
|
@ -654,6 +654,9 @@ fieldset legend {
|
|||
width: 133px;
|
||||
}
|
||||
}
|
||||
.post_list .post_teaser .thumbnail img.blur {
|
||||
filter: blur(3px);
|
||||
}
|
||||
.post_list .post_teaser .thumbnail.lbw .fe {
|
||||
background: none;
|
||||
}
|
||||
|
|
|
@ -268,7 +268,9 @@ html {
|
|||
@include breakpoint(tablet) {
|
||||
height: 70px;
|
||||
width: 133px;
|
||||
|
||||
}
|
||||
&.blur {
|
||||
filter: blur(3px);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,15 @@
|
|||
{% else %}
|
||||
{% if post.type == POST_TYPE_LINK %}
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><span class="fe fe-external"></span><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" /></a>
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" class="{{ 'blur' if (post.nsfw and not post.community.nsfw) or (post.nsfl and not post.community.nsfl) }}" /></a>
|
||||
{% elif post.type == POST_TYPE_IMAGE %}
|
||||
{% if post.image_id %}
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" aria-label="{{ _('View image') }}" target="_blank"><span class="fe fe-magnify"></span><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" /></a>
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" class="{{ 'blur' if (post.nsfw and not post.community.nsfw) or (post.nsfl and not post.community.nsfl) }}" /></a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><span class="fe fe-reply"></span><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" /></a>
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" class="{{ 'blur' if (post.nsfw and not post.community.nsfw) or (post.nsfl and not post.community.nsfl) }}" /></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue