{% if editmode %}
<div class="uk-container apk-container-1400 uk-margin-medium">
<h2 class="uk-h2">Section wysiwyg + 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>Alignement</strong> des textes</div>
{{ pimcore_select("text-align", {
"store" : [
['uk-text-center', 'Centré'],
['uk-text-left', 'Gauche'],
['uk-text-right', 'Droite']
],
"defaultValue" : "uk-text-center"
}) }}
<div>Taille du container</div>
{{ pimcore_select("container-width", {
"store" : [
['apk-container-1400', '1400px (default)'],
['apk-container-1300', '1300px'],
['apk-container-1200', '1200px'],
['apk-container-1100', '1100px'],
['apk-container-1000', '1000px'],
['apk-container-900', '900px'],
['apk-container-800', '800px'],
],
"defaultValue" : "apk-container-1400"
}) }}
<div><strong>Couleur</strong> du background</div>
{{ pimcore_select("bg-color", {
"store" : [
['uk-light', 'Noir'],
['uk-dark', 'Blanc']
],
"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"
}) }}
<div>Espacement en haut du block</div>
{{ pimcore_select("margin-top", {
"store" : [
['', 'Aucun'],
['uk-margin-small-top', 'Petit'],
['uk-margin-medium-top', 'Moyen'],
['uk-margin-large-top', 'Grand'],
['uk-margin-xlarge-top', 'Très grand'],
],
"defaultValue" : ""
}) }}
<div>Espacement en bas du block</div>
{{ pimcore_select("margin-bottom", {
"store" : [
['', 'Aucun'],
['uk-margin-small-bottom', 'Petit'],
['uk-margin-medium-bottom', 'Moyen'],
['uk-margin-large-bottom', 'Grand'],
['uk-margin-xlarge-bottom', 'Très grand'],
],
"defaultValue" : ""
}) }}
</li>
<li class="uk-active">
<div class="uk-margin-large-bottom">
<div class="apk-content">
<h2 class="uk-h2">
{{ pimcore_textarea("content-title",{
"nl2br" : true
}) }}
</h2>
{{ pimcore_wysiwyg("content") }}
<div class="actions uk-margin-top">
<span class="uk-h4">Lien (optionnel)</span>
{{ pimcore_link("content-btn", {
"class" : "uk-button"
}) }}
</div>
</div>
</div>
</li>
</ul>
</div>
{% endif %}
{% set buttonColor = pimcore_select("button-color").data %}
{% if not editmode %}
<div class="apk-areabrick-container {{ pimcore_select("bg-color").data }} {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
<div class="uk-container {{ pimcore_select("container-width") }}">
<div class="{{ pimcore_select("text-align") }}">
{% 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 %}
<div class="apk-content">
{{ pimcore_wysiwyg("content") }}
</div>
{% if not pimcore_link("content-btn").isEmpty() %}
<div class="actions">
{{ pimcore_link("content-btn", {
"class" : "uk-button uk-button-large " ~ buttonColor
}) }}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}