32 lines
1.1 KiB
HTML
Raw Normal View History

2016-04-30 10:24:37 +02:00
{% if section.image.type == "video" %}
{% set video = Video(section.image) %}
{% else %}
2016-03-30 13:32:07 +02:00
{% set image = Image(section.image) %}
{% set caption = section.text %}
2016-04-30 10:24:37 +02:00
{{ image.copy() }}
2016-04-09 09:33:48 +02:00
{% endif %}
{% if section.background %}
2016-04-30 10:24:37 +02:00
<div style="padding: 1px 0px;background: {{ section.background }};">
{% endif %}
<div class="bordered-picture baguette caption">
{% if video %}
<img class="lazy" src="{{ video.generate_thumbnail("600") }}">
<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 %}
<a href="{{ image }}" {% if caption %}data-caption="{{ caption }}"{% endif %}>
<img class="responsive-img" src="{{ image.generate_thumbnail("x2000") }}">
{% if caption %}
<div class="caption__overlay card-panel center">
<h5 class="black-white">{{ caption }}</h5>
</div>
{% endif %}
</a>
{% endif %}
</div>
{% if section.background %}
2016-04-09 09:33:48 +02:00
</div>
{% endif %}
2016-04-30 10:24:37 +02:00