{% set headlineTag = pimcore_select('headline1', {
'store': [
['none', 'none'],
['h1', 'H1'],
['h2', 'H2'],
['h3', 'H3'],
['h4', 'H4'],
['h5', 'H5'],
['h6', 'H6'],
],
'defaultValue': '',
'reload': true,
}) %}
{% if headlineTag.isEmpty() %}
{% do headlineTag.setDataFromResource('h2') %}
{% endif %}
{% set headline1 = headlineTag.data != 'none' ? headlineTag.data|raw : 'span'|raw %}
{% set headline2 = headlineTag.data != 'none' ? '</' ~ headlineTag.data|raw ~ '>' : '</span>'|raw %}
{% 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 flex gap-20">
<div class="item">
<p class="edit-p">Abstand nach <strong>oben</strong> wählen:</p>
{{ pimcore_select("MarginTop", {
"reload": true,
"store": [
["regularMT", "Normal"],
["halfMT", "1/2"],
["smallMT", "1/4"],
["zeroMT", "kein Abstand"],
],
"defaultValue" : "zeroMT"
}) }}
</div>
<div class="item">
<p class="edit-p">Abstand nach <strong>unten</strong> wählen:</p>
{{ pimcore_select("MarginBottom", {
"reload": true,
"store": [
["regular", "Normal"],
["half", "1/2"],
["small", "1/4"],
["zero", "kein Abstand"],
],
"defaultValue" : "regular"
}) }}
</div>
<div class="item">
<p class="edit-p">Titel-Typ definieren:</p>
{{ headlineTag|raw }}
</div>
</div>
</div>
</div>
</div>
{% endif %}
<section class="headline-text {{ pimcore_select('MarginTop').getData() }} {{ pimcore_select('MarginBottom').getData() }}">
<div class="container">
{% if editmode %}
<h1 class="hero-lead">{{ pimcore_textarea("headline_h1",{
"nl2br": true,
"height": 200,
"placeholder": "HAUPT ÜBERSCHRIFT FÜR DIESE AREA"
}) }}
</h1>
{% elseif not editmode and not pimcore_textarea('headline_h1').isEmpty() %}
<{{headline1|raw}} class="hero-lead">
{{ pimcore_textarea('headline_h1').getData() | nl2br }}
{{ headline2|raw }}
{% endif %}
{% if editmode %}
<div class="headline-text">
{{ pimcore_wysiwyg('headlineText', {
height: 300,
customConfig: '/assets/js/editmode/config.js'
}) }}
</div>
{% elseif not pimcore_wysiwyg('headlineText').isEmpty() %}
<div class="headline-text">
{{ pimcore_wysiwyg('headlineText').getData() | raw }}
</div>
{% endif %}
{% if editmode %}
<div class="content-container">
<div class="lauf">
{{ pimcore_wysiwyg('Content', {
height: 300,
customConfig: '/assets/js/editmode/config.js'
}) }}
</div>
</div>
{% elseif not pimcore_wysiwyg('Content').isEmpty() %}
<div class="content-container">
<div class="lauf">
{{ pimcore_wysiwyg('Content').getData() | raw }}
</div>
</div>
{% endif %}
{% if editmode %}
<p class="text-link" style="margin-bottom: 0;">
{{ pimcore_link("link",{
"required": false,
"nl2br": true,
"height": 30,
"class": "button",
"placeholder": "Button text"
}) }}
</p>
{% elseif not editmode and not pimcore_link('link').isEmpty() %}
<a href="{{ pimcore_link('link').href }}" class="text-link button">
<span>{{ pimcore_link('link').getText() }}</span>
{{ include('svg/arrow-right.html.twig') }}
</a>
{% endif %}
</div>
</section>