templates/Snippets/magazin-social-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.         <div>
  10.             <label>
  11.                 Social Icon
  12.             </label>
  13.             <br>
  14.             {{ pimcore_select('socialMedia', {'store': getSocialIcons(), 'reload': true}) }}
  15.         </div>
  16.         <div>
  17.             <label>
  18.                 Image (optional)
  19.             </label>
  20.             {{ pimcore_relation('image', {'types': ['asset'], 'subtypes': ['image'], 'reload': true}) }}
  21.         </div>
  22.     </div> {# end editmode box #}
  23. {% endif %}
  24. {% if editmode %}
  25. <div class="vertical-gutter__item col-md-4 js-fade-in" style="height: 530px;">
  26.     {% endif %}
  27.     <section class="social-media-teaser {{ styleModifier | default(null) }} {{ not pimcore_link('button').isEmpty() ? 'stretch-link isCursor' : '' }}">
  28.         {% if not editmode %}
  29.             {% do jsConfig().add('goToLink', true) %}
  30.             {% do jsConfig().add('lazyImg', true) %}
  31.         {% endif %}
  32.         <div class="embed-responsive embed-responsive-cover social-media-teaser__embed">
  33.             {% if not pimcore_relation('image').empty %}
  34.                 {{ pimcore_relation('image').element.thumbnail('social-media-teaser').html({
  35.                     imgAttributes: {
  36.                         class: 'embed-responsive-item js-lazy-img social-media-teaser__img'
  37.                     },
  38.                     lowQualityPlaceholder: true,
  39.                 }) | raw }}
  40.             {% endif %}
  41.         </div>
  42.         <div class="social-media-teaser__body">
  43.             {# available Social-Media-Icons instagram, facebook, pinterest, youtube  #}
  44.             <span class="social-media-teaser__icon icon icon-{{ pimcore_select('socialMedia').getData() }}" aria-label="{{ pimcore_select('socialMedia').getData() }}" title="{{ pimcore_select('socialMedia').getData() }}"></span>
  45.             <h3 class="social-media-teaser__title">
  46.                 {{ pimcore_link('button', {'class': 'stretch-link__link'}) }}
  47.             </h3>
  48.         </div>
  49.     </section>
  50.     {% if editmode %}
  51. </div>
  52. {% endif %}