2022-04-15 16:45:38 +02:00
|
|
|
{% extends "base.twig" %}
|
|
|
|
|
2022-05-10 16:24:40 +02:00
|
|
|
{% block stylesheets %}
|
|
|
|
<link rel="stylesheet" href="{{ asset('assets/libraries/plyr.min.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ asset('assets/css/style.min.css') }}">
|
|
|
|
{% endblock %}
|
|
|
|
|
2022-04-15 16:45:38 +02:00
|
|
|
{% block main %}
|
|
|
|
<main>
|
|
|
|
|
|
|
|
<section class="gallery-section">
|
|
|
|
|
|
|
|
<article class="gallery">
|
|
|
|
<h2 class="gallery__title">{{ page.title }}</h2>
|
|
|
|
{% if page.text.isNotEmpty %}
|
|
|
|
<div class="gallery__introduction">{{ page.text.kirbytext|raw }}</div>
|
|
|
|
{% endif %}
|
2022-05-30 16:07:25 +02:00
|
|
|
{% if page.files.template("artwork").isNotEmpty %}
|
|
|
|
{% set artworks = page.files.template("artwork").sortBy('sort') %}
|
2022-05-10 16:24:40 +02:00
|
|
|
{% for artwork in artworks %}
|
|
|
|
<figure class="gallery__artwork">
|
|
|
|
{% if artwork.type == 'video' %}
|
2022-06-03 17:35:16 +02:00
|
|
|
{% 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 %}
|
2022-05-10 16:24:40 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if artwork.type == 'image' %}
|
|
|
|
<img class="gallery__image" src="{{ artwork.url }}" srcset="{{ artwork.srcset() }}" alt="{{ artwork.alt_text }}">
|
|
|
|
{% endif %}
|
|
|
|
{% if artwork.caption %}
|
|
|
|
<figcaption>{{ artwork.caption }}</figcaption>
|
|
|
|
{% endif %}
|
|
|
|
</figure>
|
2022-04-15 16:45:38 +02:00
|
|
|
{% endfor %}
|
2022-05-10 16:24:40 +02:00
|
|
|
{% endif %}
|
2022-04-15 16:45:38 +02:00
|
|
|
</article>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
</main>
|
|
|
|
{% endblock %}
|
2022-05-10 16:24:40 +02:00
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
<script src="{{ asset('assets/libraries/plyr.min.js') }}"></script>
|
|
|
|
<script src="{{ asset('assets/js/app.js') }}"></script>
|
|
|
|
{% endblock %}
|