32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
{% if section.image.type == "video" %}
|
|
{% set video = Video(section.image) %}
|
|
{% else %}
|
|
{% set image = Image(section.image) %}
|
|
{% set caption = section.text %}
|
|
{{ image.copy() }}
|
|
{% endif %}
|
|
{% if section.background %}
|
|
<div style="padding: 1px 0px;background: {{ section.background }};">
|
|
{% endif %}
|
|
<div class="bordered-picture baguette caption">
|
|
{% if video %}
|
|
<img class="lazy" src="{{ video.generate_thumbnail("2000") }}">
|
|
<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>
|
|
{% 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 %}
|
|
</div>
|
|
{% endif %}
|
|
|