mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
display image posts the same size as lemmy does
This commit is contained in:
parent
1cb31a0794
commit
5fc07c6604
3 changed files with 4 additions and 3 deletions
|
@ -825,6 +825,7 @@ fieldset legend {
|
|||
|
||||
.post_image img {
|
||||
max-width: 100%;
|
||||
max-height: 90vh;
|
||||
}
|
||||
|
||||
.render_username {
|
||||
|
|
|
@ -459,6 +459,7 @@ html {
|
|||
.post_image {
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 90vh;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,11 +32,10 @@
|
|||
<div class="post_image">
|
||||
{% if post.image_id %}
|
||||
{% if low_bandwidth %}
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.thumbnail_url() }}" alt="{{ post.image.alt_text if post.image.alt_text else post.title }}"
|
||||
width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
|
||||
{% else %}
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.medium_url() }}" alt="{{ post.image.alt_text if post.image.alt_text else post.title }}"
|
||||
width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
|
||||
{% else %}
|
||||
<a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.view_url() }}" alt="{{ post.image.alt_text if post.image.alt_text else post.title }}"></a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="Go to image"><img src="{{ post.url }}" style="max-width: 100%; height: auto;" /></a>
|
||||
|
|
Loading…
Reference in a new issue