<div class="container">
{% if editmode %}
<div class="row">
<div class="col-12">
<div class="alert alert-primary p-3" role="alert">
<div class="row g-3 align-items-center">
<div class="col-auto">
<div class="me-3 d-inline-block">
{{ "Aantal kolommen"|trans({}, 'admin') }}
{{ pimcore_select("colNumber", {
"store": [
["1", "1"],
["2", "2"],
["3", "3"],
["4", "4"],
["6", "6"]
],
"reload" : true,
"defaultValue" : "1",
"class" : "ms-3"
}) }}
</div>
</div>
<div class="col-auto d-flex align-items-center">
<div class="ms-3 d-inline-block">
{{ pimcore_checkbox('marginBottom', {
'reload' : false
}) }}
{{ 'Marge onderaan'|trans({}, 'admin') }}
</div>
</div>
<div class="col-auto d-flex align-items-center">
<div class="ms-3 d-inline-block">
{{ pimcore_checkbox('marginTop', {
'reload' : false
}) }}
{{ 'Marge bovenaan'|trans({}, 'admin') }}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{# // Set Colwidth #}
{% set colNumber = pimcore_select("colNumber").getData() %}
{% if colNumber == 1 %}
{% set colWidth = 'col-12 col-lg-12' %}
{% elseif colNumber == 2 %}
{% set colWidth = 'col-12 col-lg-6' %}
{% elseif colNumber == 3 %}
{% set colWidth = 'col-12 col-lg-4' %}
{% elseif colNumber == 4 %}
{% set colWidth = 'col-6 col-lg-3' %}
{% elseif colNumber == 6 %}
{% set colWidth = 'col-6 col-lg-2' %}
{% else %}
{% set colWidth = 'col-6 col-lg-12' %}
{% endif %}
<div class="row {% if pimcore_checkbox('marginBottom').isChecked() %}mb-5{% endif %} {% if pimcore_checkbox('marginTop').isChecked() %}mt-5{% endif %} gy-3 gy-lg-0 justify-content-center">
{# // Make columns #}
{% for x in 1..colNumber %}
{% if editmode %}
<div class="{{ colWidth }}">
<div class="border border-1 border-black mb-3 p-3"
style="background-color:{{ pimcore_input("colColor-"~x).getData() }}">
{{ 'Achtergrondafbeelding'|trans({}, 'admin') }}
{{ pimcore_image("bg-image-"~x, {
"thumbnail" : "colThumb",
"width" : 300,
"height" : 300,
"class" : "img-fluid"
}) }}
<div>
{{ 'Shape'|trans({}, 'admin') }}
{{ pimcore_checkbox("shape-"~x, {
"reload" : false,
"class" : 'd-inline-block p-1 w-100 border border-1 border-primary bg-white'
}) }}
</div>
<div>
{{ 'Background color'|trans({}, 'admin') }}
{{ pimcore_input("colColor-"~x, {
"reload" : true,
"class" : 'd-inline-block p-1 w-100 border border-1 border-primary bg-white'
}) }}
</div>
<div>
{{ 'Hover color'|trans({}, 'admin') }}
{{ pimcore_input("colHoverColor-"~x, {
"reload" : true,
"class" : 'd-inline-block p-1 w-100 border border-1 border-primary bg-white'
}) }}
</div>
<div>
{{ 'Link'|trans({}, 'admin') }}
{{ pimcore_link("colLink-"~x) }}
</div>
<div>
{{ 'Text'|trans({}, 'admin') }}
{{ pimcore_wysiwyg("content-"~x, {
"height" : 200,
"customConfig" : "/static/ckeditor/ckeditor_config.js",
}) }}</div>
</div>
</div>
{% endif %}
{% if not editmode %}
<div class="{{ colWidth }}">
<div class="area-col">
<div class="area-col-inner position-relative {% if pimcore_checkbox("shape-"~x).isChecked() %}area-shape area-shape-default{% endif %}"
style="background-color:{{ pimcore_input("colColor-"~x).getData() }};">
{#
{% if pimcore_link("colLink-"~x) %}
<a href="{{ pimcore_link("colLink-"~x).getHref() }}" class="d-block h-100"
target="{{ pimcore_link("colLink-"~x).getTarget() }}">
{% endif %}#}
{% if editmode %}
<div class="d-block h-100">
{{ pimcore_image("bg-image-"~x, {
"thumbnail" : "colThumb",
"class" : "img-fluid"
}) }}
</div>
<img src="{{ pimcore_image("bg-image-"~x).getThumbnail("column-thumb") }}"
class="img-fluid">
{% endif %}
{% if not editmode and not pimcore_image("bg-image-"~x).isEmpty() %}
<div class="d-block h-100 w-100 area-col-inner-img position-absolute start-0 top-0">
<img src="{{ pimcore_image("bg-image-"~x).getThumbnail("column-thumb") }}"
class="">
</div>
{% endif %}
{#
<div class="overlay"
style=" background-color:{{ pimcore_input("colHoverColor-"~x).getdata() }} ">
</div>#}
<div class="{#top-0 start-0 h-100 w-100#} d-flex align-items-center area-col-text p-5">
<div class="w-100">
{% if pimcore_link("colLink-"~x) %}
<h2 class="text-white m-0">{{ pimcore_link("colLink-"~x).getText() }}</h2>
{% endif %}
{{ pimcore_wysiwyg("content-"~x, {
"height" : 200
}) }}
</div>
</div>
{#
{% if pimcore_link("colLink-"~x) %}
</a>
{% endif %}#}
</div>
{% if pimcore_checkbox("shape-"~x).isChecked() %}
<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg">
<clipPath clipPathUnits="objectBoundingBox" id="shapeyellow">
<path d="M0.536,0.991 s-0.414,0.038,-0.47,-0.038 C0.013,0.879,-0.009,0.825,0.004,0.696 s0.013,-0.268,0.013,-0.376 C0.018,0.133,0.026,0.017,0.269,0.006 C0.512,-0.005,0.731,-0.001,0.854,0.023 c0.121,0.023,0.14,0.05,0.143,0.241 c0.003,0.192,0.017,0.613,-0.062,0.688 c-0.054,0.051,-0.125,0.042,-0.399,0.038"></path>
</clipPath>
</svg>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div><!--end container-->