[mod] simplify template

This commit is contained in:
Laurent Peuch 2016-11-01 12:22:46 +01:00
parent b089fcb502
commit 081ce9df64

View File

@ -11,6 +11,7 @@
{% set caption = image.text %} {% set caption = image.text %}
{% set video = Video(image) %} {% set video = Video(image) %}
{{ video.copy() }} {{ video.copy() }}
<img class="lazy" data-original="{{ video.generate_thumbnail("600") }}" src="" alt=""> <img class="lazy" data-original="{{ video.generate_thumbnail("600") }}" src="" alt="">
<video class="lazy" id="video" poster="{{ video.generate_thumbnail("600") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted> <video class="lazy" id="video" poster="{{ video.generate_thumbnail("600") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<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">
@ -20,6 +21,7 @@
<h5 class="caption__overlay__title">{{ caption }}</h5> <h5 class="caption__overlay__title">{{ caption }}</h5>
</div> </div>
{% endif %} {% endif %}
{% else %} {% else %}
{% set caption = image.text %} {% set caption = image.text %}
{% set image = Image(image) %} {% set image = Image(image) %}
@ -37,13 +39,18 @@
</div> </div>
{% endif %} {% endif %}
</a> </a>
{% endif %} {% endif %}
</div> </div>
{% if not loop.last %} {% if not loop.last %}
<div class="separator"></div> <div class="separator"></div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
{% endfor %} {% endfor %}
</section> </section>