forked from ruangrupa/konfluks
add support for videos in posts
This commit is contained in:
@ -5,13 +5,25 @@ authors: ["{{ post_metadata.account.display_name }}"]
|
||||
contributors: ["{{ post_metadata.account.acct}}"]
|
||||
avatar: {{ post_metadata.account.avatar }}
|
||||
categories: ["shouts"]
|
||||
images: [{% for i in post_metadata.media_attachments %} {{ i.url }}, {% endfor %}]
|
||||
title: {{ post_metadata.account.display_name }}
|
||||
tags: [{% for i in post_metadata.tags %} "{{ i.name }}", {% endfor %}]
|
||||
images: [{% for i in post_metadata.media_attachments %}{% if i.type == "image" %}"{{ i.url | localize_media_url }}", {%endif%}{% endfor %}]
|
||||
videos: [{% for i in post_metadata.media_attachments %}{% if i.type == "video" %}"{{ i.url | localize_media_url }}", {%endif%}{% endfor %}]
|
||||
---
|
||||
|
||||
{% for item in post_metadata.media_attachments %}
|
||||
{% if item.type == "image" %}
|
||||
<img src="{{item.url | localize_media_url }}" alt="{{item.description}}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for item in post_metadata.media_attachments %}
|
||||
{% if item.type == "video" %}
|
||||
<video controls width="540px" preload="none" poster="thumbnail.png">
|
||||
<source src="{{item.url | localize_media_url }}" type="video/mp4">
|
||||
{% if item.description %}{{item.description}}{% endif %}
|
||||
</video>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{{ post_metadata.content | filter_mastodon_urls }}
|
||||
|
Reference in New Issue
Block a user