<section class="wysiwyg-area content-block js-fade-in
{{ include('Layout/includes/editmode-box-classes.html.twig') }} {{ styleModifier | default(null) }} {{ not pimcore_input('anchorTitle').empty ? 'js-anchor-nav__item' : '' }}"
{% if not pimcore_input('anchorTitle').empty %}data-anchor-nav-title="{{ pimcore_input('anchorTitle').frontend }}"{% endif %}>
{% embed 'Includes/editmode-settings.html.twig' %}
{% block additionalInfo %}
<div>
<label>
{{ pimcore_checkbox('titleBlockCentered') }} Center Headline?
</label>
</div>
{% endblock %}
{% endembed %}
<div class="container container-sm">
{{ include('Includes/title-block-editable.html.twig') }}
<div class="wysiwyg-area__content wysiwyg">
{{ pimcore_wysiwyg('text') }}
</div>
{{ include('Includes/button-row.html.twig', {
ulClass: pimcore_checkbox('titleBlockCentered').checked ? 'wysiwyg-area__buttons vertical-gutter--default text-center' : null,
}) }}
{% if editmode %}
{% set thumb = 'wysiwyg-area--three-images' %}
{% set embed = 'embed-responsive-1by1' %}
{% set col = '4' %}
{% set containerSize = 'md' %}
{% else %}
{% set imageCount = 0 %}
{% if not pimcore_image('image1').empty %}
{% set imageCount = imageCount + 1 %}
{% endif %}
{% if not pimcore_image('image2').empty %}
{% set imageCount = imageCount + 1 %}
{% endif %}
{% if not pimcore_image('image3').empty %}
{% set imageCount = imageCount + 1 %}
{% endif %}
{% set thumb = 'wysiwyg-area' %}
{% set embed = 'embed-responsive-9by5' %}
{% set col = '12' %}
{% set containerSize = 'sm' %}
{% if imageCount >= 3 %}
{% set thumb = 'wysiwyg-area--three-images' %}
{% set embed = 'embed-responsive-1by1' %}
{% set col = '4' %}
{% set containerSize = 'md' %}
{% elseif imageCount >= 2 %}
{% set thumb = 'wysiwyg-area--two-images' %}
{% set embed = 'embed-responsive-4by3' %}
{% set col = '6' %}
{% set containerSize = 'md' %}
{% endif %}
{% endif %}
{% if editmode or imageCount > 0 %}
{% do jsConfig().add('lightbox', true) %}
<div class="js-lightbox mt-4 mt-md-5">
<div class="row">
{% if editmode or not pimcore_image('image1').empty %}
<div class="col-{{ col }}">
{% set lightBoxSrc = not pimcore_image('image1').empty ? pimcore_image('image1').image.thumbnail('lightbox') : '' %}
{% set description = getImageDescription(pimcore_image('image1').image) %}
<figure class="wysiwyg-area__image">
<a href="{{ lightBoxSrc | default("") }}" data-sub-html="{{ description ?: '' }}"
class="js-lightbox__item embed-responsive wysiwyg-area__image {{ embed }}">
{{ pimcore_image('image1', {
thumbnail: thumb,
imgAttributes: {
class: 'js-lazy-img embed-responsive-item js-fade-in'
},
lowQualityPlaceholder: true,
}) }}
{% do jsConfig().add('lazyImg', true) %}
</a>
{% if description %}
<figcaption>
{{ description }}
</figcaption>
{% endif %}
</figure>
</div>
{% endif %}
{% if editmode or not pimcore_image('image2').empty %}
<div class="col-{{ col }}">
{% set lightBoxSrc = not pimcore_image('image2').empty ? pimcore_image('image2').image.thumbnail('lightbox') : '' %}
<figure class="wysiwyg-area__image">
{% set description = getImageDescription(pimcore_image('image2').image) %}
<a href="{{ lightBoxSrc | default("") }}" data-sub-html="{{ description ?: '' }}"
class="js-lightbox__item embed-responsive wysiwyg-area__image {{ embed }}">
{{ pimcore_image('image2', {
thumbnail: thumb,
imgAttributes: {
class: 'js-lazy-img embed-responsive-item js-fade-in'
},
lowQualityPlaceholder: true,
}) }}
{% do jsConfig().add('lazyImg', true) %}
</a>
{% if description %}
<figcaption>
{{ description }}
</figcaption>
{% endif %}
</figure>
</div>
{% endif %}
{% if editmode or not pimcore_image('image3').empty %}
<div class="col-{{ col }}">
{% set lightBoxSrc = not pimcore_image('image3').empty ? pimcore_image('image3').image.thumbnail('lightbox') : '' %}
<figure class="wysiwyg-area__image">
{% set description = getImageDescription(pimcore_image('image3').image) %}
<a href="{{ lightBoxSrc | default("") }}" data-sub-html="{{ description ?: '' }}"
class="js-lightbox__item embed-responsive wysiwyg-area__image {{ embed }}">
{{ pimcore_image('image3', {
thumbnail: thumb,
imgAttributes: {
class: 'js-lazy-img embed-responsive-item js-fade-in'
},
lowQualityPlaceholder: true,
}) }}
{% do jsConfig().add('lazyImg', true) %}
</a>
{% if description %}
<figcaption>
{{ description }}
</figcaption>
{% endif %}
</figure>
</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
</section>