37 lines
1.5 KiB
HTML
37 lines
1.5 KiB
HTML
{% if section.image.type == "video" %}
|
|
{% set video = Video(section.image) %}
|
|
{% set format = settings.ffmpeg.extension %}
|
|
{% 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="responsive-img lazy z-depth-2" data-original="{{ video.generate_thumbnail("2000") }}" alt="">
|
|
<video class="lazy responsive-video" id="{{ video }}" onclick="goFullscreen('{{ video }}');" poster="{{ video.generate_thumbnail("2000") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
|
|
<source src="{{ video }}.{{ format }}" type="video/{{ format }}">
|
|
</video>
|
|
{% else %}
|
|
<a href="{{ image }}" {% if caption %}data-caption="{{ caption }}"{% endif %}
|
|
data-at-450="{{ image.generate_thumbnail("x450") }}"
|
|
data-at-800="{{ image.generate_thumbnail("x800") }}"
|
|
data-at-1366="{{ image.generate_thumbnail("x1366") }}"
|
|
data-at-1920="{{ image.generate_thumbnail("x1920") }}"
|
|
>
|
|
<img class="responsive-img lazy z-depth-2" data-original="{{ image.generate_thumbnail("x2000") }}" alt="">
|
|
{% 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 %}
|