2017-05-03 19:04:16 +02:00

31 lines
1.0 KiB
HTML

{% if settings.settings.light_mode %}
{% set pathstatic = ".." %}
{% else %}
{% set pathstatic = "." %}
{% endif %}
<section class="pictures-group">
{% for line in section.images %}
{% for image in line %}
{% if image.type == "video" %}
{% set video = Video(image) %}
{% set format = settings.ffmpeg.extension %}
{{ video.copy() }}
{% else %}
{% set image = Image(image) %}
{{ image.copy() }}
{% endif %}
{% set caption = image.text %}
<div class="image">
{% if video %}
<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 }}">
</video>
{% set video = "" %}
{% else %}
<img src="{{ pathstatic }}/{{ image.generate_thumbnail("x800") }}" alt="{% if caption %}{{ caption }}{% endif %}">
{% endif %}
</div>
{% endfor %}
{% endfor %}
</section>