56 lines
2.2 KiB
HTML
Raw Normal View History

2016-04-13 11:45:26 +02:00
{% if section.background %}
2016-11-04 12:55:02 +01:00
<div class="bg-section" style="background: {{ section.background }};">
{% endif %}
<section class="pictures-group baguette" {% if section.css %}style="{{ section.css }}"{% endif %} >
2016-11-04 12:55:02 +01:00
{% for line in section.images %}
2016-11-01 11:39:48 +01:00
<div class="pictures-line">
2016-11-04 12:55:02 +01:00
{% for image in line %}
{% set caption = image.text %}
{% if image.type == "video" %}
{% set video = Video(image) %}
{% set format = settings.ffmpeg.extension %}
{{ video.copy() }}
{% set ratio = video.ratio %}
{% else %}
{% set image = Image(image) %}
{{ image.copy() }}
{% set ratio = image.ratio %}
{% endif %}
<div class="picture caption" style="flex-grow: {{ ratio }}">
2016-11-01 11:39:48 +01:00
{% if image.type == "video" %}
2016-11-04 12:55:02 +01:00
<img class="lazy" data-original="{{ video.generate_thumbnail("600") }}" src="" alt="">
2017-06-04 21:54:04 +02:00
<video class="lazy responsive-video" id="{{ video }}" onclick="goFullscreen('{{ video }}');" poster="{{ video.generate_thumbnail("600") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
2017-04-25 16:24:41 +02:00
<source src="{{ video }}.{{ format }}" type="video/{{ format }}">
2016-11-04 12:55:02 +01:00
</video>
{% if caption %}
<div class="caption__overlay">
<h5 class="caption__overlay__title">{{ caption }}</h5>
2015-12-09 06:44:23 +01:00
</div>
2016-11-01 11:39:48 +01:00
{% endif %}
2016-11-04 12:55:02 +01:00
{% else %}
<a href="{{ image }}" {% if caption %}data-caption="{{ caption }}"{% endif %}
data-at-450="{{ image.generate_thumbnail("x450") }}"
data-at-800="{{ image.generate_thumbnail("x800") }}"
data-at-1366="{{ image.generate_thumbnail("x1366") }}"
data-at-1920="{{ image.generate_thumbnail("x1920") }}"
>
<img class="lazy" src="" data-original="{{ image.generate_thumbnail("x600") }}" alt="">
{% if caption %}
<div class="caption__overlay">
<h5 class="caption__overlay__title">{{ caption }}</h5>
</div>
{% endif %}
</a>
{% endif %}
</div>
{% if not loop.last %}
<div class="separator"></div>
{% endif %}
{% endfor %}
2016-11-01 11:39:48 +01:00
</div>
2016-11-04 12:55:02 +01:00
{% endfor %}
</section>
{% if section.background %}
</div>
2016-04-09 09:33:48 +02:00
{% endif %}