2016-04-30 10:24:37 +02:00
{% if section.image.type == "video" %}
{% set video = Video(section.image) %}
2017-04-27 17:59:46 +02:00
{% set format = settings.ffmpeg.extension %}
2016-04-30 10:24:37 +02:00
{% 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 }};" >
2017-04-27 17:59:46 +02:00
{% endif %}
< div class = "bordered-picture baguette caption" >
{% if video %}
< img class = "responsive-img lazy z-depth-2" data-original = "{{ video.generate_thumbnail(" 2000 " ) } } " alt = "" >
2017-06-04 21:54:04 +02:00
< video class = "lazy responsive-video" id = "{{ video }}" onclick = "goFullscreen('{{ video }}');" poster = "{{ video.generate_thumbnail(" 2000 " ) } } " alt = "" autoplay = "autoplay" loop = "loop" preload = "auto" muted >
2017-04-27 17:59:46 +02:00
< 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 >
2016-05-06 14:16:43 +02:00
{% endif %}
2017-04-27 17:59:46 +02:00
< / div >
{% if section.background %}
2016-04-09 09:33:48 +02:00
< / div >
{% endif %}