mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
masonry tile - titles
This commit is contained in:
parent
29ba209a7e
commit
f658ca4a9f
1 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@
|
||||||
{% elif post_layout == 'masonry_wide' %}
|
{% elif post_layout == 'masonry_wide' %}
|
||||||
{% set thumbnail = post.image.view_url() %}
|
{% set thumbnail = post.image.view_url() %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="masonry_thumb">
|
<div class="masonry_thumb" title="{{ post.title }}">
|
||||||
{% if post.type == POST_TYPE_LINK %}
|
{% if post.type == POST_TYPE_LINK %}
|
||||||
{% if post.image.thumbnail_url() %}
|
{% if post.image.thumbnail_url() %}
|
||||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.image.thumbnail_url() }}"
|
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.image.thumbnail_url() }}"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
alt="{{ post.title }}" loading="lazy" /></a>
|
alt="{{ post.title }}" loading="lazy" /></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.url }}"
|
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Read article') }}"><img src="{{ post.url }}"
|
||||||
alt="{{ post.title }}" loading="lazy" /></a>
|
alt="{{ post.title }}" loading="{{ 'lazy' if low_bandwidth else 'eager' }}" /></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif post.type == POST_TYPE_IMAGE %}
|
{% elif post.type == POST_TYPE_IMAGE %}
|
||||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" target="_blank"><img src="{{ post.image.thumbnail_url() }}"
|
<a href="{{ post.image.view_url() }}" rel="nofollow ugc" target="_blank"><img src="{{ post.image.thumbnail_url() }}"
|
||||||
|
@ -31,16 +31,16 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="masonry_info">
|
<div class="masonry_info">
|
||||||
<p><a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}">{{ post.title|shorten(25) }}</a></p>
|
<p><a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" title="{{ post.title }}">{{ post.title|shorten(25) }}</a></p>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% 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')) %}
|
{% 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">
|
<div class="masonry_thumb" title="{{ post.title }}">
|
||||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('See image') }}"><img src="{{ post.url }}"
|
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('See image') }}"><img src="{{ post.url }}"
|
||||||
alt="{{ post.title }}" loading="{{ 'lazy' if low_bandwidth else 'eager' }}" /></a>
|
alt="{{ post.title }}" loading="{{ 'lazy' if low_bandwidth else 'eager' }}" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="masonry_info">
|
<div class="masonry_info">
|
||||||
<p><a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}">{{ post.title|shorten(25) }}</a></p>
|
<p><a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" title="{{ post.title }}">{{ post.title|shorten(25) }}</a></p>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="masonry_info_no_image">
|
<div class="masonry_info_no_image">
|
||||||
|
|
Loading…
Add table
Reference in a new issue