{% set class = class|default('') %}
{% set albums = albums|default([]) %}
{% set title = title|default('') %}
{% if albums|length %}
<div class="pipeline {{ class }}">
<div class="container container_spacer">
<div class="pipeline__inner">
<div class="pipeline__title h1 text__black-text">
{{ title }}
</div>
<div class="pipeline__main" data-pipeline-slider-container>
<div class="pipeline__slider-wrap swiper" data-pipeline-slider>
<ul class="pipeline__slider swiper-wrapper">
{% for album in albums %}
{% set albumSlides = album.slides.toArray() %}
<li class="pipeline__slide swiper-slide">
{% for slide in albumSlides %}
{% if slide is has_image('imageName') %}
{% set image = vich_uploader_asset(slide, 'imageFile') %}
<a href="{{ image }}"
title="{{ album.name }}"
class="pipeline__link"
data-fslightbox="{{ album.id }}"
>
<span class="pipeline__picture-wrap">
{% include '_parts/image/adaptive-image.html.twig' with {
object: slide,
field: 'imageFile',
size: 'construction_progress_slide_preview',
alt: album.name,
class: 'pipeline__image',
classPicture: 'pipeline__picture',
} %}
<span class="pipeline__picture-icon"></span>
</span>
<span class="pipeline__link-bottom">
<span class="pipeline__link-title text__body">
{{ album.name }}
</span>
<span class="pipeline__link-count">
<span class="pipeline__link-count-icon">
{{ source('_parts/icons/camera.svg') }}
</span>
<span class="pipeline__link-count-title text__body">
{{ albumSlides|length }}
</span>
</span>
</span>
</a>
{% endif %}
{% endfor %}
</li>
{% endfor %}
</ul>
</div>
{% if albums|length > 1 %}
{% set arrowClass = '' %}
{% if albums|length == 2 %}
{% set arrowClass = 'arrow__two ' %}
{% endif %}
{% if albums|length == 3 %}
{% set arrowClass = 'arrow__three ' %}
{% endif %}
{% set arrowClass = arrowClass ~ 'pipeline__arrows' %}
<div class="pipeline__nav">
<div class="pipeline__pagination pagination swiper-pagination"
data-pipeline-slider-pagination
></div>
{% include '_parts/nav/arrows.html.twig' with {
class: arrowClass,
isAccent: true,
datasetLeft: 'data-pipeline-slider-left',
datasetRight: 'data-pipeline-slider-right',
} %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}