bordered video
This commit is contained in:
parent
6a6b3e8925
commit
5fd7b89ca9
@ -338,6 +338,7 @@ a.google {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.bordered-picture video,
|
||||
.picture video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -347,6 +348,12 @@ a.google {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.bordered-picture video {
|
||||
width: 77%;
|
||||
margin-left: 11.5%;
|
||||
margin-right: 11.5%;
|
||||
}
|
||||
|
||||
.bg-section {
|
||||
padding: 1px 0px;
|
||||
}
|
||||
|
@ -1,13 +1,23 @@
|
||||
{% if section.image.type == "video" %}
|
||||
{% set video = Video(section.image) %}
|
||||
{% else %}
|
||||
{% set image = Image(section.image) %}
|
||||
{% set caption = section.text %}
|
||||
{{ image.copy() }}
|
||||
{% endif %}
|
||||
{% if section.background %}
|
||||
<div style="padding: 1px 0px;background: {{ section.background }};">
|
||||
<div class="bg-section" style="background: {{ section.background }};">
|
||||
{% endif %}
|
||||
<section class="bordered-picture baguette">
|
||||
{% if video %}
|
||||
<img class="lazy" src="{{ video.generate_thumbnail("600") }}">
|
||||
<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">
|
||||
</video>
|
||||
{% else %}
|
||||
<div class="caption">
|
||||
<a href="{{ image }} {% if caption %}data-caption="{{ caption }}"{% endif %}">
|
||||
<img src="{{ image }}">
|
||||
<img class="lazy" data-original="{{ image }}">
|
||||
{% if caption %}
|
||||
<div class="caption__overlay">
|
||||
<h5 class="caption__overlay__title">{{ caption }}</h5>
|
||||
@ -15,6 +25,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% if section.background %}
|
||||
</div>
|
||||
|
@ -127,6 +127,7 @@ main {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bordered-picture video,
|
||||
.picture video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -136,6 +137,12 @@ main {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.bordered-picture video {
|
||||
width: 77%;
|
||||
margin-left: 11.5%;
|
||||
margin-right: 11.5%;
|
||||
}
|
||||
|
||||
div#bg-section {
|
||||
padding: 1px 0px;
|
||||
}
|
||||
|
@ -1,10 +1,20 @@
|
||||
{% if section.image.type == "video" %}
|
||||
{% set video = Video(section.image) %}
|
||||
{% else %}
|
||||
{% set image = Image(section.image) %}
|
||||
{% set caption = section.text %}
|
||||
{{ image.copy() }}
|
||||
{% endif %}
|
||||
{% if section.background %}
|
||||
<div style="padding: 1px 0px;background: {{ section.background }};">
|
||||
{% endif %}
|
||||
<div class="bordered-picture baguette caption">
|
||||
{% if video %}
|
||||
<img class="lazy" src="{{ video.generate_thumbnail("600") }}">
|
||||
<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">
|
||||
</video>
|
||||
{% else %}
|
||||
<a href="{{ image }}" {% if caption %}data-caption="{{ caption }}"{% endif %}>
|
||||
<img class="responsive-img" src="{{ image.generate_thumbnail("x2000") }}">
|
||||
{% if caption %}
|
||||
@ -13,7 +23,9 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if section.background %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
{% if video %}
|
||||
<div class="picture card-image">
|
||||
<img class="lazy" src="{{ video.generate_thumbnail("600") }}">
|
||||
<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">
|
||||
</video>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user