custom/plugins/Poller24/src/Resources/views/storefront/element/cms-element-image-gallery.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-image-gallery.html.twig' %}
  2. {% block element_image_gallery_inner %}
  3.     <div class="row gallery-slider-row{% if imageCount == 1 %} is-single-image{% else %} is-loading{% endif %} js-gallery-zoom-modal-container"
  4.             {% if zoom %}
  5.                 data-magnifier="true"
  6.             {% endif %}
  7.             {% if magnifierOptions|length > 0 %}
  8.                 data-magnifier-options='{{ magnifierOptions|json_encode|raw }}'
  9.             {% endif %}
  10.             {% if imageCount > 1 %}
  11.                 data-gallery-slider="true"
  12.                 data-gallery-slider-options='{{ gallerySliderOptions|json_encode }}'
  13.             {% endif %}>
  14.         {% block element_image_gallery_inner_col %}
  15.             <div class="gallery-slider-col{% if galleryPosition == "left" %} col order-1 order-md-2{% elseif galleryPosition == "underneath" %} col-12 order-1{% endif %}"
  16.                  {% if zoomModal %}data-zoom-modal="true"{% endif %}>
  17.                 {# option "magnifierOverGallery" shows zoom container over gallery #}
  18.                 <div class="base-slider gallery-slider{% if navigationArrows == "outside" %} has-nav-outside{% endif %}{% if navigationDots == "outside" %} has-dots-outside{% endif %}{% if magnifierOverGallery %} js-magnifier-zoom-image-container{% endif %}">
  19.                     {% block element_image_gallery_inner_wrapper %}
  20.                         {% if imageCount > 1 %}
  21.                             {% block element_image_gallery_inner_multiple_slides %}
  22.                                 {% block element_image_gallery_inner_container %}
  23.                                     <div class="gallery-slider-container"
  24.                                          data-gallery-slider-container="true">
  25.                                         {% block element_image_gallery_inner_items %}
  26.                                             {% for image in mediaItems %}
  27.                                                 {% block element_image_gallery_inner_item %}
  28.                                                     <div class="gallery-slider-item-container">
  29.                                                         <div class="gallery-slider-item is-{{ displayMode }} js-magnifier-container"{% if minHeight and  (displayMode == "cover" or displayMode == "contain" ) %} style="min-height: {{ minHeight }}"{% endif %}>
  30.                                                             {% set attributes = {
  31.                                                                 'class': 'img-fluid gallery-slider-image magnifier-image js-magnifier-image',
  32.                                                                 'alt': (image.translated.alt ?: fallbackImageTitle),
  33.                                                                 'title': (image.translated.title ?: fallbackImageTitle),
  34.                                                                 'data-full-image': image.url
  35.                                                             } %}
  36.                                                             {% if displayMode == 'cover' or displayMode == 'contain' %}
  37.                                                                 {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  38.                                                             {% endif %}
  39.                                                             {% if isProduct %}
  40.                                                                 {% set attributes = attributes|merge({ 'itemprop': 'image' }) %}
  41.                                                             {% endif %}
  42.                                                             {% sw_thumbnails 'gallery-slider-image-thumbnails' with {
  43.                                                                 media: image
  44.                                                             } %}
  45.                                                         </div>
  46.                                                     </div>
  47.                                                 {% endblock %}
  48.                                             {% endfor %}
  49.                                         {% endblock %}
  50.                                     </div>
  51.                                 {% endblock %}
  52.                                 {% block element_image_gallery_inner_controls %}
  53.                                     {% if navigationArrows %}
  54.                                         <div class="gallery-slider-controls"
  55.                                              data-gallery-slider-controls="{% if navigationArrows %}true{% else %}false{% endif %}">
  56.                                             {% block element_image_gallery_inner_control_items %}
  57.                                                 {% block element_image_gallery_inner_control_prev %}
  58.                                                     <button class="base-slider-controls-prev gallery-slider-controls-prev{% if navigationArrows == "outside" %} is-nav-prev-outside{% elseif navigationArrows == "inside" %} is-nav-prev-inside{% endif %}"
  59.                                                             aria-label="{{ 'general.previous'|trans|striptags }}">
  60.                                                         {% block element_image_gallery_inner_control_prev_icon %}
  61.                                                             {% sw_icon 'arrow-head-left' %}
  62.                                                         {% endblock %}
  63.                                                     </button>
  64.                                                 {% endblock %}
  65.                                                 {% block element_image_gallery_inner_control_next %}
  66.                                                     <button class="base-slider-controls-next gallery-slider-controls-next{% if navigationArrows == "outside" %} is-nav-next-outside{% elseif navigationArrows == "inside" %} is-nav-next-inside{% endif %}"
  67.                                                             aria-label="{{ 'general.next'|trans|striptags }}">
  68.                                                         {% block element_image_gallery_inner_control_next_icon %}
  69.                                                             {% sw_icon 'arrow-head-right' %}
  70.                                                         {% endblock %}
  71.                                                     </button>
  72.                                                 {% endblock %}
  73.                                             {% endblock %}
  74.                                         </div>
  75.                                     {% endif %}
  76.                                 {% endblock %}
  77.                             {% endblock %}
  78.                         {% else %}
  79.                             {% block element_image_gallery_inner_single %}
  80.                                 <div class="gallery-slider-single-image is-{{ displayMode }} js-magnifier-container"{% if minHeight %} style="min-height: {{ minHeight }}"{% endif %}>
  81.                                     {% if imageCount > 0 %}
  82.                                         {% set attributes = {
  83.                                             'class': 'img-fluid gallery-slider-image magnifier-image js-magnifier-image',
  84.                                             'alt': (mediaItems|first.translated.alt ?: fallbackImageTitle),
  85.                                             'title': (mediaItems|first.translated.title ?: fallbackImageTitle),
  86.                                             'data-full-image': mediaItems|first.url
  87.                                         } %}
  88.                                         {% if displayMode == 'cover' or displayMode == 'contain' %}
  89.                                             {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  90.                                         {% endif %}
  91.                                         {% if isProduct %}
  92.                                             {% set attributes = attributes|merge({ 'itemprop': 'image' }) %}
  93.                                         {% endif %}
  94.                                         {% sw_thumbnails 'gallery-slider-image-thumbnails' with {
  95.                                             media: mediaItems|first,
  96.                                         } %}
  97.                                     {% else %}
  98.                                         {% sw_icon 'placeholder' style {
  99.                                             'size': 'fluid'
  100.                                         } %}
  101.                                     {% endif %}
  102.                                 </div>
  103.                             {% endblock %}
  104.                         {% endif %}
  105.                     {% endblock %}
  106.                     {% block element_image_gallery_slider_dots %}
  107.                         {% if imageCount > 1 and navigationDots %}
  108.                             <div class="base-slider-dots {% if imageCount > maxItemsToShowNav %} hide-dots{% elseif imageCount > maxItemsToShowMobileNav %} hide-dots-mobile{% endif %}">
  109.                                 {% block element_image_gallery_slider_dots_buttons %}
  110.                                     {% for image in mediaItems %}
  111.                                         {% block element_image_gallery_slider_dots_button %}
  112.                                             <button class="base-slider-dot"
  113.                                                     data-nav-dot="{{ loop.index }}"
  114.                                                     tabindex="-1"></button>
  115.                                         {% endblock %}
  116.                                     {% endfor %}
  117.                                 {% endblock %}
  118.                             </div>
  119.                         {% endif %}
  120.                     {% endblock %}
  121.                 </div>
  122.             </div>
  123.         {% endblock %}
  124.         {% block element_image_gallery_inner_thumbnails_col %}
  125.             {% if imageCount > 1 %}
  126.                 <div class="gallery-slider-thumbnails-col{% if galleryPosition == "left" %} col-0 col-md-auto order-2 order-md-1 is-left{% elseif galleryPosition == "underneath" %} col-12 order-2 is-underneath{% endif %}">
  127.                     <div class="gallery-slider-thumbnails-container{% if galleryPosition == "underneath" %} is-underneath{% endif %}">
  128.                         {% block element_image_gallery_inner_thumbnails %}
  129.                             <div class="gallery-slider-thumbnails{% if galleryPosition == "underneath" %} is-underneath{% endif %}"
  130.                                  data-gallery-slider-thumbnails="true">
  131.                                 {% block element_image_gallery_inner_thumbnails_items %}
  132.                                     {% for image in mediaItems %}
  133.                                         {% block element_image_gallery_inner_thumbnails_item %}
  134.                                             <div class="gallery-slider-thumbnails-item">
  135.                                                 {% block element_image_gallery_inner_thumbnails_item_inner %}
  136.                                                     <div class="gallery-slider-thumbnails-item-inner">
  137.                                                         {% set attributes = {
  138.                                                             'class': 'gallery-slider-thumbnails-image',
  139.                                                             'alt': (image.translated.alt ?: fallbackImageTitle),
  140.                                                             'title': (image.translated.title ?: fallbackImageTitle)
  141.                                                         } %}
  142.                                                         {% if isProduct %}
  143.                                                             {% set attributes = attributes|merge({ 'itemprop': 'image' }) %}
  144.                                                         {% endif %}
  145.                                                         {% sw_thumbnails 'gallery-slider-thumbnails-image-thumbnails' with {
  146.                                                             media: image,
  147.                                                             sizes: {
  148.                                                                 'default': '200px'
  149.                                                             }
  150.                                                         } %}
  151.                                                     </div>
  152.                                                 {% endblock %}
  153.                                             </div>
  154.                                         {% endblock %}
  155.                                     {% endfor %}
  156.                                 {% endblock %}
  157.                             </div>
  158.                         {% endblock %}
  159.                         {% block element_image_gallery_inner_thumbnails_controls %}
  160.                             <div data-thumbnail-slider-controls="true" class="gallery-slider-thumbnails-controls">
  161.                                 {% block element_image_gallery_inner_thumbnails_controls_prev %}
  162.                                     <button class="base-slider-controls-prev gallery-slider-thumbnails-controls-prev">
  163.                                         {% if galleryPosition == "left" %}
  164.                                             {% sw_icon 'arrow-head-up' %}
  165.                                         {% elseif galleryPosition == "underneath" %}
  166.                                             {% sw_icon 'arrow-head-left' %}
  167.                                         {% endif %}
  168.                                     </button>
  169.                                 {% endblock %}
  170.                                 {% block element_image_gallery_inner_thumbnails_controls_next %}
  171.                                     <button class="base-slider-controls-next gallery-slider-thumbnails-controls-next">
  172.                                         {% if galleryPosition == "left" %}
  173.                                             {% sw_icon 'arrow-head-down' %}
  174.                                         {% elseif galleryPosition == "underneath" %}
  175.                                             {% sw_icon 'arrow-head-right' %}
  176.                                         {% endif %}
  177.                                     </button>
  178.                                 {% endblock %}
  179.                             </div>
  180.                         {% endblock %}
  181.                     </div>
  182.                 </div>
  183.             {% endif %}
  184.         {% endblock %}
  185.         {% block element_image_gallery_inner_zoom_modal_wrapper %}
  186.             {% if zoomModal %}
  187.                 <div class="zoom-modal-wrapper">
  188.                     {% block element_image_gallery_inner_zoom_modal %}
  189.                         <div class="modal is-fullscreen zoom-modal js-zoom-modal{% if imageCount is same as(1) %} no-thumbnails{% endif %}"
  190.                              data-image-zoom-modal="true"
  191.                              tabindex="-1"
  192.                              role="dialog">
  193.                             {% block element_image_gallery_inner_zoom_modal_dialog %}
  194.                                 <div class="modal-dialog"
  195.                                      role="document">
  196.                                     {% block element_image_gallery_inner_zoom_modal_content %}
  197.                                         <div class="modal-content"{% if imageCount > 1 %} data-modal-gallery-slider="true"{% endif %}>
  198.                                             {% block element_image_gallery_inner_zoom_modal_close_button %}
  199.                                                 <button type="button"
  200.                                                         class="modal-close close"
  201.                                                         data-dismiss="modal"
  202.                                                         aria-label="Close">
  203.                                                     {% block element_image_gallery_inner_zoom_modal_close_icon %}
  204.                                                         <span aria-hidden="true">
  205.                                                             {% sw_icon 'x' style { 'size': 'sm' } %}
  206.                                                         </span>
  207.                                                     {% endblock %}
  208.                                                 </button>
  209.                                             {% endblock %}
  210.                                             {% block element_image_gallery_inner_zoom_modal_body %}
  211.                                                 <div class="modal-body">
  212.                                                     {% block element_image_gallery_inner_zoom_modal_action_buttons %}
  213.                                                         <div class="zoom-modal-actions btn-group"
  214.                                                              role="group"
  215.                                                              aria-label="zoom actions">
  216.                                                             {% block element_image_gallery_inner_zoom_modal_action_zoom_out %}
  217.                                                                 <button class="btn btn-light image-zoom-btn js-image-zoom-out">
  218.                                                                     {% block element_image_gallery_inner_zoom_modal_action_zoom_out_icon %}
  219.                                                                         {% sw_icon 'minus-circle' %}
  220.                                                                     {% endblock %}
  221.                                                                 </button>
  222.                                                             {% endblock %}
  223.                                                             {% block element_image_gallery_inner_zoom_modal_action_zoom_reset %}
  224.                                                                 <button class="btn btn-light image-zoom-btn js-image-zoom-reset">
  225.                                                                     {% block element_image_gallery_inner_zoom_modal_action_zoom_reset_icon %}
  226.                                                                         {% sw_icon 'screen-minimize' %}
  227.                                                                     {% endblock %}
  228.                                                                 </button>
  229.                                                             {% endblock %}
  230.                                                             {% block element_image_gallery_inner_zoom_modal_action_zoom_in %}
  231.                                                                 <button class="btn btn-light image-zoom-btn js-image-zoom-in">
  232.                                                                     {% block element_image_gallery_inner_zoom_modal_action_zoom_in_icon %}
  233.                                                                         {% sw_icon 'plus-circle' %}
  234.                                                                     {% endblock %}
  235.                                                                 </button>
  236.                                                             {% endblock %}
  237.                                                         </div>
  238.                                                     {% endblock %}
  239.                                                     {% block element_image_gallery_inner_zoom_modal_slider %}
  240.                                                         <div class="gallery-slider"
  241.                                                              data-gallery-slider-container=true>
  242.                                                             {% block element_image_gallery_inner_zoom_modal_slider_items %}
  243.                                                                 {% for image in mediaItems %}
  244.                                                                     {% block element_image_gallery_inner_zoom_modal_slider_item %}
  245.                                                                         <div class="gallery-slider-item">
  246.                                                                             {% block element_image_gallery_inner_zoom_modal_slider_item_zoom_container %}
  247.                                                                                 <div class="image-zoom-container"
  248.                                                                                      data-image-zoom="true">
  249.                                                                                     {% block element_image_gallery_inner_zoom_modal_slider_item_image %}
  250.                                                                                         {% sw_thumbnails 'gallery-slider-image-thumbnails' with {
  251.                                                                                             media: image,
  252.                                                                                             attributes: {
  253.                                                                                                 'class': 'gallery-slider-image js-image-zoom-element js-load-img',
  254.                                                                                                 'alt': (image.translated.alt ?: fallbackImageTitle),
  255.                                                                                                 'title': (image.translated.title ?: fallbackImageTitle)
  256.                                                                                             },
  257.                                                                                             load: false
  258.                                                                                         } %}
  259.                                                                                     {% endblock %}
  260.                                                                                 </div>
  261.                                                                             {% endblock %}
  262.                                                                         </div>
  263.                                                                     {% endblock %}
  264.                                                                 {% endfor %}
  265.                                                             {% endblock %}
  266.                                                         </div>
  267.                                                     {% endblock %}
  268.                                                     {% block element_image_gallery_inner_zoom_modal_slider_controls %}
  269.                                                         {% if imageCount > 1 %}
  270.                                                             <div class="gallery-slider-controls"
  271.                                                                  data-gallery-slider-controls="true">
  272.                                                                 {% block element_image_gallery_inner_zoom_modal_slider_control_prev %}
  273.                                                                     <button class="base-slider-controls-prev gallery-slider-controls-prev"
  274.                                                                             aria-label="{{ 'general.previous'|trans|striptags }}">
  275.                                                                         {% block element_image_gallery_inner_zoom_modal_slider_control_prev_icon %}
  276.                                                                             {% sw_icon 'arrow-head-left' %}
  277.                                                                         {% endblock %}
  278.                                                                     </button>
  279.                                                                 {% endblock %}
  280.                                                                 {% block element_image_gallery_inner_zoom_modal_slider_control_next %}
  281.                                                                     <button class="base-slider-controls-next gallery-slider-controls-next"
  282.                                                                             aria-label="{{ 'general.next'|trans|striptags }}">
  283.                                                                         {% block element_image_gallery_inner_zoom_modal_slider_control_next_icon %}
  284.                                                                             {% sw_icon 'arrow-head-right' %}
  285.                                                                         {% endblock %}
  286.                                                                     </button>
  287.                                                                 {% endblock %}
  288.                                                             </div>
  289.                                                         {% endif %}
  290.                                                     {% endblock %}
  291.                                                 </div>
  292.                                             {% endblock %}
  293.                                             {% if imageCount > 1 %}
  294.                                                 {% block element_image_gallery_inner_zoom_modal_footer %}
  295.                                                     <div class="modal-footer">
  296.                                                         {% block element_image_gallery_inner_zoom_modal_thumbnails_controls %}
  297.                                                             <div class="gallery-slider-modal-controls">
  298.                                                                 <div data-thumbnail-slider-controls="true" class="gallery-slider-modal-thumbnails">
  299.                                                                     <button class="base-slider-controls-prev gallery-slider-thumbnails-controls-prev"
  300.                                                                             aria-label="{{ 'general.previous'|trans|striptags }}">
  301.                                                                         {% sw_icon 'arrow-head-left' %}
  302.                                                                     </button>
  303.                                                                     <button class="base-slider-controls-next gallery-slider-thumbnails-controls-next"
  304.                                                                             aria-label="{{ 'general.next'|trans|striptags }}">
  305.                                                                         {% sw_icon 'arrow-head-right' %}
  306.                                                                     </button>
  307.                                                                 </div>
  308.                                                             </div>
  309.                                                         {% endblock %}
  310.                                                         {% block element_image_gallery_inner_zoom_modal_thumbnails %}
  311.                                                             <div class="gallery-slider-thumbnails"
  312.                                                                  data-gallery-slider-thumbnails=true>
  313.                                                                 {% block element_image_gallery_inner_zoom_modal_thumbnails_items %}
  314.                                                                     {% for image in mediaItems %}
  315.                                                                         {% block element_image_gallery_inner_zoom_modal_thumbnails_item %}
  316.                                                                             <div class="gallery-slider-thumbnails-item">
  317.                                                                                 {% block element_image_gallery_inner_zoom_modal_thumbnails_item_inner %}
  318.                                                                                     <div class="gallery-slider-thumbnails-item-inner">
  319.                                                                                         {% sw_thumbnails 'gallery-slider-thumbnails-image-thumbnails' with {
  320.                                                                                             media: image,
  321.                                                                                             sizes: {
  322.                                                                                                 'default': '200px'
  323.                                                                                             },
  324.                                                                                             attributes: {
  325.                                                                                                 'class': 'gallery-slider-thumbnails-image js-load-img',
  326.                                                                                                 'alt': (image.translated.alt ?: fallbackImageTitle),
  327.                                                                                                 'title': (image.translated.title ?: fallbackImageTitle)
  328.                                                                                             },
  329.                                                                                             load: false
  330.                                                                                         } %}
  331.                                                                                     </div>
  332.                                                                                 {% endblock %}
  333.                                                                             </div>
  334.                                                                         {% endblock %}
  335.                                                                     {% endfor %}
  336.                                                                 {% endblock %}
  337.                                                             </div>
  338.                                                         {% endblock %}
  339.                                                     </div>
  340.                                                 {% endblock %}
  341.                                             {% endif %}
  342.                                         </div>
  343.                                     {% endblock %}
  344.                                 </div>
  345.                             {% endblock %}
  346.                         </div>
  347.                     {% endblock %}
  348.                 </div>
  349.             {% endif %}
  350.         {% endblock %}
  351.     </div>
  352. <div class="product-media-append">
  353.     <p style="font-size:x-small;" class="product-media-append-text">Das Produktbild kann je nach Konfigurationseinstellung abweichen.</p>
  354. </div> 
  355. {% endblock %}