src/Elements/Bundle/DemiFrontendBundle/Resources/views/AdditionalService/includes/additionalservice-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.         {% if photoCount is same as(1) %}
  4.             {% set image = imageList[0] %}
  5.             {% if image is instanceof('\\Pimcore\\Model\\Asset') %}
  6.                 {% set thumbnail = image.thumbnail('demi-desktop-full-img-header') %}
  7.                 {% set width = thumbnail.width %}
  8.                 <a href="{{ image.thumbnail('demi-desktop-gallery-overlay') }}"
  9.                    class="detail-header__img-bar-item js-lightbox-group__item"
  10.                    data-lightbox-thumb="{{ image.thumbnail('demi-desktop-gallery-1') }}"
  11.                    style="flex-grow:{{ width }};flex-shrink:  {{ width }};">
  12.                     <figure
  13.                         title="{{ not image.metadata('copyright') is empty ? ("&copy; " ~ image.metadata('copyright')|escape('html') ) : '' }}"
  14.                         class="detail-header__img" style="background-image:url({{ thumbnail }});"
  15.                     >
  16.                         {{ thumbnail.getHTML({'imgAttributes': {"class": "sr-only"}})|raw }}
  17.     
  18.                     </figure>
  19.                 </a>
  20.             {% endif %}
  21.         {% else %}
  22.             {% for image in imageList %}
  23.                 {% if image is instanceof('\\Pimcore\\Model\\Asset') %}
  24.                     {% if loop.index0 < 4 %}
  25.                         {% set thumbnail = image.thumbnail('demi-desktop-multi-img-header') %}
  26.                         {% set width = thumbnail.width %}
  27.                         <a href="{{ image.thumbnail('demi-desktop-gallery-overlay') }}"
  28.                            class="detail-header__img-bar-item js-lightbox-group__item"
  29.                            data-lightbox-thumb="{{ image.thumbnail('demi-desktop-gallery-1') }}"
  30.                            style="flex-grow:{{ width }};flex-shrink:  {{ width }};">
  31.                             <figure
  32.                                 title="{{ not image.metadata('copyright') is empty ? ("&copy; " ~ image.metadata('copyright')|escape('html') ) : '' }}"
  33.                                 class="detail-header__img" style="background-image:url({{ thumbnail }});"
  34.                             >
  35.                                 {{ thumbnail.getHTML({'imgAttributes': {"class": "sr-only"}})|raw }}
  36.                             </figure>
  37.                         </a>
  38.                     {% else %}
  39.                         <a class="js-lightbox-group__item"
  40.                            hidden
  41.                            data-lightbox-thumb="{{ image.thumbnail('demi-desktop-gallery-1') }}"
  42.                            href="{{ image.thumbnail('demi-desktop-gallery-overlay') }}">
  43.                         </a>
  44.                     {% endif %}
  45.                 {% endif %}
  46.             {% endfor %}
  47.         {% endif %}
  48.         {% if photoCount > 3 %}
  49.             <div class="gallery-buttons d-none d-md-block">
  50.                 <script data-cookieconsent="ignore">
  51.                     _config.openTabAndSroll = true;
  52.                 </script>
  53.                 <a href="#pictures"
  54.                    data-target="#pictures"
  55.                    aria-controls="pictures"
  56.                    class="btn btn-primary js-open-tab-and-scroll">
  57.                     <span class="demi-icon demi-icon-image icon-in-text mr-1"></span>
  58.                     {% set photoCount = photoCount + panoCount|default(0) %}
  59.                     {% if videoCount|default(0) > 0 %}
  60.                         {% set photoCount = photoCount + videoCount %}
  61.                         {% set translationstring = 'demi.detail.images-videos-gallery-button' %}
  62.                     {% else %}
  63.                         {% set translationstring = 'demi.detail.images-gallery-button' %}
  64.                     {% endif %}
  65.                     {% set galleryString = demi_fillTranslation({'[AMOUNT_IMAGES]': photoCount}, translationstring) %}
  66.                     {{ galleryString }}
  67.                 </a>
  68.             </div>
  69.         {% endif %}
  70.     </div>
  71. </div>