43 lines
1.7 KiB
HTML
Raw Normal View History

2016-04-13 11:45:26 +02:00
{% if section.background %}
2016-04-29 12:40:34 +02:00
<div class="bg-section" style="background: {{ section.background }};">
{% endif %}
<section class="pictures-group baguette">
{% for line in section.images %}
2015-12-09 06:44:23 +01:00
<div class="pictures-line">
{% for image in line %}
2016-04-29 12:40:34 +02:00
{% if image.type == "video" %}
{% set video = Video(image) %}
{{ video.copy() }}
{% else %}
2016-02-26 14:39:19 +01:00
{% set caption = image.text %}
{% set image = Image(image) %}
{{ image.copy() }}
2016-04-29 12:40:34 +02:00
{% endif %}
2016-02-26 14:39:19 +01:00
<div class="picture caption">
2016-04-29 12:40:34 +02:00
{% if video %}
2016-05-03 09:37:43 +02:00
<img class="lazy" src="{{ video.generate_thumbnail("600") }}"alt="">
2016-04-29 12:40:34 +02:00
<video class="lazy" id="video" poster="{{ video.generate_thumbnail("600") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
</video>
{% else %}
2016-02-26 19:52:14 +01:00
<a href="{{ image }}" {% if caption %}data-caption="{{ caption }}"{% endif %}>
2016-05-03 09:37:43 +02:00
<img class="lazy" data-original="{{ image.generate_thumbnail("x600") }}" alt="">
2016-02-26 14:39:19 +01:00
{% if caption %}
<div class="caption__overlay">
<h5 class="caption__overlay__title">{{ caption }}</h5>
</div>
{% endif %}
</a>
2016-04-29 12:40:34 +02:00
{% endif %}
2016-02-26 14:39:19 +01:00
</div>
2015-12-09 06:44:23 +01:00
{% if not loop.last %}
2016-02-26 14:39:19 +01:00
<div class="separator"></div>
2015-12-09 06:44:23 +01:00
{% endif %}
{% endfor %}
</div>
2016-02-26 14:39:19 +01:00
{% endfor %}
2016-04-29 12:40:34 +02:00
</section>
{% if section.background %}
2016-04-09 09:33:48 +02:00
</div>
{% endif %}