2016-04-30 10:24:37 +02:00
|
|
|
{% if section.image.type == "video" %}
|
|
|
|
{% set video = Video(section.image) %}
|
|
|
|
{% else %}
|
2016-02-09 07:31:52 +01:00
|
|
|
{% set image = Image(section.image) %}
|
2016-02-26 14:39:19 +01:00
|
|
|
{% set caption = section.text %}
|
2016-04-30 10:24:37 +02:00
|
|
|
{{ image.copy() }}
|
2016-04-09 09:33:48 +02:00
|
|
|
{% endif %}
|
2016-04-13 11:45:26 +02:00
|
|
|
{% if section.background %}
|
2016-04-30 10:24:37 +02:00
|
|
|
<div class="bg-section" style="background: {{ section.background }};">
|
|
|
|
{% endif %}
|
|
|
|
{% if video %}
|
2016-04-30 11:57:52 +02:00
|
|
|
<section class="bordered-picture baguette" style="position: relative;">
|
2016-05-03 10:14:49 +02:00
|
|
|
<img class="lazy" data-original="{{ video.generate_thumbnail("2000") }}" src="{{ video.generate_thumbnail("2000") }}" alt="">
|
2016-05-02 09:52:10 +02:00
|
|
|
<video class="lazy" id="video" poster="{{ video.generate_thumbnail("2000") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
|
2016-04-30 10:24:37 +02:00
|
|
|
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
|
|
|
|
</video>
|
|
|
|
{% else %}
|
2016-04-30 11:57:52 +02:00
|
|
|
<section class="bordered-picture baguette">
|
2016-04-30 10:24:37 +02:00
|
|
|
<div class="caption">
|
|
|
|
<a href="{{ image }} {% if caption %}data-caption="{{ caption }}"{% endif %}">
|
2016-05-03 10:14:49 +02:00
|
|
|
<img class="lazy" src="{{ image }}" data-original="{{ image }}" alt="">
|
2016-04-30 10:24:37 +02:00
|
|
|
{% if caption %}
|
|
|
|
<div class="caption__overlay">
|
|
|
|
<h5 class="caption__overlay__title">{{ caption }}</h5>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</section>
|
|
|
|
{% if section.background %}
|
2016-04-09 09:33:48 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|