try bagguettebox script for a lightbox

This commit is contained in:
rimu 2024-03-17 16:22:20 +13:00
parent 847f57d05f
commit df522582fb

View file

@ -13,24 +13,24 @@
<div class="masonry_thumb" title="{{ post.title }}">
{% if post.type == POST_TYPE_LINK %}
{% if post.image.medium_url() %}
<a href="{{ post.url }}" data-at-450="{{ post.image.medium_url() }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('View image') }}"><img src="{{ post.image.medium_url() }}"
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('View image') }}"><img src="{{ post.image.medium_url() }}"
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" title="{{ post.title }}"
loading="lazy" width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
loading="{{ 'lazy' if low_bandwidth else 'eager' }}" width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
{% elif post.image.source_url %}
<a href="{{ post.url }}" data-at-450="{{ post.image.medium_url() }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('View image') }}"><img src="{{ post.image.source_url }}"
alt="{{ post.title }}" title="{{ post.title }}" loading="lazy" /></a>
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('View image') }}"><img src="{{ post.image.source_url }}"
alt="{{ post.title }}" title="{{ post.title }}" loading="{{ 'lazy' if low_bandwidth else 'eager' }}" /></a>
{% else %}
<a href="{{ post.url }}" data-at-450="{{ post.image.medium_url() }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('View image') }}"><img src="{{ post.url }}"
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('View image') }}"><img src="{{ post.url }}"
alt="{{ post.title }}" title="{{ post.title }}"
loading="{{ 'lazy' if low_bandwidth else 'eager' }}" /></a>
{% endif %}
{% elif post.type == POST_TYPE_IMAGE %}
<a href="{{ post.image.view_url() }}" data-at-450="{{ post.image.medium_url() }}" rel="nofollow ugc" target="_blank"><img src="{{ post.image.medium_url() }}"
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" target="_blank"><img src="{{ post.image.medium_url() }}"
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" title="{{ post.title }}"
loading="lazy" width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
loading="{{ 'lazy' if low_bandwidth else 'eager' }}" width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
{% else %}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}"><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' if low_bandwidth else 'eager' }}" /></a>
{% endif %}
</div>
<div class="masonry_info">