fix video on light theme

This commit is contained in:
Adrien Beudin 2017-05-03 19:04:16 +02:00
parent caa433348f
commit fdc948b14b
3 changed files with 11 additions and 9 deletions

View File

@ -5,16 +5,17 @@
{% endif %}
{% if section.image.type == "video" %}
{% set video = Video(section.image) %}
{% set format = settings.ffmpeg.extension %}
{{ video.copy() }}
{% else %}
{% set image = Image(section.image) %}
{% set caption = section.text %}
{{ image.copy() }}
{% endif %}
{% set caption = section.text %}
{% if video %}
<section class="bordered-picture">
<video class="lazy" id="video" poster="{{ pathstatic }}/{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="{{ pathstatic }}/{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
<video class="responsive-video" id="video" poster="{{ pathstatic }}/{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="{{ pathstatic }}/{{ video }}.{{ format }}" type="video/{{ format}}">
</video>
</section>
{% else %}

View File

@ -5,6 +5,7 @@
{% endif %}
{% if section.image.type == "video" %}
{% set video = Video(section.image) %}
{% set format = settings.ffmpeg.extension %}
{{ video.copy() }}
{% else %}
{% set image = Image(section.image) %}
@ -13,8 +14,8 @@
<div class="full-picture">
<div class="image">
{% if video %}
<video autoplay loop muted class="fillWidth">
<source src="{{ pathstatic }}/{{ video }}" type="video/webm" data-source="{{ pathstatic }}/{{ video }}" data-format="vp8" data-extension="webm">
<video autoplay loop muted class="fillWidth responsive-video">
<source src="{{ pathstatic }}/{{ video }}.{{ format }}" type="video/{{ format}}">
</video>
{% else %}
<img src="{{ pathstatic }}/{{ image.generate_thumbnail("x800") }}">

View File

@ -7,18 +7,18 @@
{% for line in section.images %}
{% for image in line %}
{% if image.type == "video" %}
{% set caption = image.text %}
{% set video = Video(image) %}
{% set format = settings.ffmpeg.extension %}
{{ video.copy() }}
{% else %}
{% set caption = image.text %}
{% set image = Image(image) %}
{{ image.copy() }}
{% endif %}
{% set caption = image.text %}
<div class="image">
{% if video %}
<video id="video" poster="{{ pathstatic }}/{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="{{ pathstatic }}/{{ video }}" type="video/webm" data-source="{{ pathstatic }}/{{ video }}" data-format="vp8" data-extension="webm">
<video class="responsive-video" id="video" poster="{{ pathstatic }}/{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="{{ pathstatic }}/{{ video }}.{{ format }}" type="video/{{ format }}">
</video>
{% set video = "" %}
{% else %}