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

Open in your IDE?
  1. {#
  2.     {
  3.         "key": "framework_hero_centered",
  4.         "category": "Framework",
  5.         "label": "Hero (Gecentreerd)",
  6.         "description": "...",
  7.         "allowMove": false,
  8.         "blocks": [
  9.             {
  10.                 "key": "block-0",
  11.                 "size": 12,
  12.                 "required": "none",
  13.                 "buttons": true,
  14.                 "fields": [
  15.                     {
  16.                         "key": "title",
  17.                         "type": "textarea",
  18.                         "label": "Titel"
  19.                     },
  20.                     {
  21.                         "key": "subtitle",
  22.                         "type": "textarea",
  23.                         "label": "Subtitel"
  24.                     }
  25.                 ]
  26.             },
  27.             {
  28.                 "key": "block-1",
  29.                 "size": 12,
  30.                 "required": "media",
  31.                 "fields": []
  32.             }
  33.         ]
  34.     }
  35. #}
  36. <section
  37. class="hero centered {{wrapper.classList}}"
  38. id="{{wrapper.cssId is defined ? wrapper.cssId : ''}}"
  39. style="{{wrapper.styleList}}"
  40. data-id="{{wrapper.id}}">
  41.   <div class="slider">
  42.     <div class="slide">
  43.       {% if wrapper.blocks[1].media is not empty %}
  44.         <div class="lcp">
  45.           {% if wrapper.blocks[1].media.hasBlurred %}
  46.             <picture>
  47.               {% if wrapper.blocks[1].media.hasWebp() %}
  48.                 <source srcset="/{{wrapper.blocks[1].media.getBlurredWebpPath('large')}}" type="image/webp">
  49.               {% endif %}
  50.               <source srcset="/{{wrapper.blocks[1].media.getBlurredWebPath('large')}}" type="{{wrapper.blocks[1].media.mime}}">
  51.               <img class="lq" alt="{{wrapper.blocks[1].media.description_alt}}" src="/{{wrapper.blocks[1].media.getBlurredWebPath('large')}}" type="{{wrapper.blocks[1].media.mime}}" loading="lazy" width="{{wrapper.blocks[1].media.width}}" height="{{wrapper.blocks[1].media.height}}">
  52.             </picture>
  53.           {% endif %}
  54.           <picture>
  55.             {% if wrapper.blocks[1].media.hasWebp() %}
  56.               <source srcset="/{{wrapper.blocks[1].media.getWebpPath('full')}}" type="image/webp">
  57.             {% endif %}
  58.             <source srcset="/{{wrapper.blocks[1].media.getWebPath('full')}}" type="{{ wrapper.blocks[1].media.mime }}">
  59.           <img class="hq" alt="{{wrapper.blocks[1].media.description_alt}}" src="/{{wrapper.blocks[1].media.getWebPath('full')}}" type="{{wrapper.blocks[1].media.mime}}" loading="lazy" width="{{wrapper.blocks[1].media.width}}" height="{{wrapper.blocks[1].media.height}}" onload="this.style.opacity=1{% if wrapper.blocks[1].media.hasBlurred %};this.closest('.lcp').getElementsByClassName('lq')[0].style.opacity=0;{% endif %}" style="opacity: 0;">
  60.           </picture>
  61.         </div>
  62.       {% endif %}
  63.         {% if firstBlock.config.title or firstBlock.config.subtitle or firstBlock.config.buttons is defined %}
  64.           <div class="container {{ firstBlock.class }}">
  65.             <div class="vtable">
  66.               <div class="vcell">
  67.                 <div class="titles">
  68.                   <div class="title"><h1>{{firstBlock.config.title|raw}}</h1></div>
  69.                   <div class="text">{{firstBlock.config.subtitle|raw}}</div>
  70.                   {% if firstBlock.config.buttons is defined %}
  71.                     <div class="btns">
  72.                     {% for button in firstBlock.config.buttons %}
  73.                       <a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="btn {{button.class}}">
  74.                         {{button.label}}
  75.                         <i class="fa fa-arrow-right"></i>
  76.                       </a>
  77.                     {% endfor %}
  78.                     </div>
  79.                   {% endif %}
  80.                 </div>
  81.               </div>
  82.             </div>
  83.           </div>
  84.         </div>
  85.       {% endif %}
  86.     </div>
  87.   </div>
  88. </section>