Video support
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<div class="note-wrapper">
|
||||
<div style="clear:both;height:20px;">
|
||||
<a href="{{ actor | url_or_id | get_url }}" style="margin:0;text-decoration:none;margin: 0;text-decoration: none;display: block;width: 80%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float: left;" class="no-hover"><strong>{{ actor.name or actor.preferredUsername }}</strong>
|
||||
<span class="l">@{% if not no_color and obj.id | is_from_outbox %}<span class="pcolor">{{ actor.preferredUsername }}</span>{% else %}{{ actor.preferredUsername }}{% endif %}@{% if not no_color and obj.id | is_from_outbox %}<span class="pcolor">{{ actor | url_or_id | get_url | domain }}</span>{% else %}{{ actor | url_or_id | get_url | domain }}{% endif %}</span></a>
|
||||
<li><span class="l">@{% if not no_color and obj.id | is_from_outbox %}<span class="pcolor">{{ actor.preferredUsername }}</span>{% else %}{{ actor.preferredUsername }}{% endif %}@{% if not no_color and obj.id | is_from_outbox %}<span class="pcolor">{{ actor | url_or_id | get_url | domain }}</span>{% else %}{{ actor | url_or_id | get_url | domain }}{% endif %}</span></a>
|
||||
|
||||
{% if not perma %}
|
||||
<span style="float:right;width: 20%;text-align: right;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: block;">
|
||||
@@ -46,7 +46,14 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if obj.summary %}<p class="p-summary">{{ obj.summary | clean }}</p>{% endif %}
|
||||
{% if obj | has_type('Video') %}
|
||||
<div class="note-video">
|
||||
<video controls preload="metadata" src="{{ obj.url | get_video_link }}" width="480">
|
||||
</video>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="note-container{% if perma %} perma{%endif%} p-name e-content">
|
||||
|
||||
{% if obj | has_type('Article') %}
|
||||
{{ obj.name }} <a href="{{ obj | url_or_id | get_url }}">{{ obj | url_or_id | get_url }}</a>
|
||||
{% else %}
|
||||
@@ -57,12 +64,14 @@
|
||||
{% if obj.attachment and obj | has_type('Note') %}
|
||||
<div style="padding:20px 0;">
|
||||
{% if obj.attachment | not_only_imgs %}
|
||||
<h3 class="l">Attachment</h3>
|
||||
<ul>
|
||||
<h3 class="l">Attachments</h3>
|
||||
<ul style="padding:0;">
|
||||
{% endif %}
|
||||
{% for a in obj.attachment %}
|
||||
{% if (a.mediaType and a.mediaType.startswith("image/")) or (a.type and a.type == 'Image') %}
|
||||
<a href="{{ a.url | get_attachment_url(None) }}"><img src="{{a.url | get_attachment_url(720) }}" class="img-attachment"></a>
|
||||
{% elif (a.mediaType and a.mediaType.startswith("video/")) %}
|
||||
<li><video controls preload="metadata" src="{{ a.url }}" width="480"></video></li>
|
||||
{% else %}
|
||||
<li><a href="{{a.url }}" class="l">{% if a.filename %}{{ a.filename }}{% else %}{{ a.url }}{% endif %}</a></li>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user