Add poster field to video artwork blueprints
This commit is contained in:
parent
c0e9465298
commit
f4d9653fe6
3 changed files with 30 additions and 6 deletions
|
@ -20,9 +20,15 @@
|
|||
{% for artwork in artworks %}
|
||||
<figure class="gallery__artwork">
|
||||
{% if artwork.type == 'video' %}
|
||||
<video class="gallery__video" controls playsinline preload="metadata">
|
||||
<source src="{{ artwork.url }}" type="video/mp4" />
|
||||
</video>
|
||||
{% if artwork.poster is not empty %}
|
||||
<video class="gallery__video" data-poster="{{ artwork.poster.toFile.url }}" preload="metadata" controls playsinline>
|
||||
<source src="{{ artwork.url }}" type="video/mp4"/>
|
||||
</video>
|
||||
{% else %}
|
||||
<video class="gallery__video" preload="metadata" controls playsinline>
|
||||
<source src="{{ artwork.url }}" type="video/mp4"/>
|
||||
</video>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if artwork.type == 'image' %}
|
||||
<img class="gallery__image" src="{{ artwork.url }}" srcset="{{ artwork.srcset() }}" alt="{{ artwork.alt_text }}">
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
<nav class="home__nav" aria-label="Menu">
|
||||
{% set navItemNo = 1 %}
|
||||
{% for gallery in pages.template('gallery') %}
|
||||
<div class="home__nav-item-{{ navItemNo }}">
|
||||
<a href="{{ gallery.url }}" target="_self" class="home__nav-link">{{ gallery.title }}</a>
|
||||
</div>
|
||||
<div class="home__nav-item-{{ navItemNo }}">
|
||||
<a href="{{ gallery.url }}" target="_self" class="home__nav-link">{{ gallery.title }}</a>
|
||||
</div>
|
||||
{% set navItemNo = navItemNo + 1 %}
|
||||
{% endfor %}
|
||||
<div class="home__nav-image" aria-hidden="true">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue