{% if editmode %}
<div class="uk-container apk-container-1400 uk-margin-medium">
<h2 class="uk-h2">Section Product Images</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 du titre</div>
{{ pimcore_select("text-align", {
"store" : [
['uk-text-center', 'Centré'],
['uk-text-left', 'Gauche'],
['uk-text-right', 'Droite']
],
"defaultValue" : "uk-text-center"
}) }}
<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">
<div><strong>Titre</strong></div>
<h2 class="uk-h2">
{{ pimcore_textarea("content-title", {'nl2br' : true}) }}
</h2>
<div><strong>Sous-titre</strong></div>
{{ pimcore_textarea("content-subtitle") }}
<div><strong>Repeater de produits</strong></div>
{% for row in pimcore_block('products').iterator %}
<div uk-alert>
<div><strong>Univers</strong>du produit</div>
{{ pimcore_select("product-universe", {
"store" : [
['apk-universe-magnecaps', 'Magnecaps'],
['apk-universe-muscles', 'Magnecaps Muscles'],
['apk-universe-relax', 'Magnecaps Relax'],
['apk-universe-memory-concentration', 'Magnecaps Mem. & Concen.']
],
"defaultValue" : "apk-universe-magnecaps"
}) }}
<div><strong>Titre du produit</strong></div>
{{ pimcore_textarea("product-subtitle") }}
<div><strong>image dans l'hexagone (de préférence carrée)</strong></div>
{{ pimcore_image('hexagone-image', {'width' : 300, 'height' : 300}) }}
<div><strong>image du produit</strong></div>
{{ pimcore_image('product-image', {'width' : 300, 'height' : 300}) }}
<strong></strong>Lien (optionnel)<span></span>
{{ pimcore_link("content-btn", {
"class" : "uk-button"
}) }}
<hr>
<dt>Google Analytics Event: Action</dt>
<dd>{{ pimcore_input("content-btn-secondary-ga-1-1") }}</dd>
<hr>
<dt>Google Analytics Event: Category</dt>
<dd>{{ pimcore_input("content-btn-secondary-ga-1-2") }}</dd>
<hr>
<dt>Google Analytics Event: Label</dt>
<dd>{{ pimcore_input("content-btn-secondary-ga-1-3") }}</dd>
</div>
{% endfor %}
</div>
</div>
</li>
</ul>
</div>
{% endif %}
{% set buttonColor = pimcore_select("button-color").data %}
{% if not editmode %}
<div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
<div class="uk-container apk-container-1400">
<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 %}
<span class="apk-subtitle">{{ pimcore_textarea("content-subtitle") }}</span>
</div>
<div class="apk-products-image-container" uk-height-match="target: .apk-products-image-box--title">
<div class="uk-grid-medium uk-child-width-expand@m" uk-grid uk-height-match="target: .apk-products-image-box--media">
{% for row in pimcore_block('products').iterator %}
<div class="uk-flex uk-flex-center">
<div class="apk-products-image-box">
<div class="apk-products-image-box--title">
<span class="uk-h3">{{ pimcore_textarea("product-subtitle", {'htmlspecialchars' : false, 'nl2br' : true }) }}</span>
</div>
<div class="apk-products-image-box--hexagone hexagone">
{% if pimcore_image('hexagone-image') %}
{{ pimcore_image('hexagone-image').thumbnail('hexagone-thumb').html|raw }}
{% endif %}
</div>
<div class="apk-products-image-box--media">
{% if pimcore_image('product-image') %}
{{ pimcore_image('product-image').thumbnail('hexagone-thumb').html|raw }}
{% endif %}
</div>
{% if not pimcore_link("content-btn").isEmpty() %}
<div class="apk-products-image-box--action">
{% if
not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty
and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty
%}
{{ pimcore_link("content-btn", {
"class" : "uk-button " ~ pimcore_select("product-universe").data,
"onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
'" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
'" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
}) }}
{% else %}
{{ pimcore_link("content-btn", {
"class" : "uk-button " ~ pimcore_select("product-universe").data
}) }}
{% endif %}
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}