{% if editmode %}
<div class="uk-container apk-container-1400">
<div uk-alert>
<h1 class="uk-h1">APK product banner</h1>
</div>
<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 class="apk-size-20 uk-grid-small" uk-grid>
{# Colonne 1 #}
<div class="uk-width-1-2@m" uk-margin>
<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> du texte</div>
{{ pimcore_select("text-alignment", {
"store" : [
['uk-text-left@s uk-text-center', 'Gauche'],
['uk-text-right@s uk-text-center', 'Droite'],
['uk-text-center@s uk-text-center', 'Centré'],
],
"defaultValue" : "uk-text-right@s uk-text-center"
}) }}
<div><strong>Côté</strong> des informations</div>
{{ pimcore_select("data-alignment", {
"store" : [
['uk-margin-auto-right', 'Gauche'],
['uk-margin-auto-left', 'Droite'],
['uk-margin-auto-left uk-margin-auto-right', 'Centré'],
],
"defaultValue" : "uk-margin-auto-left"
}) }}
<div>Couleur du texte</div>
{{ pimcore_select("overlay-color", {
"store" : [
['uk-dark', 'Foncé'],
['uk-light', 'Clair']
],
"defaultValue" : "uk-light"
}) }}
</div>
{# Colonne 2 #}
<div class="uk-width-1-2@m" uk-margin>
<div>Largeur du container du texte</div>
{{ pimcore_select("text-width", {
"store" : [
['apk-container-200', '200px'],
['apk-container-300', '300px'],
['apk-container-400', '400px'],
['apk-container-500', '500px'],
['apk-container-600', '600px'],
['apk-container-700', '700px'],
['apk-container-800', '800px'],
['apk-container-900', '900px'],
['apk-container-1000', '1000px'],
['apk-container-1100', '1100px'],
],
"defaultValue" : "apk-container-600"
}) }}
<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-top', 'Petit'],
['uk-margin-medium-top', 'Moyen'],
['uk-margin-large-top', 'Grand'],
['uk-margin-xlarge-top', 'Très grand'],
],
"defaultValue" : ""
}) }}
<div>Afficher un scroll ?</div>
{{ pimcore_select("scroll", {
"store" : [
['', 'Aucun'],
['apk-scroll', 'SCROLL'],
['apk-top', 'TOP']
],
"defaultValue" : "apk-scroll"
}) }}
</div>
</li>
<li class="uk-active">
<div class="uk-margin-large-bottom">
<div class="uk-margin-small-bottom"><strong>Image de background</strong></div>
{{ pimcore_image('bg-image') }}
<div class="uk-margin-small-bottom"><strong>Image de background (version mobile)</strong></div>
{{ pimcore_image('bg-image-mobile') }}
<div class="uk-margin"><strong>Catégorie</strong> de la page (à droite)</div>
{{ pimcore_textarea('category-title') }}
<div class="uk-margin"><strong>Titre de la section</strong></div>
<h2 class="uk-h2">
{{ pimcore_textarea("content-title",{
"nl2br" : true
}) }}
</h2>
<div class="uk-margin"><strong>Objet produit</strong></div>
{{ pimcore_relation("myRelation") }}
<div class="uk-margin"><strong>Bouton (optionnel)</strong></div>
<div class="actions">
{{ 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>
</div>
</li>
</ul>
</div>
{% endif %}
{% if not editmode %}
<div id="modal-pharmacies-banner" uk-modal>
<div class="uk-modal-dialog uk-modal-body uk-text-center uk-position-relative">
<h2>{{"Où acheter ?"|trans}}</h2>
<div uk-grid>
<div class="uk-width-2-5">
<div class="apk-container-image apk-image-pharmacie">
</div>
<div>
<h3>{{"En pharmacie :"|trans}}</h2>
<p>
{{"Vous préférez vous rendre chez votre pharmacien afin de bénéficier de ses conseils avisés ?"|trans}}
</br>
{{"Trouvez votre pharmacie la plus proche sur"|trans}}
</p>
</div>
{% if document.property('pharmacieLogo') %}
<div class="apk-container-image-phramacie">
<a href="{{ 'pharmacie-be-lien'|trans }}" target="_blank">
<img src="{{ document.property('pharmacieLogo').thumbnail('') }}" alt="{{ "Pharmacie"|trans }}">
</a>
</div>
{% endif %}
</div>
<div class="uk-width-auto apk-width-auto">
<div class="apk-border-vertical">
</div>
</div>
<div class="uk-width-2-5">
<div class="apk-container-image apk-margin-container-image apk-image-en-ligne">
</div>
<div>
<h3>{{"En ligne :"|trans}}</h2>
<p>
{{"Vous voulez être livré directement chez vous via des platformes e-shop ouvertes 24h/24"|trans}}
</br>
{{"Magnecaps est également disponible en ligne !"|trans}}
</p>
</div>
<div class="apk-container-phramacies">
<div class="uk-child-width-1-2 uk-child-width-1-3@s" uk-grid>
{% if not pimcore_relation("myRelation").isEmpty %}
{% if pimcore_relation("myRelation").element.className == 'Produits' %}
{% for lienPharmacie in pimcore_relation("myRelation").element.lienPharmacies %}
<div>
<a href="{{ lienPharmacie.lien }}" target="_blank">
{{ lienPharmacie.image.thumbnail('').html()|raw }}
</a>
</div>
{% endfor %}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="apk-areabrick-container {{ pimcore_select("overlay-color").getData() }} {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
<div class="uk-cover-container uk-flex uk-flex-middle">
{% if pimcore_image('bg-image').src %}
{#<img src="{{ base_64(app.request.getSchemeAndHttpHost ,pimcore_image('bg-image').thumbnail('full-background'))|raw }}" alt="" uk-cover>#}
{{ pimcore_image('bg-image').thumbnail('full-background').html({'imgAttributes' : {'uk-cover' : null}})|raw }}
{% endif %}
{% if pimcore_image('bg-image-mobile').src %}
{{ pimcore_image('bg-image-mobile').thumbnail('full-background').html({'imgAttributes' : {'uk-cover' : null, 'class': 'uk-hidden@m'}})|raw }}
{% endif %}
<div class="uk-container apk-container-1400">
<div class="uk-position-relative uk-height-1-1">
<div class="{{ pimcore_select('text-width').data }} {{ pimcore_select("data-alignment") }}">
<div class="{{ pimcore_select("text-alignment") }}">
{% if not pimcore_textarea("content-title").isEmpty %}
{% if pimcore_select("content-heading").data == "span" %}
<span class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ 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-media">
{% if not pimcore_relation("myRelation").isEmpty %}
{% if pimcore_relation("myRelation").element.className == 'Produits' %}
{{ pimcore_relation("myRelation").element.image.thumbnail('big-product-thumb').html()|raw }}
{% endif %}
{% endif %}
</div>
<button class="uk-button apk-btn-univers-banner" type="button" uk-toggle="target: #modal-pharmacies-banner">{{"Acheter"|trans}}</button>
{% if not pimcore_link("content-btn").isEmpty() %}
<div class="actions">
{% 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",
"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"
}) }}
{% endif %}
</div>
{% endif %}
</div>
</div>
<div class="apk-category">
{{ pimcore_textarea('category-title', {'nl2br' : true}) }}
</div>
</div>
</div>
</div>
{# Scroll géré dans le main.js #}
{% if pimcore_select("scroll").data == "apk-scroll" or pimcore_select("scroll").data == "apk-top" %}
<div class="apk-scroll-container">
<div class="uk-container apk-container-1400">
<div class="uk-position-relative">
{% if pimcore_select("scroll").data == "apk-scroll" %}
<div class="apk-scroll">
{{ "SCROLL"|trans }}
</div>
{% elseif pimcore_select("scroll").data == "apk-top" %}
<div class="apk-scroll apk-top">
{{ "TOP"|trans }}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
{% endif %}