45 lines
1.7 KiB
HTML
Raw Normal View History

2016-04-30 10:24:37 +02:00
{% if section.image.type == "video" %}
{% set video = Video(section.image) %}
2016-05-26 17:03:43 +02:00
{% set caption = section.text %}
2016-05-04 15:38:11 +02:00
{{ video.copy() }}
2016-04-30 10:24:37 +02:00
{% else %}
{% 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 %}
2016-05-26 17:03:43 +02:00
{% if video %}
2016-04-30 11:57:52 +02:00
<section class="bordered-picture baguette" style="position: relative;">
2016-05-26 17:03:43 +02:00
<div class="caption">
<img class="lazy" data-original="{{ video.generate_thumbnail("2000") }}" src="" alt="">
<video class="lazy" id="video" poster="{{ video.generate_thumbnail("2000") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
</video>
{% if caption %}
<div class="caption__overlay">
<h5 class="caption__overlay__title">{{ caption }}</h5>
</div>
{% endif %}
</div>
</section>
{% 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">
2016-05-26 17:03:43 +02:00
<a href="{{ image }}" {% if caption %}data-caption="{{ caption }}"{% endif %}>
2016-05-04 15:38:11 +02:00
<img class="lazy" src="" 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 %}