float thumbnails

This commit is contained in:
Hendrik L 2024-12-09 17:03:51 +01:00
parent d772f2304b
commit 67d59e2657
5 changed files with 31 additions and 40 deletions

View file

@ -783,11 +783,9 @@ div.navbar {
max-width: 78%;
}
.post_list .post_teaser .col_thumbnail {
float: right;
width: 70px;
position: relative;
padding-left: 0;
padding-right: 0;
left: -13px;
}
@media (min-width: 992px) {
.post_list .post_teaser .col_thumbnail {

View file

@ -369,11 +369,9 @@ div.navbar {
}
.col_thumbnail {
float: right;
width: 70px;
position: relative;
padding-left: 0;
padding-right: 0;
left: -13px;
@include breakpoint(tablet) {
width: 170px;
}

View file

@ -1,4 +1,15 @@
<div class="col post_teaser_body">
{% if post.image_id -%}
<div class="col_thumbnail thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
{% if low_bandwidth -%}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><span class="fe fe-reply"></span></a>
{% else -%}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><img src="{{ post.image.thumbnail_url() }}"
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" class="{{ ' blur' if blur_content }}" /></a>
{% endif -%}
</div>
{% endif -%}
{% include "post/post_teaser/_title.html" %}
{% if post.body_html -%}
<div class="post_teaser_article_preview small post_teaser_clickable">
@ -7,15 +18,3 @@
{% endif -%}
{% include "post/post_teaser/_utilities_bar.html" %}
</div>
{% if post.image_id -%}
<div class="col col-2 col_thumbnail">
<div class="thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
{% if low_bandwidth -%}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><span class="fe fe-reply"></span></a>
{% else -%}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><img src="{{ post.image.thumbnail_url() }}"
alt="{{ post.image.alt_text if post.image.alt_text else '' }}" loading="lazy" class="{{ ' blur' if blur_content }}" /></a>
{% endif -%}
</div>
</div>
{% endif -%}

View file

@ -1,4 +1,14 @@
<div class="col post_teaser_body">
{% if post.image_id -%}
<div class="col_thumbnail thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
{% if low_bandwidth -%}
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Follow link') }}"><span class="fe fe-external"></span></a>
{% else -%}
<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" class="{{ ' blur' if blur_content }}" /></a>
{% endif -%}
</div>
{% endif -%}
{% include "post/post_teaser/_title.html" %}
{% if post.body_html -%}
<div class="post_teaser_link_preview small post_teaser_clickable">
@ -7,15 +17,3 @@
{% endif -%}
{% include "post/post_teaser/_utilities_bar.html" %}
</div>
{% if post.image_id -%}
<div class="col col-2 col_thumbnail">
<div class="thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
{% if low_bandwidth -%}
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="{{ _('Follow link') }}"><span class="fe fe-external"></span></a>
{% else -%}
<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" class="{{ ' blur' if blur_content }}" /></a>
{% endif -%}
</div>
</div>
{% endif -%}

View file

@ -1,15 +1,6 @@
<div class="col post_teaser_body">
{% include "post/post_teaser/_title.html" %}
{% if post.body_html -%}
<div class="post_teaser_link_preview small post_teaser_clickable">
{{ first_paragraph(post.body_html) | safe }}
</div>
{% endif -%}
{% include "post/post_teaser/_utilities_bar.html" %}
</div>
<div class="col col-2 col_thumbnail">
{% if post.image_id -%}
<div class="thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
<div class="col_thumbnail thumbnail{{ ' lbw' if low_bandwidth }}" aria-hidden="true">
{% if low_bandwidth -%}
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><span class="fe fe-reply"></span></a>
{% else -%}
@ -22,4 +13,11 @@
<a href="{{ url_for('activitypub.post_ap', post_id=post.id, sort='new' if sort == 'active' else None) }}"><span class="fe fe-poll"></span></a>
</div>
{% endif -%}
{% include "post/post_teaser/_title.html" %}
{% if post.body_html -%}
<div class="post_teaser_link_preview small post_teaser_clickable">
{{ first_paragraph(post.body_html) | safe }}
</div>
{% endif -%}
{% include "post/post_teaser/_utilities_bar.html" %}
</div>