{% if settings.settings.light_mode %}
{% set pathstatic = ".." %}
{% else %}
{% set pathstatic = "." %}
{% endif %}
{% if section.image.type == "video" %}
{% set video = Video.get(link + "/" + pathstatic, section.image) %}
{% set format = settings.ffmpeg.extension %}
{% set vid = video.reencode((1280, 720)) %}
{% else %}
{% set image = Image.get(link + "/" + pathstatic, section.image) %}
{% endif %}
{% set caption = section.text %}
{% if video %}
<section class="bordered-picture">
  <video class="responsive-video" id="video" poster="{{ pathstatic }}/{{ video.thumbnail((None, 800)) }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
	  <source src="{{ pathstatic }}/{{ vid }}" type="video/{{ format}}">
    </video>
</section>
{% else %}
<section class="bordered-picture">
  <img src="{{ pathstatic }}/{{ image.thumbnail((None, 800)) }}" alt="{% if caption %}{{ caption }}{% endif %}">
</section>
{% endif %}

