templates/Magazine/DetailBlocks/BlogArticleWysiwygMedia.html.twig line 1

Open in your IDE?
  1. <section class="wysiwyg-with-medium {{ not block.textRight ? 'wysiwyg-with-medium--wysiwyg-left' : '' }} container content-block js-fade-in {{ styleModifier | default(null) }}">
  2.     <div class="container container-sm">
  3.         <div class="row row--gutter-width-0 vertical-gutter vertical-gutter--3">
  4.             {% if not block.textRight %}
  5.                 {{ _self.wysiwyg(block.descWysiwyg, block.headline, block.subtitle, true) }}
  6.             {% endif %}
  7.             <div class="col-md-6 vertical-gutter__item {{ not block.textRight ? 'offset-xl-1' : '' }}">
  8.                 <div class="h-100 {{ not block.textRight ? 'container__break-right-half' : 'container__break-left-half' }}">
  9.                     <div class="h-100 wysiwyg-with-medium__media js-lightbox">
  10.                         <button class="wysiwyg-with-medium__zoom-btn">
  11.                             <span class="icon icon-search" aria-hidden="true"></span>
  12.                         </button>
  13.                         {% if block.image %}
  14.                             {% do jsConfig().add('lightbox', true) %}
  15.                             {% set lightBoxSrc = block.image.thumbnail('lightbox') %}
  16.                             <a href="{{ lightBoxSrc }}"
  17.                                class="js-lightbox__item embed-responsive embed-responsive-9by6 embed-responsive-cover">
  18.                                 {{ block.image.thumbnail('wysiwyg-with-media').html({
  19.                                     imgAttributes: {
  20.                                         class: 'js-lazy-img embed-responsive-item'
  21.                                     },
  22.                                     lowQualityPlaceholder: true,
  23.                                 })|raw }}
  24.                             </a>
  25.                         {% endif %}
  26.                     </div>
  27.                 </div>
  28.             </div>
  29.             {% if block.textRight %}
  30.                 {{ _self.wysiwyg(block.descWysiwyg, block.headline, block.subtitle, false) }}
  31.             {% endif %}
  32.         </div>
  33.     </div>
  34. </section>
  35. {% macro wysiwyg(content, title, subtitle, isWysiwygLeft) %}
  36.     <div class="col-xl-5 col-md-6 vertical-gutter__item order-1 order-sm-0 d-flex flex-column justify-content-center {{ isWysiwygLeft ? '' : 'ml-auto' }}">
  37.         <div class="wysiwyg-with-medium__inner">
  38.             {{ include('Includes/title-block.html.twig', {
  39.                 title: title,
  40.                 subtitle: subtitle,
  41.                 isCentered: false
  42.             }, with_context = false) }}
  43.             <div class="wysiwyg-with-medium__content wysiwyg">
  44.                 {{ content | raw }}
  45.             </div>
  46.         </div>
  47.     </div>
  48. {% endmacro %}