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

Open in your IDE?
  1. {% set theme = pimcore_checkbox('theme').checked ? 'theme-dark' : 'theme-light' %}
  2. {% set themebtn = pimcore_checkbox('theme').checked ? 'btn-dark' : 'btn-light' %}
  3. {% set breakTitle = pimcore_checkbox('breakTitle').checked %}
  4. {% set className = className|default('img-teaser__btn') %}
  5. {% if editmode %}
  6.     {{ include('layout/includes/css.html.twig') }}
  7.     <div class="ms-auto">
  8.         {% embed 'includes/editmode-settings.html.twig' %}
  9.             {% block settings %}
  10.                 {{ pimcore_checkbox('theme', {
  11.                     label: 'Dark theme',
  12.                 }) }} <br>
  13.                 {{ pimcore_checkbox('breakTitle', {
  14.                     label: 'Break title',
  15.                 }) }}
  16.             {% endblock %}
  17.         {% endembed %}
  18.     </div>F
  19. {% endif %}
  20. <article class="{{ not editmode ? 'img-teaser img-zoom-hover stretch-link content-gradient' }} {{ not editmode ? pimcore_checkbox('theme').checked ? 'theme-dark' : 'theme-light' : '' }}">
  21.     <div class="{{ not editmode ? 'ratio ratio-3x2 ratio-3x4-xs overflow-hidden' }}">
  22.         {{ pimcore_image('img-teaser-img', {
  23.             thumbnail: 'img-teaser',
  24.             imgAttributes: {
  25.                 class: "#{ not editmode ? 'js-lazy-img'} ratio-item  img-teaser__img",
  26.             },
  27.             lowQualityPlaceholder: true,
  28.         })|raw }}
  29.     </div>
  30.     <div class="{{ not editmode ? 'img-teaser__content' }}">
  31.         <div>
  32.             <h3 class="text-gradient-primary img-teaser__subtitle">{{ pimcore_input('subtitle', {'placeholder': 'Subtitle'}) }}</h3>
  33.             <h2 class="img-teaser__title">
  34.                 {% if editmode or not pimcore_input('title-bold').isEmpty() %}
  35.                     <strong class="title-block__title--bold">{{ pimcore_input('title-bold', {'placeholder': 'Bold title'}) }}</strong>
  36.                     {% if breakTitle %}
  37.                         <br>
  38.                     {% endif %}
  39.                 {% endif %}
  40.                 {% if editmode or not pimcore_input('title').isEmpty() %}
  41.                     {{ pimcore_input('title', {'placeholder': 'Title'}) }}
  42.                 {% endif %}
  43.             </h2>
  44.             <div class="font-bold img-teaser__text">{{ pimcore_wysiwyg('content')|raw }}</div>
  45.         </div>
  46.         {% if pimcore_block('links').count > 1 %}
  47.             <ul class="btn-container list-unstyled list-inline">
  48.                 {% for i in pimcore_iterate_block(pimcore_block('links')) %}
  49.                     <li class="list-inline-item">
  50.                         {{ pimcore_link('img-teaser-link', {
  51.                             class: "btn #{themebtn} img-teaser__btn"
  52.                         }) }}
  53.                     </li>
  54.                 {% endfor %}
  55.             </ul>
  56.         {% else %}
  57.             {% for i in pimcore_iterate_block(pimcore_block('links')) %}
  58.                 {{ pimcore_link('img-teaser-link', {
  59.                     class: "#{ not editmode ? 'stretch-link__link'} btn #{themebtn} img-teaser__btn"
  60.                 }) }}
  61.             {% endfor %}
  62.         {% endif %}
  63.     </div>
  64. </article>