{#
{
"key": "framework_content_image",
"category": "Framework",
"label": "Content + afbeelding",
"description": "Content met afbeelding",
"allowMove": true,
"blocks": [
{
"key": "block-0",
"size": 6,
"buttons": true,
"required": "none",
"fields": [
{
"key": "title",
"type": "text",
"label": "Titel"
},
{
"key": "text",
"type": "textarea",
"label": "Tekst"
}
]
},
{
"key": "block-1",
"size": 6,
"required": "media",
"fields": []
}
]
}
#}
{#
Available objects:
- page: current page
- locale: current locale
- wrapper: contains the wrapper around multiple blocks.
- firstBlock: contains the first block in the wrapper, useful when only one block is expected.
- data: contains the data as mentioned above this file
#}
<section
class="text-blocks {{wrapper.classList}}"
id="{{wrapper.cssId is defined ? wrapper.cssId : ''}}"
style="{{wrapper.styleList}}"
data-id="{{wrapper.id}}">
<div class="container">
{% if wrapper.label or wrapper.intro is not empty %}
<div class="introblock">
{% if wrapper.label is not empty %}
<div class="introtitle">
{{wrapper.label|raw}}
</div>
{% endif %}
{% if wrapper.intro is not empty %}
<div class="introtext">
{{wrapper.intro|raw}}
</div>
{% endif %}
</div>
{% endif %}
<div class="section-bg">
<div class="row">
{% for b in wrapper.blocks %}
{% if data.blocks_q[b.templateKey].required == 'media' %}
<div class="col-sm-12 col-md-12 col-lg-{{b.width}} {{b.offset('offset-lg-')}} {{b.config.class}}" id="{{b.config.id}}">
{% if b.media is not empty %}
<div class="lcp">
{% if b.media.hasBlurred %}
<picture>
{% if b.media.hasWebp() %}
<source srcset="/{{b.media.getBlurredWebpPath('medium')}}" type="image/webp">
{% endif %}
<source srcset="/{{b.media.getBlurredWebPath('medium')}}" type="{{b.media.mime}}">
<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}}">
</picture>
{% endif %}
<picture>
{% if b.media.hasWebp() %}
<source srcset="/{{b.media.getWebpPath('large')}}" type="image/webp">
{% endif %}
<source srcset="/{{b.media.getWebPath('large')}}" type="{{ b.media.mime }}">
<img class="hq" alt="{{b.media.description_alt}}" src="/{{b.media.getWebPath('large')}}" type="{{b.media.mime}}" loading="lazy" width="{{b.media.width}}" height="{{b.media.height}}" onload="this.style.opacity=1{% if b.media.hasBlurred %};this.closest('.lcp').getElementsByClassName('lq')[0].style.opacity=0;{% endif %}" style="opacity: 0;">
</picture>
</div>
{% endif %}
</div>
{% else %}
<div class="col-sm-12 col-md-12 col-lg-{{b.width}} {{b.offset('offset-lg-')}} {{b.config.class}}" id="{{b.config.id}}">
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="section-front">
<div class="row">
{% for b in wrapper.blocks %}
{% if data.blocks_q[b.templateKey].required == 'media' %}
<div class="col-sm-12 col-md-12 col-lg-{{b.width}} {{b.offset('offset-lg-')}} {{b.config.class}}" id="{{b.config.id}}">
<div class="image-wrapper">
{% if b.media is not empty %}
<div class="lcp">
{% if b.media.hasBlurred %}
<picture>
{% if b.media.hasWebp() %}
<source srcset="/{{b.media.getBlurredWebpPath('medium')}}" type="image/webp">
{% endif %}
<source srcset="/{{b.media.getBlurredWebPath('medium')}}" type="{{b.media.mime}}">
<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}}">
</picture>
{% endif %}
<picture>
{% if b.media.hasWebp() %}
<source srcset="/{{b.media.getWebpPath('large')}}" type="image/webp">
{% endif %}
<source srcset="/{{b.media.getWebPath('large')}}" type="{{ b.media.mime }}">
<img class="hq" alt="{{b.media.description_alt}}" src="/{{b.media.getWebPath('large')}}" type="{{b.media.mime}}" loading="lazy" width="{{b.media.width}}" height="{{b.media.height}}" onload="this.style.opacity=1{% if b.media.hasBlurred %};this.closest('.lcp').getElementsByClassName('lq')[0].style.opacity=0;{% endif %}" style="opacity: 0;">
</picture>
</div>
{% endif %}
</div>
</div>
{% else %}
<div class="col-sm-12 col-md-12 col-lg-{{b.width}} {{b.offset('offset-lg-')}} {{b.config.class}}" id="{{b.config.id}}">
<div class="text-wrapper">
<div class="padder">
{% if b.config.title is not empty %}
<h3 class="title">{{b.config.title}}</h3>
{% endif %}
<div class="text">
{{b.config.text|raw}}
</div>
{% if b.config.buttons is defined %}
{% for button in b.config.buttons %}
<a href="{{button.url}}" {% if button.target is defined and button.target != 'null' and button.target is not empty %} target="{{button.target}}" {% endif %} class="btn {{button.class}}">
{{button.label}}
<i class="fa fa-arrow-right"></i>
</a>
{% endfor %}
{% endif %}
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</section>