2016-10-31 14:20:43 +01:00
|
|
|
{% if settings.settings.light_mode %}
|
|
|
|
{% set pathstatic = ".." %}
|
|
|
|
{% else %}
|
|
|
|
{% set pathstatic = "." %}
|
|
|
|
{% endif %}
|
2016-05-26 17:04:57 +02:00
|
|
|
{% if section.image.type == "video" %}
|
|
|
|
{% set video = Video(section.image) %}
|
2017-05-03 19:04:16 +02:00
|
|
|
{% set format = settings.ffmpeg.extension %}
|
2016-05-26 17:04:57 +02:00
|
|
|
{{ video.copy() }}
|
|
|
|
{% else %}
|
|
|
|
{% set image = Image(section.image) %}
|
|
|
|
{{ image.copy() }}
|
|
|
|
{% endif %}
|
2017-05-03 19:04:16 +02:00
|
|
|
{% set caption = section.text %}
|
2016-05-26 17:04:57 +02:00
|
|
|
{% if video %}
|
|
|
|
<section class="bordered-picture">
|
2017-05-03 19:04:16 +02:00
|
|
|
<video class="responsive-video" id="video" poster="{{ pathstatic }}/{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
|
|
|
|
<source src="{{ pathstatic }}/{{ video }}.{{ format }}" type="video/{{ format}}">
|
2016-05-26 17:04:57 +02:00
|
|
|
</video>
|
|
|
|
</section>
|
|
|
|
{% else %}
|
|
|
|
<section class="bordered-picture">
|
2016-10-31 14:20:43 +01:00
|
|
|
<img src="{{ pathstatic }}/{{ image.generate_thumbnail("x800") }}" alt="{% if caption %}{{ caption }}{% endif %}">
|
2016-05-26 17:04:57 +02:00
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|