{% set headlineTag = pimcore_select('headlineTag', {'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 %}{% set backgroundColor = pimcore_select('backgorundColor', {'store': [['dark', 'Dark'],['light', 'Light'],],'defaultValue': '','reload': true}) %}{% if backgroundColor.isEmpty() %}{% do backgroundColor.setDataFromResource('dark') %}{% endif %}{% 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">Titel-Typ definieren:</p>{{ headlineTag|raw }}</div><div class="item"><p class="edit-p">Hintergrundfarbe definieren:</p>{{ backgroundColor|raw }}</div></div></div></div></div>{% endif %}<section class="image-text {{ backgroundColor.data }}"><div class="image">{% if not pimcore_relation("imageRelation").isEmpty() %}{{ pimcore_relation("imageRelation").getElement().getThumbnail('ImageTextTeaser').html | raw }}{% endif %}{% if editmode %}<div style="width: 400px; position: aboslute; top: 0;">{{ pimcore_relation("imageRelation",{"types": ["asset"],"subtypes": {"asset": ["image"]}}) }}</div>{% endif %}</div><div class="text"><div class="wrapper">{% if editmode %}<h2 class="teaser-headline">{{ pimcore_textarea("headline",{"nl2br": true,"height": 100,"placeholder": "HAUPT ÜBERSCHRIFT FÜR DIESE AREA"}) }}</h2>{% elseif not editmode and not pimcore_textarea('headline').isEmpty() %}<{{headline1|raw}} class="teaser-headline">{{ pimcore_textarea('headline').getData() | nl2br }}{{headline2|raw}}{% endif %}{% if editmode %}{{ pimcore_wysiwyg('Content', {height: 150,customConfig: '/assets/js/editmode/config.js'}) }}{% elseif not pimcore_wysiwyg('Content').isEmpty() %}{{ pimcore_wysiwyg('Content').getData() | raw }}{% endif %}{% if editmode %}<div style="margin-top: 30px;"></div>{{ pimcore_link('teaserLink', {'class': ""}) }}{% elseif not editmode and not pimcore_link('teaserLink').isEmpty() %}<div class="btn secondary">{% if pimcore_link('teaserLink').getTarget %}{% set target = pimcore_link('teaserLink').getTarget %}{% else %}{% set target = '_self' %}{% endif %}<a class="flex" href="{{ pimcore_link('teaserLink').getHref() }}" target="{{ target }}"><span>{{ pimcore_link('teaserLink').getText() }}{# <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="#fff" 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="#fff" stroke-width="1"/></g></g></svg> #}</span></a><div class="button-shape">{{include('svg/button-shape.html.twig')}}</div></div>{% endif %}</div></div></section>