feat: show gif media

This commit is contained in:
Ayo Ayco 2024-04-24 12:46:23 +02:00
parent e4f8b03ae3
commit d4ab339173

View file

@ -68,9 +68,14 @@
<div class="card_content">
{{thread.content | safe}}
{% for media in thread.media_attachments%}
{% for media in thread.media_attachments %}
{% if media.type == 'image'%}
<img src="{{media.url}}" />
{% elif media.type == 'gifv' %}
<video controls autoplay>
<source src="{{media.url}}" type="video/mp4">
Your browser does not support the video tag.
</video>
{% endif %}
{% endfor %}
</div>
@ -87,6 +92,11 @@
{% for media in descendant.media_attachments%}
{% if media.type == 'image'%}
<img src="{{media.url}}" />
{% elif media.type == 'gifv' %}
<video controls autoplay>
<source src="{{media.url}}" type="video/mp4">
Your browser does not support the video tag.
</video>
{% endif %}
{% endfor %}
</div>