templates/areas/apk-new-banner-text/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 BANNER TEXT</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', 'Gauche'],
  43.                         ['uk-text-right', 'Droite'],
  44.                         ['uk-text-center', 'Centré'],
  45.                     ],
  46.                     "defaultValue" : "uk-text-left"
  47.                 }) }}
  48.                 <div>Couleur du texte</div>
  49.                 {{ pimcore_select("overlay-color", {
  50.                     "store" : [
  51.                         ['uk-dark', 'Foncé'],
  52.                         ['uk-light', 'Clair']
  53.                     ],
  54.                     "defaultValue" : "uk-dark"
  55.                 }) }}
  56.             </div>
  57.             {# Colonne 2 #}
  58.             <div class="uk-width-1-2@m" uk-margin>
  59.     
  60.                 <div>Largeur du container du texte</div>
  61.                 {{ pimcore_select("text-width", {
  62.                     "store" : [
  63.                         ['apk-container-200', '200px'],
  64.                         ['apk-container-300', '300px'],
  65.                         ['apk-container-400', '400px'],
  66.                         ['apk-container-500', '500px'],
  67.                         ['apk-container-600', '600px'],
  68.                         ['apk-container-700', '700px'],
  69.                         ['apk-container-800', '800px'],
  70.                         ['apk-container-900', '900px'],
  71.                         ['apk-container-1000', '1000px'],
  72.                         ['apk-container-1100', '1100px'],
  73.                     ],
  74.                     "defaultValue" : "apk-container-600"
  75.                 }) }}
  76.                 <div>Position de l'image en cover</div>
  77.                 {{ pimcore_select("cover-position", {
  78.                     "store" : [
  79.                         ['apk-cover-top-left', 'Haut gauche'],
  80.                         ['apk-cover-top-center', 'Haut centré'],
  81.                         ['apk-cover-top-right', 'Haut droite'],
  82.                         ['apk-cover-center-left', 'Centré gauche'],
  83.                         ['apk-cover-center', 'Centré centré'],
  84.                         ['apk-cover-center-right', 'Centré droit'],
  85.                         ['apk-cover-bottom-left', 'Bas gauche'],
  86.                         ['apk-cover-bottom-center', 'Bas centré'],
  87.                         ['apk-cover-bottom-right', 'Bas droit'],
  88.                     ],
  89.                     "defaultValue" : "apk-cover-center"
  90.                 }) }}
  91.                 <div>Espacement en haut du block</div>
  92.                 {{ pimcore_select("margin-top", {
  93.                     "store" : [
  94.                         ['', 'Aucun'],
  95.                         ['uk-margin-small-top', 'Petit'],
  96.                         ['uk-margin-medium-top', 'Moyen'],
  97.                         ['uk-margin-large-top', 'Grand'],
  98.                         ['uk-margin-xlarge-top', 'Très grand'],
  99.                     ],
  100.                     "defaultValue" : ""
  101.                 }) }}
  102.     
  103.                 <div>Espacement en bas du block</div>
  104.                 {{ pimcore_select("margin-bottom", {
  105.                     "store" : [
  106.                         ['', 'Aucun'],
  107.                         ['uk-margin-small-top', 'Petit'],
  108.                         ['uk-margin-medium-top', 'Moyen'],
  109.                         ['uk-margin-large-top', 'Grand'],
  110.                         ['uk-margin-xlarge-top', 'Très grand'],
  111.                     ],
  112.                     "defaultValue" : ""
  113.                 }) }}
  114.                 
  115.             </div>
  116.         </li>
  117.     
  118.         <li class="uk-active">
  119.             <div class="uk-margin-large-bottom">
  120.                 <div class="uk-margin-small-bottom"><strong>Image de background</strong></div>
  121.                 {{ pimcore_image('bg-image') }}
  122.                 <div class="uk-margin-small-bottom"><strong>Image de background (version mobile)</strong></div>
  123.                 {{ pimcore_image('bg-image-mobile') }}
  124.                 <div class="uk-margin"><strong>Image du logo</strong></div>
  125.                 {{ pimcore_image('logo-image', {'width' : 300 }) }}
  126.                 <div class="uk-margin"><strong>Titre de la section</strong></div>
  127.                 <h2 class="uk-h2">
  128.                     {{ pimcore_textarea("content-title",{
  129.                         "nl2br" : true
  130.                     }) }}
  131.                 </h2>
  132.                 <div class="uk-margin"><strong>Contenu</strong></div>
  133.                 {{ pimcore_wysiwyg("content") }}
  134.                 <div class="uk-margin"><strong>Bouton (optionnel)</strong></div>
  135.                 <div class="actions">
  136.                     {{ pimcore_link("content-btn", {
  137.                         "class" : "uk-button"
  138.                     }) }}
  139.                     <hr>
  140.                     <dt>Google Analytics Event: Action</dt>
  141.                     <dd>{{ pimcore_input("content-btn-secondary-ga-1-1") }}</dd>
  142.                     <hr>
  143.                     <dt>Google Analytics Event: Category</dt>
  144.                     <dd>{{ pimcore_input("content-btn-secondary-ga-1-2") }}</dd>
  145.                     <hr>
  146.                     <dt>Google Analytics Event: Label</dt>
  147.                     <dd>{{ pimcore_input("content-btn-secondary-ga-1-3") }}</dd>
  148.                 </div>
  149.             </div>
  150.         </li>
  151.     </ul>
  152. </div>
  153. {% endif %}
  154. {% if not editmode %}
  155. <div class="apk-areabrick-container {{ pimcore_select("overlay-color").getData() }} {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
  156.     <div class="uk-cover-container uk-flex uk-flex-middle {{ pimcore_select("cover-position") }}">
  157.         {% if pimcore_image('bg-image').src %}
  158.             {#<img src="{{ base_64(app.request.getSchemeAndHttpHost ,pimcore_image('bg-image').thumbnail('full-background'))|raw }}" alt="" uk-cover>#}    
  159.             {{ pimcore_image('bg-image').thumbnail('full-background').html({'imgAttributes' : {'uk-cover' : null, 'class': 'uk-visible@m'}})|raw }}
  160.         {% endif %}
  161.         {% if pimcore_image('bg-image-mobile').src %}
  162.             {{ pimcore_image('bg-image-mobile').thumbnail('full-background').html({'imgAttributes' : {'uk-cover' : null, 'class': 'uk-hidden@m'}})|raw }}
  163.         {% endif %}
  164.         <div class="uk-container apk-container-1400">
  165.             <div class="uk-position-relative uk-height-1-1">
  166.                 <div class="uk-flex uk-flex-middle">
  167.                     <div class="{{ pimcore_select('text-width').data }}">
  168.                         {% if pimcore_image('logo-image').src %}
  169.                         <div class="apk-logo">
  170.                             {{ pimcore_image('logo-image').thumbnail('big-logo').html()|raw }}
  171.                         </div>    
  172.                         {% endif %}
  173.                         
  174.                         <div class="{{ pimcore_select("text-alignment") }}">
  175.                             
  176.                             {% if not pimcore_textarea("content-title").isEmpty %}
  177.                                 {% if pimcore_select("content-heading").data == "span" %}
  178.                                     <span class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  179.                                         {{ pimcore_textarea("content-title", {
  180.                                         "nl2br" : true})|raw }}
  181.                                     </span>
  182.                                 {% else %}
  183.                                     {% set content_heading = pimcore_select("content-heading").getData() %}
  184.                                     <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  185.                                         {{ pimcore_textarea("content-title", {
  186.                                         "nl2br" : true})|raw }}
  187.                                     </{{ content_heading }}>
  188.                                 {% endif %}
  189.                             {% endif %}
  190.                     
  191.                             <div class="apk-content">
  192.                                 {{ pimcore_wysiwyg("content") }}
  193.                             </div>
  194.                     
  195.                             {% if not pimcore_link("content-btn").isEmpty() %}
  196.                             <div class="actions">
  197.                                 {% if
  198.                                     not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
  199.                                     and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty 
  200.                                     and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty 
  201.                                 %}
  202.                                     {{ pimcore_link("content-btn", {
  203.                                         "class" : "uk-button",
  204.                                         "onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
  205.                                             '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
  206.                                             '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
  207.                                     }) }}
  208.                                 {% else %}
  209.                                 
  210.                                     {{ pimcore_link("content-btn", {
  211.                                         "class" : "uk-button"
  212.                                     }) }}
  213.                                 
  214.                                 {% endif %}
  215.                             </div>
  216.                             {% endif %}
  217.                         </div>
  218.                     </div>
  219.                 </div>
  220.             </div>
  221.         </div>
  222.     </div>
  223.     
  224.     
  225. </div>
  226. {% endif %}