templates/areas/apk-wysiwyg-global/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2. <div class="uk-container apk-container-1400 uk-margin-medium">
  3.     <h2 class="uk-h2"><strong>Section wysiwyg</strong></h2>
  4.     <ul uk-tab>
  5.         <li><a href="#">Configurations</a></li>
  6.         <li class="uk-active"><a href="#">Content Edit</a></li>
  7.     </ul>
  8.     <ul class="uk-switcher uk-margin">
  9.         <li>
  10.             <div class="uk-grid-small uk-child-width-1-3@m" uk-grid>
  11.                 <div>
  12.                     <h3><strong>Grille et alignement</strong></h3>
  13.                     
  14.                     <div>
  15.                         <strong>Répartition</strong> de la grille Image/texte
  16.                         <br>
  17.                         {{ pimcore_select("content-grid-rules", {
  18.                             "store" : [
  19.                                 ['grid-type-0', '1/1 | 1/1'],
  20.                                 ['grid-type-1', '1/2 | 1/2'],
  21.                                 ['grid-type-2', '2/5 | 3/5'],
  22.                                 ['grid-type-3', '1/3 | 2/3'],
  23.                                 ['grid-type-4', '2/3 | 1/3'],
  24.                                 ['grid-type-5', 'auto | expand'],
  25.                                 ['grid-type-6', 'expand | auto'],
  26.                                 ['grid-type-7', '3/5 | 2/5'],
  27.                             ],
  28.                             "defaultValue" : "grid-type-1"
  29.                         }) }}
  30.                     </div>
  31.                     <div>
  32.                         <strong>Position</strong> de l'image et du texte
  33.                         <br>
  34.                         {{ pimcore_select("image-text-position", {
  35.                             "store" : [
  36.                                 ['img-left', 'Image à gauche / texte à droite'],
  37.                                 ['img-right', 'Image à droite / texte à gauche']
  38.                             ],
  39.                             "defaultValue" : "img-left"
  40.                         }) }}
  41.                     </div>
  42.                 </div>
  43.                 <div>
  44.                     <h3><strong>Mise en page du texte</strong></h3>
  45.                     <div>
  46.                         <strong>Type</strong> de heading pour le titre ?
  47.                         <br>
  48.                         {{ pimcore_select("content-heading", {
  49.                             "store" : [
  50.                                 ['span', 'span'],
  51.                                 ['h1', 'Heading 1'],
  52.                                 ['h2', 'Heading 2'],
  53.                                 ['h3', 'Heading 3'],
  54.                                 ['h4', 'Heading 4'],
  55.                                 ['h5', 'Heading 5'],
  56.                                 ['h6', 'Heading 6']
  57.                             ],
  58.                             "defaultValue" : "h2"
  59.                         }) }}
  60.                     </div>
  61.                     <div>
  62.                         <strong>Style</strong> du heading pour le titre ?
  63.                         <br>
  64.                         {{ pimcore_select("content-heading-style", {
  65.                             "store" : [
  66.                                 ['h1', 'Heading 1'],
  67.                                 ['h2', 'Heading 2'],
  68.                                 ['h3', 'Heading 3'],
  69.                                 ['h4', 'Heading 4'],
  70.                                 ['h5', 'Heading 5'],
  71.                                 ['h6', 'Heading 6']
  72.                             ],
  73.                             "defaultValue" : "h2"
  74.                         }) }}
  75.                     </div>
  76.                     <div>
  77.                         <strong>Couleur</strong> du background global
  78.                         <br>
  79.                         {{ pimcore_select("bg-color-global", {
  80.                             "store" : [
  81.                                 ['white','blanc'],
  82.                                 ['gray','gris']
  83.                             ],
  84.                             "defaultValue" : "blanc"
  85.                         }) }}
  86.                     </div>
  87.                     <div>
  88.                         <strong>Image de pierres</strong> en background
  89.                         <br>
  90.                         {{ pimcore_select("stone-bg", {
  91.                             "store" : [
  92.                                 ['apk-stone-bg','oui'],
  93.                                 ['','non']
  94.                             ],
  95.                             "defaultValue" : "non"
  96.                         }) }}
  97.                     </div>
  98.                     <div>
  99.                         <strong>Alignement</strong> du titre
  100.                         <br>
  101.                         {{ pimcore_select("title-align", {
  102.                             "store" : [
  103.                                 ['uk-text-left', 'Gauche'],
  104.                                 ['uk-text-center', 'Centré'],
  105.                                 ['uk-text-right', 'Droite']
  106.                             ],
  107.                             "defaultValue" : "uk-text-left"
  108.                         }) }}
  109.                     </div>
  110.                     <div>
  111.                         <strong>Alignement</strong> du texte
  112.                         <br>
  113.                         {{ pimcore_select("text-align", {
  114.                             "store" : [
  115.                                 ['uk-text-center', 'Centré'],
  116.                                 ['uk-text-left', 'Gauche'],
  117.                                 ['uk-text-right', 'Droite']
  118.                             ],
  119.                             "defaultValue" : "uk-text-left"
  120.                         }) }}
  121.                     </div>
  122.                     <div>
  123.                         <strong>Titre séparé</strong> du texte ?
  124.                         <br>
  125.                         {{ pimcore_select("text-separation", {
  126.                             "store" : [
  127.                                 ['separated', 'Oui'],
  128.                                 ['grouped', 'Non']
  129.                             ],
  130.                             "defaultValue" : "separated"
  131.                         }) }}
  132.                     </div>
  133.                     <div>
  134.                         <strong>Alignement</strong> du bouton
  135.                         <br>
  136.                         {{ pimcore_select("button-align", {
  137.                             "store" : [
  138.                                 ['uk-text-center', 'Centré'],
  139.                                 ['uk-text-left', 'Gauche'],
  140.                                 ['uk-text-right', 'Droite']
  141.                             ],
  142.                             "defaultValue" : "uk-text-center"
  143.                         }) }}
  144.                     </div>
  145.                 </div>
  146.             
  147.                 <div>
  148.                     <h3><strong>Gestion des espaces</strong></h3>
  149.                     <div>
  150.                         Espacement en <strong>haut</strong> du block
  151.                         <br>
  152.                         {{ pimcore_select("margin-top", {
  153.                             "store" : [
  154.                                 ['uk-padding-remove-top', 'Suppression du padding'],
  155.                                 ['', 'Aucun'],
  156.                                 ['uk-margin-small-top', 'Petit'],
  157.                                 ['uk-margin-medium-top', 'Moyen'],
  158.                                 ['uk-margin-large-top', 'Grand'],
  159.                                 ['uk-margin-xlarge-top', 'Très grand'],
  160.                             ],
  161.                             "defaultValue" : ""
  162.                         }) }}
  163.                     </div>
  164.                     <div>
  165.                         Espacement en <strong>bas</strong> du block
  166.                         <br>
  167.                         {{ pimcore_select("margin-bottom", {
  168.                             "store" : [
  169.                                 ['uk-padding-remove-bottom', 'Suppression du padding'],
  170.                                 ['', 'Aucun'],
  171.                                 ['uk-margin-small-bottom', 'Petit'],
  172.                                 ['uk-margin-medium-bottom', 'Moyen'],
  173.                                 ['uk-margin-large-bottom', 'Grand'],
  174.                                 ['uk-margin-xlarge-bottom', 'Très grand'],
  175.                             ],
  176.                             "defaultValue" : ""
  177.                         }) }}
  178.                     </div>
  179.                     <div>
  180.                         <strong>Padding</strong>
  181.                         <br>
  182.                         {{ pimcore_select("padding", {
  183.                             "store" : [
  184.                                 ['apk-padding-remove', 'Aucun'],
  185.                                 ['', 'Normal'],
  186.                                 ['apk-padding-large', 'Large']
  187.                             ],
  188.                             "defaultValue" : ""
  189.                         }) }}
  190.                     </div>
  191.                 </div>
  192.             </div>
  193.         </li>
  194.         {% endif %}
  195.             {% set imgTextPosition = pimcore_select("image-text-position").data %}
  196.             {% if imgTextPosition == 'img-left' %}
  197.                 {% set ImgTextPositionCode = 'uk-flex-first@m' %}
  198.             {% else %}
  199.                 {% set ImgTextPositionCode = '' %}
  200.             {% endif %}
  201.     
  202.             {% set content_grid_value = pimcore_select("content-grid-rules").getData() %}
  203.             {% if content_grid_value == 'grid-type-0' %}
  204.                 {% set grid_left_class = 'uk-width-1-1' %}
  205.                 {% set grid_right_class = 'uk-width-1-1' %}
  206.             {% elseif content_grid_value == 'grid-type-1' %}
  207.                 {% set grid_left_class = 'uk-width-1-2@m' %}
  208.                 {% set grid_right_class = 'uk-width-1-2@m' %}
  209.             {% elseif content_grid_value == 'grid-type-2' %}
  210.                 {% set grid_left_class = 'uk-width-1-2@s uk-width-2-5@m' %}
  211.                 {% set grid_right_class = 'uk-width-1-2@s uk-width-3-5@m' %}
  212.             {% elseif content_grid_value == 'grid-type-3' %}
  213.                 {% set grid_left_class = 'uk-width-1-2@s uk-width-1-3@m' %}
  214.                 {% set grid_right_class = 'uk-width-1-2@s uk-width-2-3@m' %}
  215.             {% elseif content_grid_value == 'grid-type-4' %}
  216.                 {% set grid_left_class = 'uk-width-1-2@s uk-width-2-3@m' %}
  217.                 {% set grid_right_class = 'uk-width-1-2@s uk-width-1-3@m' %}
  218.             {% elseif content_grid_value == 'grid-type-5' %}
  219.                 {% set grid_left_class = 'uk-width-1-2@s uk-width-auto@m' %}
  220.                 {% set grid_right_class = 'uk-width-1-2@s uk-width-expand@m' %}
  221.             {% elseif content_grid_value == 'grid-type-6' %}
  222.                 {% set grid_left_class = 'uk-width-1-2@s uk-width-expand@m' %}
  223.                 {% set grid_right_class = 'uk-width-1-2@s uk-width-auto@m' %}
  224.             {% elseif content_grid_value == 'grid-type-7' %}
  225.                 {% set grid_left_class = 'uk-width-1-2@s uk-width-3-5@m' %}
  226.                 {% set grid_right_class = 'uk-width-1-2@s uk-width-2-5@m' %}
  227.             {% endif %}
  228.         {% if editmode %}
  229.     
  230.         <li class="uk-active">
  231.             <div>
  232.                 {% if pimcore_select("text-separation").data == "separated" %}
  233.                     <div class="{{ pimcore_select("title-align").data }}">
  234.                         <span class="uk-h2">Titre</span>
  235.                         <h2 class="uk-h2">
  236.                             {{ pimcore_textarea("content-title",{
  237.                                 "nl2br" : true
  238.                             }) }}
  239.                         </h2>
  240.                     </div>
  241.                 {% endif %}
  242.                 <div class="uk-grid-large uk-margin-large-bottom" uk-grid>
  243.                     <div class="{{ grid_left_class }} apk-media">
  244.                         <span class="uk-h2">Image (optionnel)</span>
  245.                         {{ pimcore_image("content-figure") }}
  246.                         <hr>
  247.                         <span class="uk-h2">Vidéo (optionnel)</span>
  248.                         {{ pimcore_video('content-video', {
  249.                             width: 700,
  250.                             height: 400
  251.                         }) }}
  252.                         <span class="uk-h4">Image à afficher pour la vidéo</span>
  253.                         {{ pimcore_image("content-background-image") }}
  254.                         <div class="actions uk-margin-top">
  255.                             <span class="uk-h2">Lien (optionnel)</span>
  256.                             {{ pimcore_link("content-btn") }}
  257.                         </div>
  258.                     </div>
  259.                     <div class="{{ grid_right_class }} apk-content">
  260.                         {% if pimcore_select("text-separation").data != "separated" %}
  261.                         <div class="{{ pimcore_select("title-align").data }}">
  262.                             <h2 class="uk-h2">
  263.                                 <span class="uk-h2">Titre</span>
  264.                                 {{ pimcore_textarea("content-title",{
  265.                                     "nl2br" : true
  266.                                 }) }}
  267.                             </h2>
  268.                         </div>
  269.                         {% endif %}
  270.                         <span class="uk-h2">Texte</span>
  271.                         <div class="{{ pimcore_select("text-align").data }}">
  272.                             {{ pimcore_wysiwyg("content") }}
  273.                         </div>
  274.                         <span class="uk-h2">Iframe</span>
  275.                         {{ pimcore_textarea('map') }}
  276.                     </div>
  277.                 </div>
  278.                 <span class="uk-h2">Texte sous contenu</span>
  279.                     <div class="{{ pimcore_select("text-align").data }}">
  280.                         {{ pimcore_wysiwyg("content-bottom") }}
  281.                     </div>
  282.             </div>
  283.         </li>
  284.     </ul>
  285. </div>
  286. {% endif %}
  287. {% if not editmode %}
  288.     {% if ( not pimcore_image("content-figure").isEmpty() ) or ( not pimcore_video("content-video").isEmpty() ) %}
  289.     <div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}  {{ pimcore_select("bg-color-global") }}">
  290.         <div class="{{ pimcore_select("stone-bg") }}">
  291.             <div class="uk-container apk-container-1400 {{ pimcore_select("padding")}}">
  292.                 {% if pimcore_select("text-separation").data == "separated" %}
  293.                     <div class="{{ pimcore_select("title-align") }} uk-margin-medium-bottom">
  294.                         {% if not pimcore_textarea("content-title").isEmpty %}
  295.                             {% if pimcore_select("content-heading").getData() == 'span' %}
  296.                                 <span class="uk-h2">
  297.                                     {{ pimcore_textarea("content-title", {
  298.                                     "nl2br" : true})|raw }}
  299.                                 </span>
  300.                             {% else %}
  301.                                 {% set content_heading = pimcore_select("content-heading").getData() %}
  302.                                 <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  303.                                     {{ pimcore_textarea("content-title", {
  304.                                     "nl2br" : true})|raw }}
  305.                                 </{{ content_heading }}>
  306.                             {% endif %}
  307.                         {% endif %}
  308.                     </div>
  309.                 {% endif %}
  310.                 <div class="uk-grid-medium" uk-grid>
  311.                     <div class="{{ grid_right_class }}">
  312.                         <div>
  313.                             {% if pimcore_select("text-separation").data != "separated" %}
  314.                             <div class="{{ pimcore_select("title-align") }} uk-margin-medium-bottom">
  315.                                 {% if not pimcore_textarea("content-title").isEmpty %}
  316.                                     {% if pimcore_select("content-heading").getData() == 'span' %}
  317.                                         <span class="uk-h2">
  318.                                             {{ pimcore_textarea("content-title", {
  319.                                             "nl2br" : true})|raw }}
  320.                                         </span>
  321.                                     {% else %}
  322.                                         {% set content_heading = pimcore_select("content-heading").getData() %}
  323.                                         <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  324.                                             {{ pimcore_textarea("content-title", {
  325.                                             "nl2br" : true})|raw }}
  326.                                         </{{ content_heading }}>
  327.                                     {% endif %}
  328.                                 {% endif %}
  329.                             </div>
  330.                             {% endif %}
  331.                             <div class="{{ pimcore_select("text-align") }} apk-wysiwyg-content-link">
  332.                                 {{ pimcore_wysiwyg("content") }}
  333.                                 {{ pimcore_textarea('map', { 'htmlspecialchars' : false }) }}
  334.                             </div>
  335.                             <div class="{{ pimcore_select("button-align").data }}">
  336.                                 {{ pimcore_link("content-btn", {"class" : "uk-button uk-button-primary"}) }}
  337.                             </div>
  338.                         </div>
  339.                     </div>
  340.                     <div class="{{ grid_left_class }} {{ ImgTextPositionCode }} apk-media uk-text-center">
  341.                         <div>
  342.                             {% if not pimcore_video("content-video").isEmpty() %} 
  343.                                 <div data-caption="{{ pimcore_image('content-background-image').getAlt() }}" class="uk-height-1-1" uk-toggle="target: #modal-media-youtube;">
  344.                                     <figure class="uk-dark uk-position-relative uk-height-1-1" style="background: url('{{ pimcore_image("content-background-image").thumbnail('global-image') }}') 50% 50% / cover">
  345.                                         
  346.                                         <img src="{{ pimcore_image("content-background-image").getThumbnail('global-image') }}" class="" alt=""/>
  347.                                         
  348.                                         <div class="uk-overlay-primary uk-position-cover">
  349.                                             <div class="uk-position-center">
  350.                                                 <svg width="80" height="80" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="play-circle"><polygon fill="none" stroke="currentColor" stroke-width="1.1" points="8.5 7 13.5 10 8.5 13"></polygon><circle fill="none" stroke="currentColor" stroke-width="1.1" cx="10" cy="10" r="9"></circle></svg>
  351.                                             </div>
  352.                                         </div>
  353.                                     </figure>
  354.                                 </div>
  355.                                 <div id="modal-media-youtube" class="uk-flex-top" uk-modal>
  356.                                     <div class="uk-modal-dialog uk-margin-auto-vertical">
  357.                                     
  358.                                         <button class="uk-modal-close-outside" type="button" uk-close></button>
  359.                                         
  360.                                         {{ pimcore_video("content-video", { 
  361.                                             width : 1920,
  362.                                             height: 1080
  363.                                         }) }}
  364.                                                 
  365.                                     </div>
  366.                                 </div>
  367.                             {% else %}
  368.                                 {{ pimcore_image("content-figure").thumbnail("global-image").html()|raw }}
  369.                             {% endif %}
  370.                         </div>
  371.                     </div>
  372.                 </div>
  373.                 {% if pimcore_wysiwyg("content-bottom").isEmpty() %}
  374.                 {% else %}
  375.                 <div class="{{ pimcore_select("text-align").data }} uk-margin-medium-top">
  376.                     {{ pimcore_wysiwyg("content-bottom") }}
  377.                 </div>
  378.                 {% endif %}
  379.             </div>
  380.         </div>  
  381.     </div>
  382.     {% else %}
  383.     <div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}  {{ pimcore_select("bg-color-global") }}">
  384.         <div class="{{ pimcore_select("stone-bg") }}">
  385.             <div class="uk-container apk-container-1400 {{ pimcore_select("padding")}}">
  386.                 {% if pimcore_select("text-separation").data == "separated" %}
  387.                     <div class="uk-grid-medium" uk-grid>
  388.                         <div class="{{ grid_right_class }}">
  389.                             <div class="{{ pimcore_select("title-align") }}">
  390.                                 {% if not pimcore_textarea("content-title").isEmpty %}
  391.                                     {% if pimcore_select("content-heading").getData() == 'span' %}
  392.                                         <span class="uk-h2">
  393.                                             {{ pimcore_textarea("content-title", {
  394.                                             "nl2br" : true})|raw }}
  395.                                         </span>
  396.                                     {% else %}
  397.                                         {% set content_heading = pimcore_select("content-heading").getData() %}
  398.                                         <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  399.                                             {{ pimcore_textarea("content-title", {
  400.                                             "nl2br" : true})|raw }}
  401.                                         </{{ content_heading }}>
  402.                                     {% endif %}
  403.                                 {% endif %}
  404.                             </div>
  405.                         </div>
  406.                         <div class="{{ grid_left_class }} {{ ImgTextPositionCode }} {{ pimcore_select("text-align") }}">
  407.                             {{ pimcore_wysiwyg("content") }}
  408.                             {{ pimcore_textarea('map', { 'htmlspecialchars' : false }) }}
  409.                             <div class="{{ pimcore_select("button-align").data }}">
  410.                                 {{ pimcore_link("content-btn", {"class" : "uk-button uk-button-primary"}) }}
  411.                             </div>
  412.                         </div>
  413.                     </div>
  414.                 {% else %}
  415.                 <div>
  416.                     <div class="{{ pimcore_select("title-align") }}">
  417.                         {% if not pimcore_textarea("content-title").isEmpty %}
  418.                             {% if pimcore_select("content-heading").getData() == 'span' %}
  419.                                 <span class="uk-h2">
  420.                                     {{ pimcore_textarea("content-title", {
  421.                                     "nl2br" : true})|raw }}
  422.                                 </span>
  423.                             {% else %}
  424.                                 {% set content_heading = pimcore_select("content-heading").getData() %}
  425.                                 <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  426.                                     {{ pimcore_textarea("content-title", {
  427.                                     "nl2br" : true})|raw }}
  428.                                 </{{ content_heading }}>
  429.                             {% endif %}
  430.                         {% endif %}
  431.                     </div>
  432.                     <div class="{{ pimcore_select("text-align") }} apk-wysiwyg-content-link">
  433.                         {{ pimcore_wysiwyg("content") }}
  434.                         {{ pimcore_textarea('map', { 'htmlspecialchars' : false }) }}
  435.                         <div class="{{ pimcore_select("button-align").data }}">
  436.                             {{ pimcore_link("content-btn", {"class" : "uk-button uk-button-primary"}) }}
  437.                         </div>
  438.                     </div>
  439.                 </div>
  440.                 {% endif %}
  441.                 {% if pimcore_wysiwyg("content-bottom").isEmpty() %}
  442.                 {% else %}
  443.                 <div class="{{ pimcore_select("text-align").data }} uk-margin-medium-top">
  444.                     {{ pimcore_wysiwyg("content-bottom") }}
  445.                 </div>
  446.                 {% endif %}
  447.             
  448.             </div>
  449.         </div>  
  450.     </div>
  451.     {% endif %}
  452. {% endif %}