<div class="detail-header detail-header--multi-images js-lightbox-group">
<div class="detail-header__img-bar">
{% for i in 1..imageList|length %}
{% set index = i-1 %}
{% if i < 4 %}
{% set thumbnail = imageList[index].getThumbnail('demi-desktop-multi-img-header') %}
{% set width = thumbnail.getWidth() %}
<a href="{{ imageList[index].getThumbnail('demi-desktop-gallery-overlay') }}"
class="detail-header__img-bar-item js-lightbox-group__item"
data-lightbox-thumb="{{ imageList[index].getThumbnail('demi-desktop-gallery-1') }}"
style="flex-grow: {{ width }}; flex-shrink: {{ width }};">
<figure title="{{ imageList[index].getMetadata("copyright") is not empty ? "© " ~ imageList[index].getMetadata("copyright")|escape : "" }}"
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="{{ imageList[index].getThumbnail('demi-desktop-gallery-1') }}"
href="{{ imageList[index].getThumbnail('demi-desktop-gallery-overlay') }}">
</a>
{% endif %}
{% endfor %}
<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 %}
{% if videoCount > 0 %}
{% set photocount = photoCount + videoCount %}
{% set translationString = 'demi.detail.images-videos-gallery-button' %}
{% else %}
{% set s = photoCount ==1 ? "" : "s" %}
{% set translationString = 'demi.detail.image' ~ s ~ '-gallery-button' %}
{% endif %}
{% set galleryString = demi_fillTranslation({'[AMOUNT_IMAGES]': photoCount}, translationString) %}
{{ galleryString }}
</a>
</div>
</div>
</div>