src/Package/Openform/Front/Templates/_includes/_image_slide.html.twig line 1

Open in your IDE?
  1. {# {% from '@openform_front_templates/_includes/_icons.html.twig' import arrowinsidecircle, longarrow %} #}
  2. {% if entity.ImageSlide is defined and entity.ImageSlide|length > 0 %}
  3.     <section class="gallery-block" data-scroll-section>
  4.         <div class="gallery-block__wrapper container">
  5.             <h2 class="gallery-block__title home-title">
  6.                 {{ 'T_IMAGE_GALLERY'|trans({}, 'openform_front', app.request.locale) }}
  7.             </h2>
  8.             <span class="gallery-block__count home-label">
  9.                 {% set photosCount = entity.ImageSlide|length %}
  10.                 {{ photosCount }} {{ photosCount|varietyTransChanger(
  11.                     'NUMBER_OF_PHOTOS_A'|trans({}, 'openform_front', app.request.locale), 
  12.                     'NUMBER_OF_PHOTOS_B'|trans({}, 'openform_front', app.request.locale), 
  13.                     'NUMBER_OF_PHOTOS_C'|trans({}, 'openform_front', app.request.locale)
  14.                 ) }}
  15.             </span>
  16.         </div>
  17.         <div class="swiper-container js-gallery-swiper">
  18.             <div class="swiper-wrapper">
  19.                 {% for item in entity.ImageSlide %}
  20.                     <div class="swiper-slide{{ item.ytCode is defined and item.ytCode ? ' swiper-slide--vertical' }}">
  21.                         <div class="gallery-slider__image-wrapper">
  22.                             {% if item.imagePath is defined and item.imagePath %}
  23.                                 <img class="gallery-slider__image" src="{{ item.imagePath }}" alt="{{ item.Translation[app.request.locale].alt is defined ? item.Translation[app.request.locale].alt }}">
  24.                             {% endif %}
  25.                         </div>
  26.                         <div class="gallery-slider__content">
  27.                             {% if item.Translation[app.request.locale].title is defined and item.Translation[app.request.locale].title %}
  28.                                 <span class="gallery-slider__title">{{ item.Translation[app.request.locale].title }}</span>
  29.                             {% endif %}
  30.                             {% if item.Translation[app.request.locale].author is defined and item.Translation[app.request.locale].author %}
  31.                                 <span class="gallery-slider__author">{{ item.Translation[app.request.locale].author }}</span>
  32.                             {% endif %}
  33.                         </div>
  34.                     </div>
  35.                 {% endfor %}
  36.             </div>
  37.             {# <div class="slider-controlls">
  38.                 <button class="swiper-button-prev">{{ arrowinsidecircle('T_PREVIOUS_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}</button>
  39.                 <div class="swiper-pagination"></div>
  40.                 <button class="swiper-button-next">{{ longarrow('T_NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}</button>
  41.             </div> #}
  42.         </div>
  43.     </section>
  44. {% endif %}