templates/_parts/index/_pipeline.html.twig line 1

Open in your IDE?
  1. {% set class = class|default('') %}
  2. {% set albums = albums|default([]) %}
  3. {% set title = title|default('') %}
  4. {% if albums|length %}
  5.     <div class="pipeline {{ class }}">
  6.         <div class="container container_spacer">
  7.             <div class="pipeline__inner">
  8.                 <div class="pipeline__title h1 text__black-text">
  9.                     {{ title }}
  10.                 </div>
  11.                 <div class="pipeline__main" data-pipeline-slider-container>
  12.                     <div class="pipeline__slider-wrap swiper" data-pipeline-slider>
  13.                         <ul class="pipeline__slider swiper-wrapper">
  14.                             {% for album in albums %}
  15.                                 {% set albumSlides = album.slides.toArray() %}
  16.                                 <li class="pipeline__slide swiper-slide">
  17.                                     {% for slide in albumSlides %}
  18.                                         {% if slide is has_image('imageName') %}
  19.                                             {% set image = vich_uploader_asset(slide, 'imageFile')  %}
  20.                                             <a href="{{ image }}"
  21.                                                title="{{ album.name }}"
  22.                                                class="pipeline__link"
  23.                                                data-fslightbox="{{ album.id }}"
  24.                                             >
  25.                                                 <span class="pipeline__picture-wrap">
  26.                                                     {% include '_parts/image/adaptive-image.html.twig' with {
  27.                                                         object: slide,
  28.                                                         field: 'imageFile',
  29.                                                         size: 'construction_progress_slide_preview',
  30.                                                         alt: album.name,
  31.                                                         class: 'pipeline__image',
  32.                                                         classPicture: 'pipeline__picture',
  33.                                                     } %}
  34.                                                     <span class="pipeline__picture-icon"></span>
  35.                                                 </span>
  36.                                                 <span class="pipeline__link-bottom">
  37.                                                     <span class="pipeline__link-title text__body">
  38.                                                         {{ album.name }}
  39.                                                     </span>
  40.                                                     <span class="pipeline__link-count">
  41.                                                         <span class="pipeline__link-count-icon">
  42.                                                             {{ source('_parts/icons/camera.svg') }}
  43.                                                         </span>
  44.                                                         <span class="pipeline__link-count-title text__body">
  45.                                                             {{ albumSlides|length }}
  46.                                                         </span>
  47.                                                     </span>
  48.                                                 </span>
  49.                                             </a>
  50.                                         {% endif %}
  51.                                     {% endfor %}
  52.                                 </li>
  53.                             {% endfor %}
  54.                         </ul>
  55.                     </div>
  56.                     {% if albums|length > 1 %}
  57.                         {% set arrowClass = '' %}
  58.                         {% if albums|length == 2 %}
  59.                             {% set arrowClass = 'arrow__two ' %}
  60.                         {% endif %}
  61.                         {% if albums|length == 3 %}
  62.                             {% set arrowClass = 'arrow__three ' %}
  63.                         {% endif %}
  64.                         {% set arrowClass = arrowClass ~ 'pipeline__arrows' %}
  65.                         <div class="pipeline__nav">
  66.                             <div class="pipeline__pagination pagination swiper-pagination"
  67.                                  data-pipeline-slider-pagination
  68.                             ></div>
  69.                             {% include '_parts/nav/arrows.html.twig' with {
  70.                                 class: arrowClass,
  71.                                 isAccent: true,
  72.                                 datasetLeft: 'data-pipeline-slider-left',
  73.                                 datasetRight: 'data-pipeline-slider-right',
  74.                             } %}
  75.                         </div>
  76.                     {% endif %}
  77.                 </div>
  78.             </div>
  79.         </div>
  80.     </div>
  81. {% endif %}