mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
float thumbnails
This commit is contained in:
parent
d772f2304b
commit
67d59e2657
5 changed files with 31 additions and 40 deletions
|
@ -783,11 +783,9 @@ div.navbar {
|
||||||
max-width: 78%;
|
max-width: 78%;
|
||||||
}
|
}
|
||||||
.post_list .post_teaser .col_thumbnail {
|
.post_list .post_teaser .col_thumbnail {
|
||||||
|
float: right;
|
||||||
width: 70px;
|
width: 70px;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
left: -13px;
|
|
||||||
}
|
}
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
.post_list .post_teaser .col_thumbnail {
|
.post_list .post_teaser .col_thumbnail {
|
||||||
|
|
|
@ -369,11 +369,9 @@ div.navbar {
|
||||||
}
|
}
|
||||||
|
|
||||||
.col_thumbnail {
|
.col_thumbnail {
|
||||||
|
float: right;
|
||||||
width: 70px;
|
width: 70px;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
left: -13px;
|
|
||||||
@include breakpoint(tablet) {
|
@include breakpoint(tablet) {
|
||||||
width: 170px;
|
width: 170px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
<div class="col post_teaser_body">
|
<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" %}
|
{% include "post/post_teaser/_title.html" %}
|
||||||
{% if post.body_html -%}
|
{% if post.body_html -%}
|
||||||
<div class="post_teaser_article_preview small post_teaser_clickable">
|
<div class="post_teaser_article_preview small post_teaser_clickable">
|
||||||
|
@ -7,15 +18,3 @@
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% include "post/post_teaser/_utilities_bar.html" %}
|
{% include "post/post_teaser/_utilities_bar.html" %}
|
||||||
</div>
|
</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 -%}
|
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
<div class="col post_teaser_body">
|
<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" %}
|
{% include "post/post_teaser/_title.html" %}
|
||||||
{% if post.body_html -%}
|
{% if post.body_html -%}
|
||||||
<div class="post_teaser_link_preview small post_teaser_clickable">
|
<div class="post_teaser_link_preview small post_teaser_clickable">
|
||||||
|
@ -7,15 +17,3 @@
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{% include "post/post_teaser/_utilities_bar.html" %}
|
{% include "post/post_teaser/_utilities_bar.html" %}
|
||||||
</div>
|
</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 -%}
|
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
<div class="col post_teaser_body">
|
<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 -%}
|
{% 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 -%}
|
{% 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>
|
<a href="{{ url_for('activitypub.post_ap', post_id=post.id) }}" aria-label="{{ _('Read post') }}"><span class="fe fe-reply"></span></a>
|
||||||
{% else -%}
|
{% 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>
|
<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>
|
</div>
|
||||||
{% endif -%}
|
{% 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>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue