mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-03 21:17:37 +03:00
Absolutly no jumping when images (fail to) load
This commit is contained in:
parent
c299e128ab
commit
baf7272cfd
6 changed files with 77 additions and 40 deletions
|
@ -61,7 +61,17 @@
|
|||
|
||||
<!-- POST MEDIA -->
|
||||
{% if post.post_type == "image" %}
|
||||
<img class="post_media" alt="Post image" width="{{ post.media.width }}px" height="{{ post.media.height}}px" src="{{ post.media.url }}"/>
|
||||
<a href="{{ post.media.url }}" style="display:contents" >
|
||||
<svg class="post_media"
|
||||
width="{{ post.media.width }}px"
|
||||
height="{{ post.media.height }}px"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<image width="100%" height="100%" href="{{ post.media.url }}"/>
|
||||
<desc>
|
||||
<img alt="Post image" src="{{ post.media.url }}"/>
|
||||
</dev>
|
||||
</svg>
|
||||
</a>
|
||||
{% else if post.post_type == "video" || post.post_type == "gif" %}
|
||||
<video class="post_media" src="{{ post.media.url }}" controls autoplay loop></video>
|
||||
{% else if post.post_type == "link" %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue