templates/snippets/teaser/teaser-topic-wide.html.twig line 1

Open in your IDE?
  1. {% set theme = pimcore_checkbox('theme').checked ? 'dark' : 'light' %}
  2. {% set breakTitle = pimcore_checkbox('breakTitle').checked %}
  3. {% set className = className|default('img-teaser__btn') %}
  4. {% if editmode %}
  5.     {{ include('layout/includes/css.html.twig') }}
  6.     <div class="ms-auto">
  7.         {% embed 'includes/editmode-settings.html.twig' %}
  8.             {% block settings %}
  9.                 {{ pimcore_checkbox('theme', {
  10.                     label: 'Dark theme',
  11.                     reload: true,
  12.                 }) }} <br>
  13.                 {{ pimcore_checkbox('breakTitle', {
  14.                     label: 'Break title',
  15.                 }) }} <br>
  16.                 {{ pimcore_checkbox('careerLink', {
  17.                     label: 'Use as career teaser (One button with resort-according mail address)',
  18.                     reload: true,
  19.                 }) }} <br>
  20.                 {{ pimcore_image('image', {
  21.                     width: 200,
  22.                 }) }}
  23.             {% endblock %}
  24.         {% endembed %}
  25.     </div>
  26. {% endif %}
  27. <article class="slider-teaser content-gradient {{ not editmode ? 'img-zoom-hover stretch-link' }} {{ pimcore_checkbox('theme').checked ? 'theme-dark' : 'theme-light' }}">
  28.     {% if not pimcore_image('image').isEmpty() %}
  29.         <div class="ratio ratio-3x1 ratio-2x3-xs">
  30.             {{ pimcore_image('image').thumbnail('slide-teaser').getHtml({
  31.                 imgAttributes: {
  32.                     class: 'ratio-item js-lazy-img slider-teaser__img',
  33.                 },
  34.                 lowQualityPlaceholder: true,
  35.             })|raw }}
  36.         </div>
  37.     {% endif %}
  38.     <div class="slider-teaser__content">
  39.         <div {{ (editmode and pimcore_image('image').isEmpty()) ? 'style="color:#b2b0ae;"' : '' }}>
  40.             <h3 class="text-gradient-primary slider-teaser__subtitle">{{ pimcore_input('subtitle', {'placeholder': 'Subtitle'}) }}</h3>
  41.             <h2 class="slider-teaser__title">
  42.                 {% if editmode or not pimcore_input('title-bold').isEmpty() %}
  43.                     <strong class="title-block__title--bold">{{ pimcore_input('title-bold', {'placeholder': 'Bold title'}) }}</strong>
  44.                     {% if breakTitle %}
  45.                         <br>
  46.                     {% endif %}
  47.                 {% endif %}
  48.                 {% if editmode or not pimcore_input('title').isEmpty() %}
  49.                     {{ pimcore_input('title', {'placeholder': 'Title'}) }}
  50.                 {% endif %}
  51.             </h2>
  52.             <div class="font-bold img-teaser__text">{{ pimcore_wysiwyg('content')|raw }}</div>
  53.         </div>
  54.         <ul class="btn-container list-unstyled list-inline">
  55.             {% set stretchLinkClass = (pimcore_block('links').getCount() == 1) and not editmode ? 'stretch-link__link' %}
  56.             {% if pimcore_checkbox('careerLink').checked %}
  57.                 <li class="list-inline-item">
  58.                     {% set resort = app.request.get('resort') %}
  59.                     {% if resort == 'loader' %}
  60.                         <a href="mailto:{{ siteConfig().getLoaderMailAddress() }}" class="img-teaser__btn stretch-link__link btn btn-{{ theme }}">{{ 'career.UnsolicitedApplication'|trans }}</a>
  61.                     {% elseif resort is not null %}
  62.                         <a href="mailto:{{ siteConfig().getConstructionMailAddress() }}" class="img-teaser__btn stretch-link__link btn btn-{{ theme }}">{{ 'career.UnsolicitedApplication'|trans }}</a>
  63.                     {% endif %}
  64.                 </li>
  65.             {% else %}
  66.                 {% for i in pimcore_iterate_block(pimcore_block('links')) %}
  67.                     <li class="list-inline-item">
  68.                         {{ pimcore_link('img-teaser-link', {
  69.                             class: "img-teaser__btn btn btn-#{theme} " ~ stretchLinkClass,
  70.                         }) }}
  71.                     </li>
  72.                 {% endfor %}
  73.             {% endif %}
  74.         </ul>
  75.     </div>
  76. </article>