{% set theme = pimcore_checkbox('theme').checked ? 'dark' : 'light' %}
{% set breakTitle = pimcore_checkbox('breakTitle').checked %}
{% set className = className|default('img-teaser__btn') %}
{% if editmode %}
{{ include('layout/includes/css.html.twig') }}
<div class="ms-auto">
{% embed 'includes/editmode-settings.html.twig' %}
{% block settings %}
{{ pimcore_checkbox('theme', {
label: 'Dark theme',
reload: true,
}) }} <br>
{{ pimcore_checkbox('breakTitle', {
label: 'Break title',
}) }} <br>
{{ pimcore_checkbox('careerLink', {
label: 'Use as career teaser (One button with resort-according mail address)',
reload: true,
}) }} <br>
{{ pimcore_image('image', {
width: 200,
}) }}
{% endblock %}
{% endembed %}
</div>
{% endif %}
<article class="slider-teaser content-gradient {{ not editmode ? 'img-zoom-hover stretch-link' }} {{ pimcore_checkbox('theme').checked ? 'theme-dark' : 'theme-light' }}">
{% if not pimcore_image('image').isEmpty() %}
<div class="ratio ratio-3x1 ratio-2x3-xs">
{{ pimcore_image('image').thumbnail('slide-teaser').getHtml({
imgAttributes: {
class: 'ratio-item js-lazy-img slider-teaser__img',
},
lowQualityPlaceholder: true,
})|raw }}
</div>
{% endif %}
<div class="slider-teaser__content">
<div {{ (editmode and pimcore_image('image').isEmpty()) ? 'style="color:#b2b0ae;"' : '' }}>
<h3 class="text-gradient-primary slider-teaser__subtitle">{{ pimcore_input('subtitle', {'placeholder': 'Subtitle'}) }}</h3>
<h2 class="slider-teaser__title">
{% if editmode or not pimcore_input('title-bold').isEmpty() %}
<strong class="title-block__title--bold">{{ pimcore_input('title-bold', {'placeholder': 'Bold title'}) }}</strong>
{% if breakTitle %}
<br>
{% endif %}
{% endif %}
{% if editmode or not pimcore_input('title').isEmpty() %}
{{ pimcore_input('title', {'placeholder': 'Title'}) }}
{% endif %}
</h2>
<div class="font-bold img-teaser__text">{{ pimcore_wysiwyg('content')|raw }}</div>
</div>
<ul class="btn-container list-unstyled list-inline">
{% set stretchLinkClass = (pimcore_block('links').getCount() == 1) and not editmode ? 'stretch-link__link' %}
{% if pimcore_checkbox('careerLink').checked %}
<li class="list-inline-item">
{% set resort = app.request.get('resort') %}
{% if resort == 'loader' %}
<a href="mailto:{{ siteConfig().getLoaderMailAddress() }}" class="img-teaser__btn stretch-link__link btn btn-{{ theme }}">{{ 'career.UnsolicitedApplication'|trans }}</a>
{% elseif resort is not null %}
<a href="mailto:{{ siteConfig().getConstructionMailAddress() }}" class="img-teaser__btn stretch-link__link btn btn-{{ theme }}">{{ 'career.UnsolicitedApplication'|trans }}</a>
{% endif %}
</li>
{% else %}
{% for i in pimcore_iterate_block(pimcore_block('links')) %}
<li class="list-inline-item">
{{ pimcore_link('img-teaser-link', {
class: "img-teaser__btn btn btn-#{theme} " ~ stretchLinkClass,
}) }}
</li>
{% endfor %}
{% endif %}
</ul>
</div>
</article>