feat: show gif media
This commit is contained in:
parent
e4f8b03ae3
commit
d4ab339173
1 changed files with 11 additions and 1 deletions
|
@ -68,9 +68,14 @@
|
||||||
<div class="card_content">
|
<div class="card_content">
|
||||||
{{thread.content | safe}}
|
{{thread.content | safe}}
|
||||||
|
|
||||||
{% for media in thread.media_attachments%}
|
{% for media in thread.media_attachments %}
|
||||||
{% if media.type == 'image'%}
|
{% if media.type == 'image'%}
|
||||||
<img src="{{media.url}}" />
|
<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 %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,6 +92,11 @@
|
||||||
{% for media in descendant.media_attachments%}
|
{% for media in descendant.media_attachments%}
|
||||||
{% if media.type == 'image'%}
|
{% if media.type == 'image'%}
|
||||||
<img src="{{media.url}}" />
|
<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 %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue