templates/areas/apk-new-product-banner/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2. <div class="uk-container apk-container-1400">
  3.     <div uk-alert>
  4.         <h1 class="uk-h1">APK product banner</h1>
  5.     </div>
  6.     <ul uk-tab>
  7.         <li><a href="#">Configurations</a></li>
  8.         <li class="uk-active"><a href="#">Content Edit</a></li>
  9.     </ul>
  10.     <ul class="uk-switcher uk-margin">
  11.         <li class="apk-size-20 uk-grid-small" uk-grid>
  12.             {# Colonne 1 #}
  13.             <div class="uk-width-1-2@m" uk-margin>
  14.                 <div>Type de heading pour le titre ?</div>
  15.                 {{ pimcore_select("content-heading", {
  16.                     "store" : [
  17.                         ['span', 'span'],
  18.                         ['h1', 'Heading 1'],
  19.                         ['h2', 'Heading 2'],
  20.                         ['h3', 'Heading 3'],
  21.                         ['h4', 'Heading 4'],
  22.                         ['h5', 'Heading 5'],
  23.                         ['h6', 'Heading 6']
  24.                     ],
  25.                     "defaultValue" : "h2"
  26.                 }) }}
  27.                 <div><strong>Style</strong> du heading pour le titre ?</div>
  28.                 {{ pimcore_select("content-heading-style", {
  29.                     "store" : [
  30.                         ['h1', 'Heading 1'],
  31.                         ['h2', 'Heading 2'],
  32.                         ['h3', 'Heading 3'],
  33.                         ['h4', 'Heading 4'],
  34.                         ['h5', 'Heading 5'],
  35.                         ['h6', 'Heading 6']
  36.                     ],
  37.                     "defaultValue" : "h2"
  38.                 }) }}
  39.                 <div><strong>Alignement</strong> du texte</div>
  40.                 {{ pimcore_select("text-alignment", {
  41.                     "store" : [
  42.                         ['uk-text-left@s uk-text-center', 'Gauche'],
  43.                         ['uk-text-right@s uk-text-center', 'Droite'],
  44.                         ['uk-text-center@s uk-text-center', 'Centré'],
  45.                     ],
  46.                     "defaultValue" : "uk-text-right@s uk-text-center"
  47.                 }) }}
  48.                 <div><strong>Côté</strong> des informations</div>
  49.                 {{ pimcore_select("data-alignment", {
  50.                     "store" : [
  51.                         ['uk-margin-auto-right', 'Gauche'],
  52.                         ['uk-margin-auto-left', 'Droite'],
  53.                         ['uk-margin-auto-left uk-margin-auto-right', 'Centré'],
  54.                     ],
  55.                     "defaultValue" : "uk-margin-auto-left"
  56.                 }) }}
  57.                 <div>Couleur du texte</div>
  58.                 {{ pimcore_select("overlay-color", {
  59.                     "store" : [
  60.                         ['uk-dark', 'Foncé'],
  61.                         ['uk-light', 'Clair']
  62.                     ],
  63.                     "defaultValue" : "uk-light"
  64.                 }) }}
  65.             </div>
  66.             {# Colonne 2 #}
  67.             <div class="uk-width-1-2@m" uk-margin>
  68.     
  69.                 <div>Largeur du container du texte</div>
  70.                 {{ pimcore_select("text-width", {
  71.                     "store" : [
  72.                         ['apk-container-200', '200px'],
  73.                         ['apk-container-300', '300px'],
  74.                         ['apk-container-400', '400px'],
  75.                         ['apk-container-500', '500px'],
  76.                         ['apk-container-600', '600px'],
  77.                         ['apk-container-700', '700px'],
  78.                         ['apk-container-800', '800px'],
  79.                         ['apk-container-900', '900px'],
  80.                         ['apk-container-1000', '1000px'],
  81.                         ['apk-container-1100', '1100px'],
  82.                     ],
  83.                     "defaultValue" : "apk-container-600"
  84.                 }) }}
  85.                 <div>Espacement en haut du block</div>
  86.                 {{ pimcore_select("margin-top", {
  87.                     "store" : [
  88.                         ['', 'Aucun'],
  89.                         ['uk-margin-small-top', 'Petit'],
  90.                         ['uk-margin-medium-top', 'Moyen'],
  91.                         ['uk-margin-large-top', 'Grand'],
  92.                         ['uk-margin-xlarge-top', 'Très grand'],
  93.                     ],
  94.                     "defaultValue" : ""
  95.                 }) }}
  96.     
  97.                 <div>Espacement en bas du block</div>
  98.                 {{ pimcore_select("margin-bottom", {
  99.                     "store" : [
  100.                         ['', 'Aucun'],
  101.                         ['uk-margin-small-top', 'Petit'],
  102.                         ['uk-margin-medium-top', 'Moyen'],
  103.                         ['uk-margin-large-top', 'Grand'],
  104.                         ['uk-margin-xlarge-top', 'Très grand'],
  105.                     ],
  106.                     "defaultValue" : ""
  107.                 }) }}
  108.                 <div>Afficher un scroll ?</div>
  109.                 {{ pimcore_select("scroll", {
  110.                     "store" : [
  111.                         ['', 'Aucun'],
  112.                         ['apk-scroll', 'SCROLL'],
  113.                         ['apk-top', 'TOP']
  114.                     ],
  115.                     "defaultValue" : "apk-scroll"
  116.                 }) }}
  117.                 
  118.             </div>
  119.         </li>
  120.     
  121.         <li class="uk-active">
  122.             <div class="uk-margin-large-bottom">
  123.                 <div class="uk-margin-small-bottom"><strong>Image de background</strong></div>
  124.                 {{ pimcore_image('bg-image') }}
  125.                 <div class="uk-margin-small-bottom"><strong>Image de background (version mobile)</strong></div>
  126.                 {{ pimcore_image('bg-image-mobile') }}
  127.                 <div class="uk-margin"><strong>Catégorie</strong> de la page (à droite)</div>
  128.                 {{ pimcore_textarea('category-title') }}
  129.                 <div class="uk-margin"><strong>Titre de la section</strong></div>
  130.                 <h2 class="uk-h2">
  131.                     {{ pimcore_textarea("content-title",{
  132.                         "nl2br" : true
  133.                     }) }}
  134.                 </h2>
  135.                 <div class="uk-margin"><strong>Objet produit</strong></div>
  136.                 {{ pimcore_relation("myRelation") }}
  137.                 <div class="uk-margin"><strong>Bouton (optionnel)</strong></div>
  138.                 <div class="actions">
  139.                     {{ pimcore_link("content-btn", {
  140.                         "class" : "uk-button"
  141.                     }) }}
  142.                     <hr>
  143.                     <dt>Google Analytics Event: Action</dt>
  144.                     <dd>{{ pimcore_input("content-btn-secondary-ga-1-1") }}</dd>
  145.                     <hr>
  146.                     <dt>Google Analytics Event: Category</dt>
  147.                     <dd>{{ pimcore_input("content-btn-secondary-ga-1-2") }}</dd>
  148.                     <hr>
  149.                     <dt>Google Analytics Event: Label</dt>
  150.                     <dd>{{ pimcore_input("content-btn-secondary-ga-1-3") }}</dd>
  151.                 </div>
  152.             </div>
  153.         </li>
  154.     </ul>
  155. </div>
  156. {% endif %}
  157. {% if not editmode %}
  158. <div id="modal-pharmacies-banner" uk-modal>
  159.     <div class="uk-modal-dialog uk-modal-body uk-text-center uk-position-relative">
  160.         <h2>{{"Où acheter ?"|trans}}</h2>
  161.         <div uk-grid>
  162.             <div class="uk-width-2-5">
  163.                 <div class="apk-container-image apk-image-pharmacie">
  164.                 </div>
  165.                 <div>
  166.                     <h3>{{"En pharmacie :"|trans}}</h2>
  167.                     <p>
  168.                         {{"Vous préférez vous rendre chez votre pharmacien afin de bénéficier de ses conseils avisés ?"|trans}}
  169.                         </br>
  170.                         {{"Trouvez votre pharmacie la plus proche sur"|trans}}
  171.                     </p>
  172.                 </div>
  173.                 {% if document.property('pharmacieLogo') %}
  174.                 <div class="apk-container-image-phramacie">
  175.                     <a href="{{ 'pharmacie-be-lien'|trans }}" target="_blank">
  176.                         <img src="{{ document.property('pharmacieLogo').thumbnail('') }}" alt="{{ "Pharmacie"|trans }}">   
  177.                     </a>
  178.                 </div>
  179.                 {% endif %}
  180.             </div>
  181.             <div class="uk-width-auto apk-width-auto">
  182.                 <div class="apk-border-vertical">
  183.             
  184.                 </div>
  185.             </div>
  186.             <div class="uk-width-2-5">
  187.                 <div class="apk-container-image apk-margin-container-image apk-image-en-ligne">
  188.                 </div>
  189.                 <div>
  190.                     <h3>{{"En ligne :"|trans}}</h2>
  191.                     <p>
  192.                         {{"Vous voulez être livré directement chez vous via des platformes e-shop ouvertes 24h/24"|trans}}
  193.                         </br>
  194.                         {{"Magnecaps est également disponible en ligne !"|trans}}
  195.                     </p>
  196.                 </div>
  197.                 <div class="apk-container-phramacies">
  198.                     <div class="uk-child-width-1-2 uk-child-width-1-3@s" uk-grid>
  199.                         {% if not pimcore_relation("myRelation").isEmpty  %}
  200.                             {% if pimcore_relation("myRelation").element.className == 'Produits' %}
  201.                                 {% for lienPharmacie in pimcore_relation("myRelation").element.lienPharmacies %}
  202.                                     <div>
  203.                                         <a href="{{ lienPharmacie.lien }}" target="_blank">
  204.                                             {{ lienPharmacie.image.thumbnail('').html()|raw }}
  205.                                         </a>
  206.                                     </div>
  207.                                 {% endfor %}
  208.                             {% endif %}
  209.                         {% endif %}
  210.                     </div>
  211.                 </div>
  212.             </div>
  213.         </div>
  214.     </div>
  215. </div>
  216. <div class="apk-areabrick-container {{ pimcore_select("overlay-color").getData() }} {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
  217.     <div class="uk-cover-container uk-flex uk-flex-middle">
  218.         {% if pimcore_image('bg-image').src %}
  219.         {#<img src="{{ base_64(app.request.getSchemeAndHttpHost ,pimcore_image('bg-image').thumbnail('full-background'))|raw }}" alt="" uk-cover>#}
  220.             {{ pimcore_image('bg-image').thumbnail('full-background').html({'imgAttributes' : {'uk-cover' : null}})|raw }}    
  221.         {% endif %}
  222.         {% if pimcore_image('bg-image-mobile').src %}
  223.             {{ pimcore_image('bg-image-mobile').thumbnail('full-background').html({'imgAttributes' : {'uk-cover' : null, 'class': 'uk-hidden@m'}})|raw }}
  224.         {% endif %}
  225.         <div class="uk-container apk-container-1400">
  226.             <div class="uk-position-relative uk-height-1-1">
  227.                 <div class="{{ pimcore_select('text-width').data }} {{ pimcore_select("data-alignment") }}">
  228.                     
  229.                     <div class="{{ pimcore_select("text-alignment") }}">
  230.                         
  231.                         {% if not pimcore_textarea("content-title").isEmpty %}
  232.                             {% if pimcore_select("content-heading").data == "span" %}
  233.                                 <span class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  234.                                     {{ pimcore_textarea("content-title", {
  235.                                     "nl2br" : true})|raw }}
  236.                                 </span>
  237.                             {% else %}
  238.                                 {% set content_heading = pimcore_select("content-heading").getData() %}
  239.                                 <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  240.                                     {{ pimcore_textarea("content-title", {
  241.                                     "nl2br" : true})|raw }}
  242.                                 </{{ content_heading }}>
  243.                             {% endif %}
  244.                         {% endif %}
  245.                 
  246.                         <div class="apk-media">
  247.                             {% if not pimcore_relation("myRelation").isEmpty  %}
  248.                             {% if pimcore_relation("myRelation").element.className == 'Produits' %}
  249.                                 {{ pimcore_relation("myRelation").element.image.thumbnail('big-product-thumb').html()|raw }} 
  250.                             {% endif %}
  251.                             {% endif %}
  252.                         </div>
  253.                         <button class="uk-button apk-btn-univers-banner" type="button" uk-toggle="target: #modal-pharmacies-banner">{{"Acheter"|trans}}</button>
  254.                 
  255.                         {% if not pimcore_link("content-btn").isEmpty() %}
  256.                         <div class="actions">
  257.                             {% if
  258.                                 not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
  259.                                 and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty 
  260.                                 and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty 
  261.                             %}
  262.                                 {{ pimcore_link("content-btn", {
  263.                                     "class" : "uk-button",
  264.                                     "onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
  265.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
  266.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
  267.                                 }) }}
  268.                             {% else %}
  269.                             
  270.                                 {{ pimcore_link("content-btn", {
  271.                                     "class" : "uk-button"
  272.                                 }) }}
  273.                             
  274.                             {% endif %}
  275.                         </div>
  276.                         {% endif %}
  277.                     </div>
  278.                 </div>
  279.                 <div class="apk-category">
  280.                     {{ pimcore_textarea('category-title', {'nl2br' : true}) }}
  281.                 </div>
  282.             </div>
  283.         </div>
  284.     </div>
  285.     {# Scroll géré dans le main.js #}
  286.     {% if pimcore_select("scroll").data == "apk-scroll" or pimcore_select("scroll").data == "apk-top" %}
  287.     <div class="apk-scroll-container">
  288.         <div class="uk-container apk-container-1400">
  289.             <div class="uk-position-relative">
  290.             {% if pimcore_select("scroll").data == "apk-scroll" %}
  291.                 <div class="apk-scroll">
  292.                     {{ "SCROLL"|trans }}
  293.                 </div>
  294.             {% elseif pimcore_select("scroll").data == "apk-top" %}
  295.                 <div class="apk-scroll apk-top">
  296.                     {{ "TOP"|trans }}
  297.                 </div>
  298.             {% endif %}
  299.             </div>
  300.         </div>
  301.     </div>
  302.     {% endif %}
  303. </div>
  304. {% endif %}