{% if editmode %}
<div class="edit-box">
<h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
<div class="flex gap-20">
<div class="content flex column gap-20">
<div class="content-box">
<p class="edit-p">H1 HEADLINE TEXT:</p>
{{ pimcore_input('h1', {'placeholder':'H1 HEADLINE' }) }}
</div>
<div class="content-box flex gap-20">
<div class="item">
<p class="edit-p">Slider / Einzelbild wählen:</p>
{{ pimcore_select("ContentType", {
"reload": true,
"store": [
["slider", "Slider"],
["image", "Einzelbild"]
],
"defaultValue" : "slider"
}) }}
</div>
<div class="item">
<p class="edit-p">Texttyp wählen:</p>
{{ pimcore_select("TextType", {
"reload": true,
"store": [
["lead", "Lead Text"],
["basic", "Fliess Text"]
],
"defaultValue" : "lead"
}) }}
</div>
<div class="item">
<p class="edit-p">Hintergrundfarbe wählen:</p>
{{ pimcore_select("ColorType", {
"reload": true,
"store": [
["beige", "Beige"],
["orange", "Orange"]
],
"defaultValue" : "orange"
}) }}
</div>
<div class="item">
<p class="edit-p">Buttons einfügen:</p>
{{ pimcore_select("ButtonsRow", {
"reload": true,
"store": [
["true", "Mit Buttons"],
["false", "Ohne Buttons"]
],
"defaultValue" : "false"
}) }}
</div>
<div class="item">
<p class="edit-p">Anker Text:</p>
{{ pimcore_input('anchor',{'placeholder':'Anker Text','width':300}) }}
</div>
</div>
<div class="content-box">
<div class="item">
<p class="edit-p">Schattenbild ablegen:</p>
{{ pimcore_relation("ShadowImage",{
"reload": false,
"types": ["asset"],
"subtypes": {
"asset": ["image"]
}
}) }}
</div>
{#<div class="item">
<p class="edit-p">Schattenbild unten ablegen:</p>
{{ pimcore_relation("ShadowImage2",{
"reload": false,
"types": ["asset"],
"subtypes": {
"asset": ["image"]
}
}) }}
</div>#}
</div>
</div>
<div class="content flex column gap-20">
{% if pimcore_select("ContentType").getData() == "image" %}
<div class="content-box">
<div class="item">
<p class="edit-p">Hintergrundbild ablegen:</p>
{{ pimcore_relation("Image",{
"reload": true,
"types": ["asset"],
"subtypes": {
"asset": ["image"]
}
}) }}
</div>
</div>
{% endif %}
{% if pimcore_select("ContentType").getData() == "slider" %}
<div class="content-box">
<div class="item">
<p class="edit-p">Bilder für den Slider ablegen:</p>
{{ pimcore_relations("SliderImages", {
"title": "Bilder ablegen",
"types": ["asset"],
"subtypes": {
"asset": ["image"]
}
}) }}
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
<section class="text-slider {{ pimcore_select("ColorType").getData() }} {% if not pimcore_relation("Image").isEmpty() %}text-image{% endif %}" {% if not pimcore_input('anchor').isEmpty() %}id="{{ pimcore_input('anchor').getData() }}"{% endif %}>
{% if not pimcore_relation("ShadowImage").isEmpty() and not editmode %}
<div class="shadow-image-con text-slider-shadow">
{{ pimcore_relation("ShadowImage").getElement().getThumbnail('ShadowImage').html({
imgAttributes: {
"class": "shadow-image-top"
}
}) | raw }}
</div>
{% endif %}
{#{% if not pimcore_relation("ShadowImage2").isEmpty() and not editmode %}
<div class="slider-textbox-shadow slider-textbox-shadow-2" id="slider-textbox-shadow-2">
{{ pimcore_relation("ShadowImage2").getElement().getThumbnail('ShadowImage').html({
imgAttributes: {
"class": "shadow-image-bottom"
}
}) | raw }}
</div>
{% endif %}#}
{% if not pimcore_input('h1').isEmpty() %}
<h1 class="vertical">{{ pimcore_input('h1').getData() }}</h1>
{% endif %}
{# MOBILE Slider #}
<div class="slider-content-mobile">
{% if pimcore_relation("Image").isEmpty() %}
<div class="swiper textSliderSwiperMobile">
<div class="swiper-wrapper">
{% for image in pimcore_relations("SliderImages") %}
<div class="swiper-slide">{{ image.thumbnail('textSliderSwiper').html | raw }}</div>
{% endfor %}
</div>
</div>
{% else %}
{{ pimcore_relation("Image").getElement().getThumbnail('textSliderSwiper').getHtml({
'imgAttributes': {
'class':'text-image-mobile'
}
}) | raw }}
{% endif %}
</div>
{# MOBILE Slider #}
<div class="container text-slider">
<div class="content-container flex">
<div class="text-content">
{% if editmode %}
<h2>
{{ pimcore_textarea("h2",{
"nl2br": true,
"height": 120,
"placeholder": "H2 Headline Text"
}) }}
</h2>
{% elseif not editmode and not pimcore_textarea("h2").isEmpty() %}
<h2>{{ pimcore_textarea("h2").getData() | nl2br }}</h2>
{% endif %}
<div class="{{ pimcore_select("TextType").getData() }}">
{% if editmode %}
{{ pimcore_wysiwyg('Content', {
height: 300,
customConfig: '/assets/js/editmode/config.js'
}) }}
{% elseif not pimcore_wysiwyg('Content').isEmpty() %}
{{ pimcore_wysiwyg('Content').getData() | raw }}
{% endif %}
</div>
{{ pimcore_areablock('AreablockContent', {
'allowed': [
'text',
]
}) }}
{% if pimcore_select("ButtonsRow").getData() == "true" %}
<div class="buttons-row flex">
{% for i in pimcore_block('linkblock').iterator %}
<button class="primary">
{{ pimcore_link('Link') }}
<svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
<g transform="translate(0 0.354)">
<g transform="translate(0)">
<path class="line" d="M7.5,18h15" transform="translate(-7.5 -13)" fill="none" stroke="#b76e2b" stroke-linejoin="round" stroke-width="1"/>
<path class="arrow" d="M18,7.5l5.026,5L18,17.5" transform="translate(-8.027 -7.5)" fill="none" stroke="#b76e2b" stroke-width="1"/>
</g>
</g>
</svg>
</button>
{% endfor %}
</div>
{% endif %}
</div>
<div class="slider-content">
{% if pimcore_relation("Image").isEmpty() %}
{# DESKTOP Slider #}
<div class="swiper textSliderSwiper">
<div class="swiper-wrapper">
{% for image in pimcore_relations("SliderImages") %}
<div class="swiper-slide">{{ image.thumbnail('textSliderSwiper').html | raw }}</div>
{% endfor %}
</div>
</div>
{% else %}
{{ pimcore_relation("Image").getElement().getThumbnail('textSliderSwiper').getHtml({
'imgAttributes': {
'class':'text-image'
}
}) | raw }}
{% endif %}
{% if not editmode and pimcore_relation("Image").isEmpty() %}
<div class="swipe-controls">
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
{% endif %}
{# DESKTOP Slider #}
</div>
</div>
</div>
<div class="slider-footer"></div>
</section>