{% 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 class="item">
<p class="edit-p">Custom Text für Button:</p>
{{ pimcore_input('anchor-button',{'placeholder':'Benutzerdefinierter Text für Button','width': 300 }) }}
</div>
</div>
<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 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 column gap-20">
<div class="content-box">
<p class="edit-p">Projekte ablegen:</p>
{{ pimcore_relations("ProjektTeaser", {
"types": ["object"],
"subtypes": {
"object": ["object"]
},
"classes": ["Projekt"]
}) }}
</div>
<div class="content-box">
<div class="item">
<p class="edit-p">Schattenbild oben 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>
</div>
{% endif %}
<section class="teaser-swiper news-teaser projekt-teaser" {% 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 teaser-image-shadow">
{{ pimcore_relation("ShadowImage").getElement().getThumbnail('ShadowImage').html({
imgAttributes: {
"class": "shadow-image"
}
}) | raw }}
</div>
{% endif %}
{% if not pimcore_relation("ShadowImage2").isEmpty() and not editmode %}
<div class="shadow-image-con teaser-image-shadow teaser-image-shadow-2">
{{ pimcore_relation("ShadowImage2").getElement().getThumbnail('ShadowImage').html({
imgAttributes: {
"class": "shadow-image"
}
}) | raw }}
</div>
{% endif %}
<div class="container teaser-container">
{% if editmode %}
<div style="text-align: center;">
<h3>Hier kommen Projekte Teaser im Frontend</h3>
</div>
{% else %}
{% if not pimcore_input('headline').isEmpty() %}
<h2>{{ pimcore_input('headline').getData() }}</h2>
{% else %}
<h2>{{ 'Unsere_Projekte' | trans }}</h2>
{% endif %}
<div class="news-swiper-container projekt-swiper-container">
<div class="swiper newsTeaserSwiper projektTeaserSwiper">
<div class="swiper-wrapper">
{% if pimcore_relations("ProjektTeaser") | length < 1 %}
{% for projekt in projektList %}
{# news detail link #}
{% set detailLink = path('projekt', {
id: projekt.id,
title: toUri(projekt.maintitle),
path: 'projekt'
}) %}
{# news detail link #}
<div class="swiper-slide">
<div class="teaser">
{% if projekt.video %}
{% if projekt.video.type == 'youtube' %}
<iframe width="100%" height="100%" src="https://www.youtube.com/embed/{{ projekt.video.data }}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
{% else %}
<video controls>
<source src="{{ projekt.video.data }}" type="video/mp4">
<source src="{{ projekt.video.data }}" type="video/ogg">
Your browser does not support the video tag.
</video>
{% endif %}
{% elseif projekt.image %}
<a href="{{ detailLink }}">
{{ projekt.image.thumbnail('ProjektTeaser').html | raw }}
</a>
{% endif %}
</div>
</div>
{% endfor %}
{% else %}
{% for projekt in pimcore_relations("ProjektTeaser") %}
{# news detail link #}
{% set detailLink = path('projekt', {
id: projekt.id,
title: toUri(projekt.maintitle),
path: 'projekt'
}) %}
{# news detail link #}
<div class="swiper-slide">
<div class="teaser">
{% if projekt.image %}
<a href="{{ detailLink }}">
{{ projekt.image.thumbnail('ProjektTeaser').html | raw }}
</a>
{% elseif projekt.video %}
{% if projekt.video.type == 'youtube' %}
<iframe width="100%" height="100%" src="https://www.youtube.com/embed/{{ projekt.video.data }}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
{% else %}
<video controls>
<source src="{{ projekt.video.data }}" type="video/mp4">
<source src="{{ projekt.video.data }}" type="video/ogg">
Your browser does not support the video tag.
</video>
{% endif %}
{% endif %}
</div>
</div>
{% endfor %}
{% endif %}
</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_Projekte' | trans }}">
{% if not pimcore_input('anchor-button').isEmpty() %}
{{ pimcore_input('anchor-button').getData() }}
{% else %}
{{ 'Alle_Projekte' | trans }}
{% endif %}
<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>