{#
{
"key": "framework_hero_centered",
"category": "Framework",
"label": "Hero (Gecentreerd)",
"description": "...",
"allowMove": false,
"blocks": [
{
"key": "block-0",
"size": 12,
"required": "none",
"buttons": true,
"fields": [
{
"key": "title",
"type": "textarea",
"label": "Titel"
},
{
"key": "subtitle",
"type": "textarea",
"label": "Subtitel"
}
]
},
{
"key": "block-1",
"size": 12,
"required": "media",
"fields": []
}
]
}
#}
<section
class="hero centered {{wrapper.classList}}"
id="{{wrapper.cssId is defined ? wrapper.cssId : ''}}"
style="{{wrapper.styleList}}"
data-id="{{wrapper.id}}">
<div class="slider">
<div class="slide">
{% if wrapper.blocks[1].media is not empty %}
<div class="lcp">
{% if wrapper.blocks[1].media.hasBlurred %}
<picture>
{% if wrapper.blocks[1].media.hasWebp() %}
<source srcset="/{{wrapper.blocks[1].media.getBlurredWebpPath('large')}}" type="image/webp">
{% endif %}
<source srcset="/{{wrapper.blocks[1].media.getBlurredWebPath('large')}}" type="{{wrapper.blocks[1].media.mime}}">
<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}}">
</picture>
{% endif %}
<picture>
{% if wrapper.blocks[1].media.hasWebp() %}
<source srcset="/{{wrapper.blocks[1].media.getWebpPath('full')}}" type="image/webp">
{% endif %}
<source srcset="/{{wrapper.blocks[1].media.getWebPath('full')}}" type="{{ wrapper.blocks[1].media.mime }}">
<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;">
</picture>
</div>
{% endif %}
{% if firstBlock.config.title or firstBlock.config.subtitle or firstBlock.config.buttons is defined %}
<div class="container {{ firstBlock.class }}">
<div class="vtable">
<div class="vcell">
<div class="titles">
<div class="title"><h1>{{firstBlock.config.title|raw}}</h1></div>
<div class="text">{{firstBlock.config.subtitle|raw}}</div>
{% if firstBlock.config.buttons is defined %}
<div class="btns">
{% for button in firstBlock.config.buttons %}
<a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="btn {{button.class}}">
{{button.label}}
<i class="fa fa-arrow-right"></i>
</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</section>