[mod] simplify template
This commit is contained in:
parent
bed41e136f
commit
76afaf140d
@ -1,11 +1,7 @@
|
|||||||
{% if section.image.type == "video" %}
|
{% if section.image.type == "video" %}
|
||||||
{% set video = Video(section.image) %}
|
{% set video = Video(section.image) %}
|
||||||
{{ video.copy() }}
|
{{ video.copy() }}
|
||||||
{% else %}
|
|
||||||
{% set image = Image(section.image) %}
|
|
||||||
{{ image.copy() }}
|
|
||||||
{% endif %}
|
|
||||||
{% if video %}
|
|
||||||
<section class="full-picture">
|
<section class="full-picture">
|
||||||
<div class="video-container">
|
<div class="video-container">
|
||||||
{% if section.text %}
|
{% if section.text %}
|
||||||
@ -22,14 +18,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<video autoplay loop muted class="fillWidth">
|
<video autoplay loop muted class="fillWidth">
|
||||||
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
|
<source src="{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<img class="lazy full-picture" src="{{ video.generate_thumbnail("2000") }}">
|
<img class="lazy full-picture" src="{{ video.generate_thumbnail("2000") }}">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
{% set image = Image(section.image) %}
|
||||||
|
{{ image.copy() }}
|
||||||
|
|
||||||
<section class="full-picture" style="background: transparent url('{{ image }}') no-repeat fixed center top / cover, transparent url('{{ image.generate_thumbnail("x450") }}') no-repeat fixed center top / cover;">
|
<section class="full-picture" style="background: transparent url('{{ image }}') no-repeat fixed center top / cover, transparent url('{{ image.generate_thumbnail("x450") }}') no-repeat fixed center top / cover;">
|
||||||
|
|
||||||
{% if section.text %}
|
{% if section.text %}
|
||||||
<div class="picture-text">
|
<div class="picture-text">
|
||||||
<div class="picture-text-column">
|
<div class="picture-text-column">
|
||||||
@ -44,5 +48,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user