templates/Snippets/magazin-text-teaser.html.twig line 1

Open in your IDE?
  1. {# render footer-template #}
  2. {% if editmode %}
  3.     {% do pimcore_placeholder('magazine').set('true') %}
  4.     {{ include('Layout/includes/css.html.twig') }}
  5. {% endif %}
  6. {% if editmode %}
  7.     <div class="editmode-box editmode-box--info">
  8.         <div class="editmode-box__header">Settings</div>
  9.         {# TEXT TEASERS #}
  10.         <div>
  11.             <label>
  12.                 Color
  13.             </label>
  14.             <br>
  15.             {{ pimcore_select('teaserColor', {'store': [
  16.                 ['yellow', 'yellow'],
  17.                 ['blue', 'blue'],
  18.                 ['purple', 'purple'],
  19.                 ['green', 'green'],
  20.                 ['red', 'red'],
  21.             ], 'reload': true}) }}
  22.         </div>
  23.         <div>
  24.             <label>
  25.                 Image (optional)
  26.             </label>
  27.             {{ pimcore_relation('image', {'types': ['asset'], 'subtypes': ['image'], 'reload': true}) }}
  28.         </div>
  29.         {#<div>
  30.             <label>
  31.                 Icon (optional)
  32.             </label>
  33.             <br>
  34.             {{ pimcore_select('icon', {'store': [''], 'reload': true}) }}
  35.         </div>#}
  36.     </div> {# end editmode box #}
  37. {% endif %}
  38. {% if editmode %}
  39. <div class="vertical-gutter__item col-md-4 js-fade-in" style="height: 530px;">
  40.     {% endif %}
  41.     <section class="simple-text-teaser simple-text-teaser--{{ pimcore_select('teaserColor').getData() | default('green') }} {{ styleModifier | default(null)}} {{ not pimcore_link('button').isEmpty() ? 'stretch-link isCursor' : '' }}">
  42.         {% if not editmode %}
  43.             {% do jsConfig().add('goToLink', true) %}
  44.         {% endif %}
  45.         {% if not pimcore_relation('image').empty %}
  46.             <div class="simple-text-teaser__embed embed-responsive-cover embed-responsive simple-text-teaser__image">
  47.                 {{ pimcore_relation('image').element.thumbnail('simple-text-teaser').html({
  48.                     imgAttributes: {
  49.                         class: 'js-lazy-img embed-responsive-item teaser-animation__img'
  50.                     },
  51.                     lowQualityPlaceholder: true,
  52.                 }) | raw }}
  53.             </div>
  54.         {% endif %}
  55.         <div class="simple-text-teaser__content">
  56.             {% if false and not pimcore_select('icon').empty %}
  57.                 <span class="icon icon-{{ pimcore_select('icon').frontend }} simple-text-teaser__icon" aria-hidden="true"></span>
  58.             {% endif %}
  59.             {{ pimcore_textarea('title', {'placeholder' : 'Text', 'nl2br' : true}) }}
  60.         </div>
  61.         {{ pimcore_link('button', {
  62.             'class' : 'btn btn-outline-light simple-text-teaser__btn stretch-link__link'
  63.         }) }}
  64.     </section>
  65.     {% if editmode %}
  66. </div>
  67. {% endif %}