templates/areas/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.                     <p class="edit-p">H1 HEADLINE TEXT:</p>
  8.                     {{ pimcore_input('h1', {'placeholder':'H1 HEADLINE' }) }}
  9.                 </div>
  10.                 <div class="content-box flex gap-20">
  11.                     <div class="item">
  12.                     <p class="edit-p">Texttyp wählen:</p>
  13.                     {{ pimcore_select("TextType", {
  14.                         "reload": true,
  15.                         "store": [
  16.                             ["lead", "Lead Text"],
  17.                             ["basic", "Fliess Text"]
  18.                         ],
  19.                         "defaultValue" : "lead"
  20.                     }) }}
  21.                     </div>
  22.                     <div class="item">
  23.                         <p class="edit-p">Buttons einfügen:</p>
  24.                         {{ pimcore_select("ButtonsRow", {
  25.                             "reload": true,
  26.                             "store": [
  27.                                 ["true", "Mit Buttons"],
  28.                                 ["false", "Ohne Buttons"]
  29.                             ],
  30.                             "defaultValue" : "false"
  31.                         }) }}
  32.                     </div>
  33.                     <div class="item">
  34.                         <p class="edit-p">Anker Text:</p>
  35.                         {{ pimcore_input('anchor',{'placeholder':'Anker Text','width':300}) }}
  36.                     </div>
  37.                 </div>
  38.             </div>
  39.             <div class="content flex column gap-20">
  40.                 <div class="content-box">
  41.                     <div class="item">
  42.                     <p class="edit-p">Bilder für den Slider ablegen:</p>
  43.                     {{ pimcore_relations("SliderImages", {
  44.                         "title": "Bilder ablegen",
  45.                         "types": ["asset"],
  46.                         "subtypes": {
  47.                             "asset": ["image"]
  48.                         }
  49.                     }) }}
  50.                     </div>
  51.                 </div>
  52.                 <div class="content-box">
  53.                     <div class="item">
  54.                         <p class="edit-p">Schattenbild oben ablegen:</p>
  55.                         {{ pimcore_relation("ShadowImage",{
  56.                             "reload": false,
  57.                             "types": ["asset"],
  58.                             "subtypes": {
  59.                                 "asset": ["image"]
  60.                             }
  61.                         }) }}
  62.                     </div>
  63.                     <div class="item">
  64.                         <p class="edit-p">Schattenbild unten ablegen:</p>
  65.                         {{ pimcore_relation("ShadowImage2",{
  66.                             "reload": false,
  67.                             "types": ["asset"],
  68.                             "subtypes": {
  69.                                 "asset": ["image"]
  70.                             }
  71.                         }) }}
  72.                     </div>
  73.                 </div>
  74.             </div>
  75.         </div>
  76.     </div>
  77. {% endif %}
  78. <section class="slider-text-box" {% if not pimcore_input('anchor').isEmpty() %}id="{{ pimcore_input('anchor').getData() }}"{% endif %}>
  79.     {% if not pimcore_relation("ShadowImage").isEmpty() and not editmode %}
  80.         {#{% set imageId = random() %}#}
  81.         <div class="shadow-image-con slider-textbox-shadow" id="slider-textbox-shadow">
  82.             {{ pimcore_relation("ShadowImage").getElement().getThumbnail('ShadowImage').html({
  83.                 imgAttributes: {
  84.                     "class": "shadow-image-top"
  85.                 }
  86.             }) | raw }}
  87.         </div>
  88.     {% endif %}
  89.     {% if not pimcore_relation("ShadowImage2").isEmpty() and not editmode %}
  90.         <div class="shadow-image-con slider-textbox-shadow slider-textbox-shadow-2" id="slider-textbox-shadow-2">
  91.             {{ pimcore_relation("ShadowImage2").getElement().getThumbnail('ShadowImage').html({
  92.                 imgAttributes: {
  93.                     "class": "shadow-image-bottom"
  94.                 }
  95.             }) | raw }}
  96.         </div>
  97.     {% endif %}
  98.     {% if not pimcore_input('h1').isEmpty() %}
  99.         <h1 class="vertical alt">{{ pimcore_input('h1').getData() }}</h1>
  100.     {% endif %}
  101.     <div class="swipe-slider-content">
  102.         <div class="swiper textSliderSwiperMobile">
  103.             <div class="swiper-wrapper">
  104.                 {% for image in pimcore_relations("SliderImages") %}
  105.                     <div class="swiper-slide">{{ image.thumbnail('textSliderSwiper').html | raw }}</div>
  106.                 {% endfor %}
  107.             </div>
  108.         </div>
  109.     </div>
  110.     <div class="container">
  111.         {# DESKTOP Slider #}
  112.         <div class="slider-container flex">
  113.             <div class="wrapper">
  114.                 <div class="swiper sliderTextSwiperDesktop">
  115.                     <div class="swiper-wrapper">
  116.                         {% for image in pimcore_relations("SliderImages") %}
  117.                             <div class="swiper-slide">{{ image.thumbnail('textSliderSwiper').html | raw }}</div>
  118.                         {% endfor %}
  119.                     </div>
  120.                 </div>
  121.                 <div class="swipe-controls">
  122.                     <div class="sliderTextSwiperNext"></div>
  123.                     <div class="sliderTextSwiperPrev"></div>
  124.                 </div>
  125.             </div>
  126.         </div>
  127.         {# DESKTOP Slider #}
  128.         <div class="content text-box">
  129.                 {% if editmode %}
  130.                     <h2>
  131.                         {{ pimcore_textarea("h2",{
  132.                             "nl2br": true,
  133.                             "height": 120,
  134.                             "placeholder": "H2 Headline Text"
  135.                         }) }}
  136.                     </h2>
  137.                 {% elseif not editmode and not pimcore_textarea("h2").isEmpty() %}
  138.                     <h2>{{ pimcore_textarea("h2").getData() | nl2br }}</h2>
  139.                 {% endif %}
  140.                 <div class="{{ pimcore_select("TextType").getData() }}">
  141.                     {% if editmode %}
  142.                         {{ pimcore_wysiwyg('Content', {
  143.                             height: 200,
  144.                             customConfig: '/assets/js/editmode/config.js'
  145.                         }) }}
  146.                     {% endif %}
  147.                     {% if not editmode and not pimcore_wysiwyg('Content').isEmpty() %}
  148.                         {{ pimcore_wysiwyg('Content').getData() | raw }}
  149.                     {% endif %}
  150.                 </div>
  151.                 {{ pimcore_areablock('AreablockContent', {
  152.                     'allowed': [
  153.                         'text',
  154.                     ]
  155.                 }) }}
  156.                 {% if pimcore_select("ButtonsRow").getData() == "true" %}
  157.                 <div class="buttons-row flex">
  158.                     {% for i in pimcore_block('linkblock').iterator %}
  159.                         <button class="primary">
  160.                             {{ pimcore_link('Link') }}
  161.                             <svg width="15.708" height="10.709" viewBox="0 0 15.708 10.709">
  162.                                 <g transform="translate(0 0.354)">
  163.                                     <g transform="translate(0)">
  164.                                         <path class="line" d="M7.5,18h15" transform="translate(-7.5 -13)" fill="none" stroke="#b76e2b" stroke-linejoin="round" stroke-width="1"/>
  165.                                         <path class="arrow" d="M18,7.5l5.026,5L18,17.5" transform="translate(-8.027 -7.5)" fill="none" stroke="#b76e2b" stroke-width="1"/>
  166.                                     </g>
  167.                                 </g>
  168.                             </svg>
  169.                         </button>
  170.                     {% endfor %}
  171.                 </div>
  172.                 {% endif %}
  173.             </div>
  174.     </div>
  175. </section>