{% if editmode %}
<div class="uk-container apk-container-1400 uk-margin-medium">
<h2 class="uk-h2">Section banner + text + button</h2>
<ul uk-tab>
<li><a href="#">Configurations</a></li>
<li class="uk-active"><a href="#">Content Edit</a></li>
</ul>
<ul class="uk-switcher uk-margin">
<li>
<div>Type de heading pour le titre ?</div>
{{ pimcore_select("content-heading", {
"store" : [
['span', 'span'],
['h1', 'Heading 1'],
['h2', 'Heading 2'],
['h3', 'Heading 3'],
['h4', 'Heading 4'],
['h5', 'Heading 5'],
['h6', 'Heading 6']
],
"defaultValue" : "h2"
}) }}
<div><strong>Style</strong> du heading pour le titre ?</div>
{{ pimcore_select("content-heading-style", {
"store" : [
['h1', 'Heading 1'],
['h2', 'Heading 2'],
['h3', 'Heading 3'],
['h4', 'Heading 4'],
['h5', 'Heading 5'],
['h6', 'Heading 6']
],
"defaultValue" : "h2"
}) }}
<div><strong>Position</strong> des textes</div>
{{ pimcore_select("text-position", {
"store" : [
['uk-position-bottom-left', 'Bas gauche'],
['uk-position-bottom-center', 'Bas centré'],
['uk-position-bottom-right', 'Bas droit'],
['uk-position-center', 'Centré centré']
],
"defaultValue" : "uk-position-bottom-left"
}) }}
<div>Couleur du texte</div>
{{ pimcore_select("text-color", {
"store" : [
['uk-light', 'Blanc'],
['uk-dark', 'Noir'],
],
"defaultValue" : "uk-light"
}) }}
<div>Couleur du bouton</div>
{{ pimcore_select("button-color", {
"store" : [
['uk-button-black', 'Noir'],
['uk-button-white', 'Blanc'],
['', 'Orange']
],
"defaultValue" : "uk-button-black"
}) }}
</li>
<li class="uk-active">
<div class="uk-margin-large-bottom">
<div class="apk-content">
<span class="uk-h4">Image en background (desktop)</span>
{{ pimcore_image('bg-image') }}
<span class="uk-h4">Image en background (mobile)</span>
{{ pimcore_image('bg-image-mobile', {'width' : 600}) }}
<h2 class="uk-h2">
{{ pimcore_textarea("content-title",{
"nl2br" : true,
"placeholder" : "Titre (optionnel)"
}) }}
</h2>
<div class="actions uk-margin-top">
<span class="uk-h4">Lien (optionnel)</span>
<div>
{{ pimcore_link("content-btn", {
"class" : "uk-button"
}) }}
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
{% else %}
{% set buttonColor = pimcore_select("button-color").data %}
{% set position = pimcore_select("text-position").data %}
{% if position == "uk-position-bottom-left" %}
{% set alignment = "uk-text-left" %}
{% elseif position == "uk-position-bottom-center" %}
{% set alignment = "uk-text-center" %}
{% elseif position == "uk-position-bottom-right" %}
{% set alignment = "uk-text-right" %}
{% endif %}
<div class="apk-areabrick-container {{ pimcore_select("text-color") }}">
<div class="uk-container apk-container-1400">
<div class="apk-media">
{% set imgMobile = false %}
{% if not pimcore_image('bg-image-mobile').isEmpty %}
{% set imgMobile = true %}
{% endif %}
{% if pimcore_image('bg-image').src %}
{{ pimcore_image('bg-image').thumbnail('background-image').html({'imgAttributes' : {'class' : (imgMobile ? 'image-desktop uk-visible@s' : '')}})|raw }}
{% endif %}
{% if imgMobile %}
{% if pimcore_image('bg-image-mobile').src %}
{{ pimcore_image('bg-image-mobile').thumbnail('background-image-mobile').html({'imgAttributes' : {'class' : 'image-mobile uk-hidden@s'}})|raw }}
{% endif %}
{% endif %}
<div class="uk-height-1-1">
<div class="uk-position-relative uk-height-1-1">
<div class="apk-position {{ pimcore_select("text-position") }}">
<div class="apk-content">
{% if not pimcore_textarea("content-title").isEmpty %}
{% if pimcore_select("content-heading").getData() == 'span' %}
<span class="uk-h2">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</span>
{% else %}
{% set content_heading = pimcore_select("content-heading").getData() %}
<{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</{{ content_heading }}>
{% endif %}
{% endif %}
{% if not pimcore_link("content-btn").isEmpty() %}
<div class="apk-actions">
{{ pimcore_link("content-btn", {
"class" : "uk-button uk-button-large " ~ buttonColor
}) }}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}