36 lines
1.4 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-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 %}
{% if video %}
2016-04-30 11:57:52 +02:00
<section class="bordered-picture baguette" style="position: relative;">
2016-05-04 15:38:11 +02:00
<img class="lazy" data-original="{{ video.generate_thumbnail("2000") }}" src="" 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-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 %}