forked from forks/microblog.pub
Tweak attachments display
This commit is contained in:
parent
908f53ef4b
commit
d56d5f5a20
1 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@
|
||||||
|
|
||||||
{% if obj.attachment | not_only_imgs %}
|
{% if obj.attachment | not_only_imgs %}
|
||||||
<h3 class="l">Attachments</h3>
|
<h3 class="l">Attachments</h3>
|
||||||
<ul style="padding:0;">
|
<ul style="padding:0;list-style-type: none;">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for a in obj.attachment %}
|
{% for a in obj.attachment %}
|
||||||
{% if (a.mediaType and a.mediaType.startswith("image/")) or (a.type and a.type == 'Image') %}
|
{% if (a.mediaType and a.mediaType.startswith("image/")) or (a.type and a.type == 'Image') %}
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
{% elif (a.mediaType and a.mediaType.startswith("video/")) %}
|
{% elif (a.mediaType and a.mediaType.startswith("video/")) %}
|
||||||
<li><video controls preload="metadata" src="{{ a.url | get_attachment_url(None) }}" width="480"></video></li>
|
<li><video controls preload="metadata" src="{{ a.url | get_attachment_url(None) }}" width="480"></video></li>
|
||||||
{% elif (a.mediaType and a.mediaType.startswith("audio/")) %}
|
{% elif (a.mediaType and a.mediaType.startswith("audio/")) %}
|
||||||
<li><audio controls preload="metadata" src="{{ a.url | get_attachment_url(None) }}"></audio></li>
|
<li><audio controls preload="metadata" src="{{ a.url | get_attachment_url(None) }}" style="width:480px;"></audio></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{a.url }}" class="l">{% if a.filename %}{{ a.filename }}{% else %}{{ a.url }}{% endif %}</a></li>
|
<li><a href="{{a.url }}" class="l">{% if a.filename %}{{ a.filename }}{% else %}{{ a.url }}{% endif %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue