{% 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">Anker Text:</p>
{{ pimcore_input('anchor',{'placeholder':'Anker Text','width':300}) }}
</div>
</div>
<div class="content-box flex column gap-20">
<div class="item">
<p class="edit-p">Übersicht Dokument ablegen:</p>
{{ pimcore_relation("ProjectsRelationSite",{
"types": ["document"]
}) }}
</div>
<div class="item">
<p class="edit-p">Anker auf Projektübersicht Seite:</p>
{{ pimcore_input('projectsOverviewDoc') }}
</div>
</div>
</div>
<div class="content flex gap-20">
<div class="content-box flex gap-20">
<div class="item">
<p class="edit-p">Headline:</p>
{{ pimcore_input('headline',{'placeholder':'Headline','width': 650 }) }}
</div>
</div>
</div>
</div>
</div>
{% endif %}
<section class="teaser-swiper news-teaser" {% if not pimcore_input('anchor').isEmpty() %}id="{{ pimcore_input('anchor').getData() }}"{% endif %}>
<div class="container teaser-container">
{% if not editmode %}
{% if not pimcore_input('headline').isEmpty() %}
<h2>{{ pimcore_input('headline').getData() }}</h2>
{% else %}
<h2>{{ 'News_' | trans }}</h2>
{% endif %}
{% endif %}
{% if editmode %}
<div style="text-align: center;">
<h3>Hier kommen News Teaser im Frontend</h3>
</div>
{% else %}
<div class="news-swiper-container">
<div class="swiper newsTeaserSwiper">
<div class="swiper-wrapper">
{% for news in newsList %}
{# news detail link #}
{% set detailLink = path('newslist', {
id: news.id,
headline: toUri(news.headline),
path: 'news-url-path'|trans
}) %}
{# news detail link #}
<div class="swiper-slide">
<div class="teaser">
<a href="{{ detailLink }}">{{ news.teaserImage.thumbnail('NewsTeaser').html | raw }}</a>
<div class="content">
<div class="date flex gap-10">
<svg width="13" height="14.333" viewBox="0 0 13 14.333">
<g id="Icon_feather-calendar" data-name="Icon feather-calendar"
transform="translate(0.5 0.5)">
<path id="Pfad_4321" data-name="Pfad 4321"
d="M5.833,6h9.333A1.33,1.33,0,0,1,16.5,7.328V16.62a1.33,1.33,0,0,1-1.333,1.328H5.833A1.33,1.33,0,0,1,4.5,16.62V7.328A1.33,1.33,0,0,1,5.833,6Z"
transform="translate(-4.5 -4.615)" fill="none"
stroke="#6b675d"
stroke-linecap="round" stroke-linejoin="round"
stroke-width="1"/>
<path id="Pfad_4322" data-name="Pfad 4322" d="M24,3V5.771"
transform="translate(-15.333 -3)" fill="none" stroke="#6b675d"
stroke-linecap="round" stroke-linejoin="round"
stroke-width="1"/>
<path id="Pfad_4323" data-name="Pfad 4323" d="M12,3V5.771"
transform="translate(-8.667 -3)" fill="none" stroke="#6b675d"
stroke-linecap="round" stroke-linejoin="round"
stroke-width="1"/>
<path id="Pfad_4324" data-name="Pfad 4324" d="M4.5,15h12"
transform="translate(-4.5 -9.667)" fill="none"
stroke="#6b675d"
stroke-linecap="round" stroke-linejoin="round"
stroke-width="1"/>
</g>
</svg>
<p>{{ news.date | date('d.m.Y') }}</p>
</div>
<p class="teaser-headline"><a href="{{ detailLink }}">{{ news.headline | u.truncate(50, '...') }}</a></p>
<div class="lead">
<a href="{{ detailLink }}"><p>{{ news.intro | u.truncate(110, '...') }}</p></a>
</div>
<button class="primary accent">
<a href="{{ detailLink }}">{{ 'Mehr'|trans }}
<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>
</a>
</button>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="swipe-controls">
<div class="newsTeaserSwiperNext"></div>
<div class="newsTeaserSwiperPrev"></div>
</div>
</div>
</div>
{% if not pimcore_relation("ProjectsRelationSite").isEmpty() %}
<div class="buttons-row flex">
<button class="primary">
<a href="{% if not pimcore_relation("ProjectsRelationSite").isEmpty() %}{{ pimcore_relation("ProjectsRelationSite").getElement().getFullPath() }}{% endif %}{% if not pimcore_input('projectsOverviewDoc').isEmpty() %}/#{{ pimcore_input('projectsOverviewDoc').getData() }}{% endif %}" target="_self" title="{{ 'Alle_News' | trans }}">{{ 'Alle_News' | trans }}
<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>
</a>
</button>
</div>
{% endif %}
{% endif %}
</div>
</section>