<div class="detail-header detail-header--multi-images js-lightbox-group">
<div class="detail-header__img-bar">
{% if photoCount is same as(1) %}
{% set image = imageList[0] %}
{% if image is instanceof('\\Pimcore\\Model\\Asset') %}
{% set thumbnail = image.thumbnail('demi-desktop-full-img-header') %}
{% set width = thumbnail.width %}
<a href="{{ image.thumbnail('demi-desktop-gallery-overlay') }}"
class="detail-header__img-bar-item js-lightbox-group__item"
data-lightbox-thumb="{{ image.thumbnail('demi-desktop-gallery-1') }}"
style="flex-grow:{{ width }};flex-shrink: {{ width }};">
<figure
title="{{ not image.metadata('copyright') is empty ? ("© " ~ image.metadata('copyright')|escape('html') ) : '' }}"
class="detail-header__img" style="background-image:url({{ thumbnail }});"
>
{{ thumbnail.getHTML({'imgAttributes': {"class": "sr-only"}})|raw }}
</figure>
</a>
{% endif %}
{% else %}
{% for image in imageList %}
{% if image is instanceof('\\Pimcore\\Model\\Asset') %}
{% if loop.index0 < 4 %}
{% set thumbnail = image.thumbnail('demi-desktop-multi-img-header') %}
{% set width = thumbnail.width %}
<a href="{{ image.thumbnail('demi-desktop-gallery-overlay') }}"
class="detail-header__img-bar-item js-lightbox-group__item"
data-lightbox-thumb="{{ image.thumbnail('demi-desktop-gallery-1') }}"
style="flex-grow:{{ width }};flex-shrink: {{ width }};">
<figure
title="{{ not image.metadata('copyright') is empty ? ("© " ~ image.metadata('copyright')|escape('html') ) : '' }}"
class="detail-header__img" style="background-image:url({{ thumbnail }});"
>
{{ thumbnail.getHTML({'imgAttributes': {"class": "sr-only"}})|raw }}
</figure>
</a>
{% else %}
<a class="js-lightbox-group__item"
hidden
data-lightbox-thumb="{{ image.thumbnail('demi-desktop-gallery-1') }}"
href="{{ image.thumbnail('demi-desktop-gallery-overlay') }}">
</a>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% if photoCount > 3 %}
<div class="gallery-buttons d-none d-md-block">
<script data-cookieconsent="ignore">
_config.openTabAndSroll = true;
</script>
<a href="#pictures"
data-target="#pictures"
aria-controls="pictures"
class="btn btn-primary js-open-tab-and-scroll">
<span class="demi-icon demi-icon-image icon-in-text mr-1"></span>
{% set photoCount = photoCount + panoCount|default(0) %}
{% if videoCount|default(0) > 0 %}
{% set photoCount = photoCount + videoCount %}
{% set translationstring = 'demi.detail.images-videos-gallery-button' %}
{% else %}
{% set translationstring = 'demi.detail.images-gallery-button' %}
{% endif %}
{% set galleryString = demi_fillTranslation({'[AMOUNT_IMAGES]': photoCount}, translationstring) %}
{{ galleryString }}
</a>
</div>
{% endif %}
</div>
</div>