Support for rendering of video file attachments

This commit is contained in:
2018-01-17 15:55:25 +01:00
parent 46beaece75
commit bdff391440
3 changed files with 30 additions and 1 deletions

View File

@@ -16,6 +16,9 @@
top: 15px
bottom: 15px
video
max-width: 100%
#blog_post-edit-form
padding: 20px

View File

@@ -0,0 +1,11 @@
| {% if 'link' in attachment and attachment['link'] != 'none' %}
| {% if attachment['link'] == 'self' %}
video(src="{{ var.link }}", alt="{{ file.filename }}", controls)
a.attachment(href="{{ file.link }}") {{ file.filename }}
| {% elif attachment['link'] == 'custom' %}
video(src="{{ var.link }}", alt="{{ file.filename }}", controls)
a.attachment(href="{{ attachment['link_custom'] }}") Learn more about this video
| {% endif %}
| {% else %}
video(src="{{ var.link }}", alt="{{ file.filename }}", controls)
| {% endif %}