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