<section class=" content-block js-fade-in">
<div class="container-sm container">
{{ include('Includes/title-block.html.twig', {
title: 'tour-detail.Gallery'|trans,
isCentered: true
}) }}
</div>
<div class="overflow-x-hidden">
<div class="container-sm container">
<div class="js-render-template" style="min-height: 1px;">
<template class="js-render-template__template">
<div class="js-lightbox js-gallery gallery">
<div class="swiper-container js-gallery__slider gallery__container">
<div class="swiper-wrapper gallery__wrapper">
{% for image in tour.images %}
{% set imageAlt = tour.category[0].name ~ ' ' ~ tour.name ~ ' - Touren-Impression #2.' ~ loop.index %}
{% if image.metadata is iterable %}
{% for metadata in heroImage.metadata %}
{% if metadata['name'] == 'alt' %}
{% set imageAlt = metadata['data'] %}
{% endif %}
{% endfor %}
{% endif %}
<div class="swiper-slide gallery-swiper-slide">
<div class="gallery-item">
<div class="gallery-item__counter">
<span class="text-primary">{{ loop.index }}</span>/{{ tour.images|length }}
</div>
<a href="{{ image.getThumbnail('lightbox') }}" class="gallery-item__img-wrapper js-lightbox__item embed-responsive-16by9 embed-responsive" data-sub-html="image description">
{{ image.thumbnail('gallery-item').html({
imgAttributes: {
class: 'js-lazy-img embed-responsive-item'
},
alt: imageAlt,
lowQualityPlaceholder: true,
}) | raw }}
</a>
{% set description = getImageDescription(image) %}
{% if description %}
<div class="gallery-item__text">
{{ description }}
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class="swiper-navigation gallery__swiper-navigation">
<button class="swiper-button swiper-button--prev gallery__btn js-gallery__prev"><span class="icon icon-arrow-right" aria-label="Previous"></span></button>
<button class="swiper-button swiper-button--next gallery__btn js-gallery__next"><span class="icon icon-arrow-right" aria-label="Next"></span></button>
</div>
</div>
</div>
</template>
</div>
</div>
</div>
</section>