{% set externalLink = pimcore_checkbox('externalLink').checked|default(false) %}
{% if editmode %}
{{ include('layout/includes/css.html.twig') }}
<div class="ms-auto container-small">
{% embed 'includes/editmode-settings.html.twig' %}
{% block settings %}
<div class="row">
<div class="col">
{{ pimcore_checkbox('holding', {
label: 'Kuhn Holding',
reload: true,
}) }} <br><br>
{{ pimcore_link('link',{reload: true}) }}<br><br>
{% if pimcore_checkbox('holding').checked %}
Background Image
{{ pimcore_image('background-image', {
width: 200,
}) }} <br>
</div>
<div class="col">
{{ pimcore_checkbox('externalLink', {
label: 'External Link?',
reload: true,
}) }} <br>
{% if externalLink %}
Logo for external Link (optional)
{{ pimcore_image('logo-image', {
width: 200,
}) }} <br>
{% endif %}
</div>
{% else %}
</div>
{% endif %}
</div>
{% endblock %}
{% endembed %}
</div>
{% endif %}
{% if not pimcore_link('link').isEmpty() %}
{% if pimcore_checkbox('holding').checked %}
{% if editmode %}
<div class="w-25">
{% endif %}
<div class="position-relative link-box link-box--img link-box--{{ externalLink ? 'red' : 'orange' }}">
{% if not pimcore_image('background-image').isEmpty() %}
<div class="ratio ratio-9x4">
{{ pimcore_image('background-image').thumbnail('img-link-box').getHtml({
imgAttributes: {
class: 'ratio-item js-lazy-img img-link-box__img',
},
lowQualityPlaceholder: true,
})|raw }}
</div>
{% endif %}
<div class="link-box__content">
<{{ editmode ? 'div' : 'a' }} href="{{ pimcore_link('link').href }}" target="{{ externalLink ? '_blank' : pimcore_link('link').target }}" class="link-box__title {{ not editmode ? 'stretch-link__link' }}">
{% if not pimcore_image('logo-image').isEmpty() %}
{{ pimcore_image('logo-image').thumbnail('footer-box-logo').getHtml({
imgAttributes: {
class: 'img-fluid js-lazy-img',
},
lowQualityPlaceholder: true,
})|raw }}
<div class="link-box__title--sm">{{ pimcore_link('link').text }}</div>
{% else %}
<strong>{{ pimcore_link('link').text }}</strong>
<div>
{{ pimcore_input('holding-input', {
placeholder: 'Add title here'
}) }}
</div>
{% endif %}
</{{ editmode ? 'div' : 'a' }}>
<span class="link-box__icon icon icon-{{ externalLink ? 'externallink' : 'arrow' }}" aria-hidden="true"></span>
</div>
</div>
{% if editmode %}
</div>
{% endif %}
{% else %}
<div class="col-md-3 col-auto">
<div class="link-box link-box--hero box-shadow-hover {{ not editmode ? 'stretch-link' }}">
<{{ editmode ? 'div' : 'a' }} href="{{ pimcore_link('link').href }}" class="link-box__title {{ not editmode ? 'stretch-link__link' }}">
<strong>
{{ pimcore_link('link').text }}
</strong>
<div class="link-box__text">
{{ pimcore_wysiwyg('wysiwyg', {
placeholder: 'Add text here'
}) }}
</div>
</{{ editmode ? 'div' : 'a' }}>
<span class="icon icon-arrow" aria-hidden="true"></span>
</div>
</div>
{% endif %}
{% endif %}