templates/areas/images-slider-text-box/view.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     <div class="edit-box">
  3.         <h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
  4.         <div class="flex gap-20">
  5.             <div class="content flex column gap-20">
  6.                 <div class="content-box">
  7.                     <div class="item">
  8.                     <p class="edit-p">H1 HEADLINE TEXT:</p>
  9.                     {{ pimcore_input('h1', {'placeholder':'H1 HEADLINE' }) }}
  10.                     </div>
  11.                 </div>
  12.                 <div class="content-box flex gap-20">
  13.                     <div class="item">
  14.                     <p class="edit-p">Texttyp wählen:</p>
  15.                     {{ pimcore_select("TextType", {
  16.                         "reload": true,
  17.                         "store": [
  18.                             ["lead", "Lead Text"],
  19.                             ["basic", "Fliess Text"]
  20.                         ],
  21.                         "defaultValue" : "lead"
  22.                     }) }}
  23.                     </div>
  24.                     <div class="item">
  25.                         <p class="edit-p">Textbox Seite:</p>
  26.                         {{ pimcore_select("BoxSide", {
  27.                             "reload": true,
  28.                             "store": [
  29.                                 ["right", "Box rechts"],
  30.                                 ["left", "Box links"]
  31.                             ],
  32.                             "defaultValue" : "left"
  33.                         }) }}
  34.                     </div>
  35.                     <div class="item">
  36.                         <p class="edit-p">Abstand oben:</p>
  37.                         {{ pimcore_select("PaddingTop", {
  38.                             "reload": true,
  39.                             "store": [
  40.                                 ["no-padding-top", "Kein Abstand"],
  41.                                 ["default-padding", "Standard Abstand"]
  42.                             ],
  43.                             "defaultValue" : "default-padding"
  44.                         }) }}
  45.                     </div>
  46.                     <div class="item">
  47.                         <p class="edit-p">Buttons einfügen:</p>
  48.                         {{ pimcore_select("ButtonsRow", {
  49.                             "reload": true,
  50.                             "store": [
  51.                                 ["true", "Mit Buttons"],
  52.                                 ["false", "Ohne Buttons"]
  53.                             ],
  54.                             "defaultValue" : "false"
  55.                         }) }}
  56.                     </div>
  57.                     <div class="item">
  58.                         <p class="edit-p">Anker Text:</p>
  59.                         {{ pimcore_input('anchor',{'placeholder':'Anker Text','width':300}) }}
  60.                     </div>
  61.                 </div>
  62.             </div>
  63.             <div class="content flex column gap-20">
  64.                 <div class="content-box">
  65.                     <div class="item">
  66.                     <p class="edit-p">Bilder für den Slider ablegen:</p>
  67.                     {{ pimcore_relations("SliderImages", {
  68.                         "reload": true,
  69.                         "title": "Bilder ablegen",
  70.                         "types": ["asset"],
  71.                         "subtypes": {
  72.                             "asset": ["image"]
  73.                         }
  74.                     }) }}
  75.                     </div>
  76.                 </div>
  77.                 <div class="content-box">
  78.                     <div class="item">
  79.                         <p class="edit-p">Schattenbild oben ablegen:</p>
  80.                         {{ pimcore_relation("ShadowImage",{
  81.                             "reload": false,
  82.                             "types": ["asset"],
  83.                             "subtypes": {
  84.                                 "asset": ["image"]
  85.                             }
  86.                         }) }}
  87.                     </div>
  88.                     <div class="item">
  89.                         <p class="edit-p">Schattenbild unten ablegen:</p>
  90.                         {{ pimcore_relation("ShadowImage2",{
  91.                             "reload": false,
  92.                             "types": ["asset"],
  93.                             "subtypes": {
  94.                                 "asset": ["image"]
  95.                             }
  96.                         }) }}
  97.                     </div>
  98.                 </div>
  99.             </div>
  100.         </div>
  101.     </div>
  102. {% endif %}
  103. <section class="slider-text-box images-slider-text-box {{ pimcore_select("BoxSide").getData() }} {{ pimcore_select("PaddingTop").getData() }}" {% if not pimcore_input('anchor').isEmpty() %}id="{{ pimcore_input('anchor').getData() }}"{% endif %}>
  104.     {% if not pimcore_relation("ShadowImage").isEmpty() and not editmode %}
  105.         <div class="shadow-image-con images-slider-text-box-shadow">
  106.             {{ pimcore_relation("ShadowImage").getElement().getThumbnail('ShadowImage').html({
  107.                 imgAttributes: {
  108.                     "class": "shadow-image-top"
  109.                 }
  110.             }) | raw }}
  111.         </div>
  112.     {% endif %}
  113.     {% if not pimcore_relation("ShadowImage2").isEmpty() and not editmode %}
  114.         <div class="shadow-image-con images-slider-text-box-shadow images-slider-text-box-shadow-2">
  115.             {{ pimcore_relation("ShadowImage2").getElement().getThumbnail('ShadowImage').html({
  116.                 imgAttributes: {
  117.                     "class": "shadow-image-top"
  118.                 }
  119.             }) | raw }}
  120.         </div>
  121.     {% endif %}
  122.     {% if not pimcore_input('h1').isEmpty() %}
  123.         <h1 class="vertical alt">{{ pimcore_input('h1').getData() }}</h1>
  124.     {% endif %}
  125.     <div class="swipe-slider-content">
  126.         <div class="swiper textSliderSwiperMobile">
  127.             <div class="swiper-wrapper">
  128.                 {% for image in pimcore_relations("SliderImages") %}
  129.                     <div class="swiper-slide">{{ image.thumbnail('textSliderSwiper').html | raw }}</div>
  130.                 {% endfor %}
  131.             </div>
  132.         </div>
  133.     </div>
  134.     <div class="container {% if pimcore_relations("SliderImages").isEmpty() %}empty-slider-relation{% endif %}">
  135.         {# DESKTOP Slider #}
  136.         <div class="slider-container flex">
  137.             <div class="wrapper">
  138.                 <div class="swiper sliderTextSwiperDesktop">
  139.                     <div class="swiper-wrapper">
  140.                         {% for image in pimcore_relations("SliderImages") %}
  141.                             <div class="swiper-slide">{{ image.thumbnail('textSliderSwiper').html | raw }}</div>
  142.                         {% endfor %}
  143.                     </div>
  144.                 </div>
  145.                 <div class="swipe-controls">
  146.                     <div class="sliderTextSwiperNext"></div>
  147.                     <div class="sliderTextSwiperPrev"></div>
  148.                 </div>
  149.             </div>
  150.         </div>
  151.         {# DESKTOP Slider #}
  152.         <div class="images-container {% if pimcore_relations("SliderImages").getElements() | length  > 1 %}row-reverse{% endif %}">
  153.             {% for image in pimcore_relations("SliderImages") %}
  154.                 {% if pimcore_relations("SliderImages").getElements() | length  <= 1 %}
  155.                     {{ image.thumbnail('textSliderSwiper').getHtml({
  156.                         'imgAttributes': {
  157.                             'class': 'big'
  158.                         },
  159.                         'pictureAttributes': {
  160.                             'class': 'big'
  161.                         }
  162.                     }) | raw }}
  163.                 {% else %}
  164.                         {% if loop.index == 1 %}
  165.                             {{ image.thumbnail('textSliderSwiper').getHtml({
  166.                                 'imgAttributes': {
  167.                                     'class': 'big'
  168.                                 },
  169.                                 'pictureAttributes': {
  170.                                     'class': 'big'
  171.                                 }
  172.                             }) | raw }}
  173.                         {% endif %}
  174.                         {% if loop.index == 2 %}
  175.                             {{ image.thumbnail('textSliderSwiper').getHtml({
  176.                                 'imgAttributes': {
  177.                                     'class': 'mid'
  178.                                 },
  179.                                 'pictureAttributes': {
  180.                                     'class': 'mid'
  181.                                 }
  182.                             }) | raw }}
  183.                         {% endif %}
  184.                 {% endif %}
  185.             {% endfor %}
  186.         </div>
  187.         <div class="text-image-box">
  188.             <div class="content text-box">
  189.                 {% if editmode %}
  190.                     <h2>
  191.                         {{ pimcore_textarea("h2",{
  192.                             "nl2br": true,
  193.                             "height": 120,
  194.                             "placeholder": "H2 Headline Text"
  195.                         }) }}
  196.                     </h2>
  197.                 {% elseif not editmode and not pimcore_textarea("h2").isEmpty() %}
  198.                     <h2>{{ pimcore_textarea("h2").getData() | nl2br }}</h2>
  199.                 {% endif %}
  200.                 <div class="{{ pimcore_select("TextType").getData() }}">
  201.                     {% if editmode %}
  202.                         {{ pimcore_wysiwyg('Content', {
  203.                             height: 200,
  204.                             customConfig: '/assets/js/editmode/config.js'
  205.                         }) }}
  206.                     {% elseif not pimcore_wysiwyg('Content').isEmpty() %}
  207.                         {{ pimcore_wysiwyg('Content').getData() | raw }}
  208.                     {% endif %}
  209.                 </div>
  210.                 {{ pimcore_areablock('AreablockContent', {
  211.                     'allowed': [
  212.                         'text',
  213.                     ]
  214.                 }) }}
  215.                 {% if pimcore_select("ButtonsRow").getData() == "true" %}
  216.                 <div class="buttons-row flex">
  217.                     {% for i in pimcore_block('linkblock').iterator %}
  218.                         <button class="primary">
  219.                             {{ pimcore_link('Link') }}
  220.                             <svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
  221.                                 <g transform="translate(0 0.354)">
  222.                                     <g transform="translate(0)">
  223.                                         <path class="line" d="M7.5,18h15" transform="translate(-7.5 -13)" fill="none" stroke="#b76e2b" stroke-linejoin="round" stroke-width="1"/>
  224.                                         <path class="arrow" d="M18,7.5l5.026,5L18,17.5" transform="translate(-8.027 -7.5)" fill="none" stroke="#b76e2b" stroke-width="1"/>
  225.                                     </g>
  226.                                 </g>
  227.                             </svg>
  228.                         </button>
  229.                     {% endfor %}
  230.                 </div>
  231.                 {% endif %}
  232.             </div>
  233.             {% if pimcore_relations("SliderImages").getElements() > 3 %}
  234.             <div class="images-container single-image">
  235.                 {% for image in pimcore_relations("SliderImages") %}
  236.                     {% if loop.index == 3 %}
  237.                     {{ image.thumbnail('textSliderSwiper').getHtml({
  238.                         'imgAttributes': {
  239.                             'class': 'small'
  240.                         }
  241.                     }) | raw }}
  242.                     {% endif %}
  243.                 {% endfor %}
  244.             </div>
  245.             {% endif %}
  246.         </div>
  247.     </div>
  248. </section>