src/Elements/Bundle/DemiFrontendBundle/Resources/views/Accommodation/includes/acco-header-multi-image.desktop.html.twig line 1

Open in your IDE?
  1. <div class="detail-header detail-header--multi-images js-lightbox-group">
  2.     <div class="detail-header__img-bar">
  3.         {% for i in 1..imageList|length %}
  4.             {% set index = i-1 %}
  5.             {% if i < 4 %}
  6.                {% set thumbnail = imageList[index].getThumbnail('demi-desktop-multi-img-header') %}
  7.                {% set width = thumbnail.getWidth() %}
  8.                     <a href="{{ imageList[index].getThumbnail('demi-desktop-gallery-overlay') }}"
  9.                        class="detail-header__img-bar-item js-lightbox-group__item"
  10.                        data-lightbox-thumb="{{ imageList[index].getThumbnail('demi-desktop-gallery-1') }}"
  11.                        style="flex-grow: {{ width }}; flex-shrink:  {{ width }};">
  12.                         <figure title="{{ imageList[index].getMetadata("copyright") is not empty ?  "&copy; " ~ imageList[index].getMetadata("copyright")|escape : "" }}"
  13.                                 class="detail-header__img" style="background-image:url({{ thumbnail }});">
  14.                             {{ thumbnail.getHTML({'imgAttributes': {"class": "sr-only"}})|raw }}
  15.                         </figure>
  16.                     </a>
  17.             {% else %}
  18.                     <a class="js-lightbox-group__item"
  19.                        hidden
  20.                        data-lightbox-thumb="{{ imageList[index].getThumbnail('demi-desktop-gallery-1') }}"
  21.                        href="{{ imageList[index].getThumbnail('demi-desktop-gallery-overlay') }}">
  22.                     </a>
  23.             {% endif %}
  24.         {% endfor %}
  25.         <div class="gallery-buttons d-none d-md-block">
  26.             <script data-cookieconsent="ignore">
  27.                 _config.openTabAndSroll = true;
  28.             </script>
  29.             <a href="#pictures"
  30.                data-target="#pictures"
  31.                aria-controls="pictures"
  32.                class="btn btn-primary js-open-tab-and-scroll">
  33.                 <span class="demi-icon demi-icon-image icon-in-text mr-1"></span>
  34.                 {% set photoCount = photoCount + panoCount %}
  35.                 {% if videoCount > 0 %}
  36.                     {% set photocount = photoCount + videoCount %}
  37.                     {% set translationString = 'demi.detail.images-videos-gallery-button' %}
  38.                 {% else %}
  39.                     {% set s = photoCount ==1 ? "" : "s" %}
  40.                     {% set translationString = 'demi.detail.image' ~ s ~ '-gallery-button' %}
  41.                 {% endif %}
  42.                 {% set galleryString = demi_fillTranslation({'[AMOUNT_IMAGES]': photoCount}, translationString) %}
  43.                 {{ galleryString }}
  44.             </a>
  45.         </div>
  46.     </div>
  47. </div>