masonry tile for image communities

This commit is contained in:
rimu 2024-01-21 16:12:04 +13:00
parent 4b9768d2a8
commit 29ba209a7e

View file

@ -34,10 +34,10 @@
<p><a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}">{{ post.title|shorten(25) }}</a></p>
</div>
{% else %}
{% if post.url and (post.url.endswith('.jpg') or post.url.endswith('.webp') or post.url.endswith('.png') or post.url.endswith('.gif')) %}
{% if post.url and (post.url.endswith('.jpg') or post.url.endswith('.webp') or post.url.endswith('.png') or post.url.endswith('.gif') or post.url.endswith('.avif')) %}
<div class="masonry_thumb">
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('See image') }}"><img src="{{ post.url }}"
alt="{{ post.title }}" loading="lazy" /></a>
alt="{{ post.title }}" loading="{{ 'lazy' if low_bandwidth else 'eager' }}" /></a>
</div>
<div class="masonry_info">
<p><a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}">{{ post.title|shorten(25) }}</a></p>