{% set theme = pimcore_checkbox('theme').checked ? 'theme-dark' : 'theme-light' %}
{% set themebtn = pimcore_checkbox('theme').checked ? 'btn-dark' : 'btn-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',
}) }} <br>
{{ pimcore_checkbox('breakTitle', {
label: 'Break title',
}) }}
{% endblock %}
{% endembed %}
</div>F
{% endif %}
<article class="{{ not editmode ? 'img-teaser img-zoom-hover stretch-link content-gradient' }} {{ not editmode ? pimcore_checkbox('theme').checked ? 'theme-dark' : 'theme-light' : '' }}">
<div class="{{ not editmode ? 'ratio ratio-3x2 ratio-3x4-xs overflow-hidden' }}">
{{ pimcore_image('img-teaser-img', {
thumbnail: 'img-teaser',
imgAttributes: {
class: "#{ not editmode ? 'js-lazy-img'} ratio-item img-teaser__img",
},
lowQualityPlaceholder: true,
})|raw }}
</div>
<div class="{{ not editmode ? 'img-teaser__content' }}">
<div>
<h3 class="text-gradient-primary img-teaser__subtitle">{{ pimcore_input('subtitle', {'placeholder': 'Subtitle'}) }}</h3>
<h2 class="img-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>
{% if pimcore_block('links').count > 1 %}
<ul class="btn-container list-unstyled list-inline">
{% for i in pimcore_iterate_block(pimcore_block('links')) %}
<li class="list-inline-item">
{{ pimcore_link('img-teaser-link', {
class: "btn #{themebtn} img-teaser__btn"
}) }}
</li>
{% endfor %}
</ul>
{% else %}
{% for i in pimcore_iterate_block(pimcore_block('links')) %}
{{ pimcore_link('img-teaser-link', {
class: "#{ not editmode ? 'stretch-link__link'} btn #{themebtn} img-teaser__btn"
}) }}
{% endfor %}
{% endif %}
</div>
</article>