mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
masonry tile for image communities
This commit is contained in:
parent
af98706610
commit
a2df54cb85
1 changed files with 10 additions and 2 deletions
|
@ -12,8 +12,16 @@
|
|||
{% endif %}
|
||||
<div class="masonry_thumb">
|
||||
{% if post.type == POST_TYPE_LINK %}
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" /></a>
|
||||
{% if post.image.thumbnail_url() %}
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" /></a>
|
||||
{% elif post.image.source_url %}
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.image.source_url }}"
|
||||
alt="{{ post.title }}" loading="lazy" /></a>
|
||||
{% else %}
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.url }}"
|
||||
alt="{{ post.title }}" loading="lazy" /></a>
|
||||
{% endif %}
|
||||
{% elif post.type == POST_TYPE_IMAGE %}
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" target="_blank"><img src="{{ post.image.thumbnail_url() }}"
|
||||
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" /></a>
|
||||
|
|
Loading…
Add table
Reference in a new issue