src/CmsBundle/Resources/views/blocks/framework_empty.html.twig line 1

Open in your IDE?
  1. {#
  2.   {
  3.     "key": "framework_empty",
  4.     "category": "Framework",
  5.     "label": "Content / Media / Extensie",
  6.     "description": "...",
  7.     "allowMove": true,
  8.     "divider": true,
  9.     "priority": 1,
  10.     "blocks": [
  11.       {
  12.         "key": "block-0",
  13.         "size": 12,
  14.         "required": "",
  15.         "buttons": true,
  16.         "multiple": true,
  17.         "fields": []
  18.       }
  19.     ]
  20.   }
  21. #}
  22. <section
  23. class="empty {{wrapper.classList}}"
  24. id="{{wrapper.cssId is defined ? wrapper.cssId : ''}}"
  25. style="{{wrapper.styleList}}"
  26. data-id="{{wrapper.id}}">
  27.   <div class="container {{ firstBlock.class }}">
  28.     {% if wrapper.label or wrapper.intro is not empty %}
  29.       <div class="introblock">
  30.         {% if wrapper.label is not empty %}
  31.           <div class="introtitle">
  32.             {{wrapper.label|raw}}
  33.           </div>
  34.         {% endif %}
  35.         {% if wrapper.intro is not empty %}
  36.           <div class="introtext">
  37.             {{wrapper.intro|raw}}
  38.           </div>
  39.         {% endif %}
  40.       </div>
  41.     {% endif %}
  42.     <div class="row">
  43.       {% for b in wrapper.blocks %}
  44.         <div class="col-sm-12 col-md-12 col-lg-{{b.width}} {{b.offset('offset-lg-')}} {{b.config.class}}" id="{{b.config.id}}">
  45.           {% if b.config.link is defined and b.config.link is not empty %}
  46.           <a href="{{b.config.link}}">
  47.           {% endif %}
  48.           <div class="block">
  49.             {% if b.data.type is defined and b.data.type == 'video' %}
  50.               <div class="responsive-wrapper">
  51.                 {{b.video|raw}}
  52.               </div>
  53.               {% elseif b.media is not empty %}
  54.               <div class="image-wrapper">
  55.                 {% if b.media is not empty %}
  56.                   <div class="lcp">
  57.                     {% if b.media.hasBlurred %}
  58.                       <picture>
  59.                         {% if b.media.hasWebp() %}
  60.                           <source srcset="/{{b.media.getBlurredWebpPath('medium')}}" type="image/webp">
  61.                         {% endif %}
  62.                         <source srcset="/{{b.media.getBlurredWebPath('medium')}}" type="{{b.media.mime}}">
  63.                         <img class="lq" alt="{{b.media.description_alt}}" src="/{{b.media.getBlurredWebPath('medium')}}" type="{{b.media.mime}}" loading="lazy" width="{{b.media.width}}" height="{{b.media.height}}">
  64.                       </picture>
  65.                     {% endif %}
  66.                     <picture>
  67.                       {% if b.media.hasWebp() %}
  68.                         <source srcset="/{{b.media.getWebpPath('large')}}" type="image/webp">
  69.                       {% endif %}
  70.                       <source srcset="/{{b.media.getWebPath('large')}}" type="{{ b.media.mime }}">
  71.                       <img
  72.                         class="hq"
  73.                         alt="{{b.media.description_alt}}"
  74.                         src="/{{b.media.getWebPath('large')}}"
  75.                         type="{{b.media.mime}}"
  76.                         loading="lazy"
  77.                         width="{{b.media.width}}"
  78.                         height="{{b.media.height}}"
  79.                         onload="this.style.opacity=1{% if b.media.hasBlurred %};this.closest('.lcp').getElementsByClassName('lq')[0].style.opacity=0;{% endif %}"
  80.                         style="opacity: 0;">
  81.                     </picture>
  82.                   </div>
  83.                 {% endif %}
  84.                 </div>
  85.               {% else %}
  86.               <div class="text-wrapper">
  87.                 {{b.content|raw}}
  88.                 {% if b.config.buttons is defined %}
  89.                   <div class="btns">
  90.                     {% for button in b.config.buttons %}
  91.                       <a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="btn {{button.class}}">
  92.                         {{button.label}}
  93.                         <i class="fa fa-arrow-right"></i>
  94.                       </a>
  95.                     {% endfor %}
  96.                   </div>
  97.                 {% endif %}
  98.               </div>
  99.             {% endif %}
  100.           </div>
  101.           {% if b.config.link is defined and b.config.link is not empty %}
  102.           </a>
  103.           {% endif %}
  104.         </div>
  105.       {% endfor %}
  106.     </div>
  107.   </div>
  108. </section>