vendor/store.shopware.com/faesslichslider/src/Resources/views/storefront/faesslich-slider/generic-element.html.twig line 1

Open in your IDE?
  1. {% block faesslich_slider_slide_type %}
  2.     {% block faesslich_slider_picture %}
  3.         {% if (mediaUsage == 'picture' and mediaTypeSplit == 'image') or (isCarouselElement and mediaTypeSplit == 'image') and not entry.useYtVideo %}
  4.             <div class="faesslich-slider-slide-item--picture">
  5.                 {% block faesslich_slider_picture_inner %}
  6.                 <picture>
  7.                 {% if entry.mediaMobile %}
  8.                     <source media="(max-width:640px)" srcset="{{ entry.mediaMobileUrl }}">
  9.                 {% endif %}
  10.                 {% if entry.mediaTablet %}
  11.                     <source media="(max-width: 1024px)" srcset="{{ entry.mediaTabletUrl }}">
  12.                 {% endif %}
  13.                     <source media="(min-width:1025px)" srcset="{{ entry.mediaUrl }}">
  14.                     {% sw_thumbnails_faesslich 'product-image-thumbnails' with {
  15.                         media: media,
  16.                         sizes: {
  17.                             'default': '100px',
  18.                             'xs': '501px',
  19.                             'sm': '315px',
  20.                             'md': '427px',
  21.                             'lg': '333px',
  22.                             'xl': '284px'
  23.                         },
  24.                         attributes: {
  25.                             'class': 'faesslich-slider-slide-item--picture--image' ,
  26.                             'alt': (sliderElementTitle ? sliderElementTitle|striptags|e('html_attr') : ""),
  27.                             'title': (entry.mediaAlt ? entry.mediaAlt|e('html_attr') : sliderElementTitle ? sliderElementTitle|striptags|e('html_attr') : ""),
  28.                             'alt': (entry.mediaAlt ? entry.mediaAlt|e('html_attr') : sliderElementTitle ? sliderElementTitle|striptags|e('html_attr') : ""),
  29.                             'style': "object-fit: #{entry.mediaScale}; object-position: #{entry.mediaPosition}"
  30.                         }
  31.                     } %}
  32.                 <picture>
  33.                 {% endblock %}
  34.             </div>
  35.         {% endif %}
  36.     {% endblock %}
  37.     {% block faesslich_slider_overlay %}
  38.         <{% if not entry.linkWholeSliderArea %}div{% else %}a href="{{ ctaUrl }}"{% endif %} class="faesslich-slider-slide-item--overlay"{% if sliderElementBgOverlay %} style="background-color: {{ sliderElementBgOverlay }}"{% endif %}>
  39.         </{% if not entry.linkWholeSliderArea %}div{% else %}a{% endif %}>
  40.     {% endblock %}
  41.     {% block faesslich_slider_video %}
  42.         {% if mediaTypeSplit == 'video' and not entry.useYtVideo %}
  43.             <div class="faesslich-slider-slide-item--video">
  44.                 <video width="100%" height="100%" autoplay loop playsinline muted preload="auto">
  45.                     <source src="{{ media.url }}" type="{{ media.mimeType }}"/>
  46.                 </video>
  47.             </div>
  48.         {% endif %}
  49.     {% endblock %}
  50.     {% block faesslich_slider_youtube_video %}
  51.         {% if entry.useYtVideo and entry.ytVideoUrl %}
  52.             {% set ytUrl = entry.ytVideoUrl|replace({
  53.                 'www.youtube.com/embed/': 'www.youtube-nocookie.com/embed/',
  54.                 'www.youtube.com/watch?v=': 'www.youtube-nocookie.com/embed/',
  55.                 'youtube.com/embed/': 'www.youtube-nocookie.com/embed/',
  56.                 'youtube.com/watch?v=': 'www.youtube-nocookie.com/embed/',
  57.                 'youtu.be/': 'www.youtube-nocookie.com/embed/'})
  58.             %}
  59.             <div class="faesslich-slider-slide-item--yt-video">
  60.                 <iframe class="faesslich-slider-slide-item--yt-video-iframe lazyload" data-src="{{ ytUrl }}?modestbranding=1&autohide=1&autoplay=1&showinfo=0&controls=0&mute=1" allow="accelerometer; autoplay; muted; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  61.             </div>
  62.         {% endif %}
  63.     {% endblock %}
  64.     {% if entry.useMediaInsteadOfProductCover %}
  65.         {% block faesslich_slider_additional_image %}{% endblock %}
  66.     {% endif %}
  67.     {% block faesslich_slider_content %}
  68.         {% if sliderElementTopLine or sliderElementTitle or sliderElementDescription or sliderElementDescriptionAdditional or sliderElementCtaText %}
  69.             <{% if not entry.linkWholeSliderArea %}div{% else %}a href="{{ ctaUrl }}"{% endif %} class="faesslich-slider-slide-item--content">
  70.                 {% block faesslich_slider_content_inner %}
  71.                 <{% if entry.linkWholeArea and not entry.linkWholeSliderArea %}a href="{{ ctaUrl }}"{% else %}div{% endif %}
  72.                         class="faesslich-slider-slide-item--content-inner{% if not entry.hideBadges %} -badges-visible{% endif %}{% if entry.useProductCoverAsAdditionalMedia %} -additional-image-visible{% endif %}"
  73.                         {% if entry.textBoxBgColor or entry.textBoxTextColor %} style="
  74.                             {% if entry.textBoxBgColor %}background-color: {{ entry.textBoxBgColor }};{% endif %}
  75.                             {% if entry.textBoxTextColor %}color: {{ entry.textBoxTextColor }};{% endif %}
  76.                                 "{% endif %}
  77.                 >
  78.                     {% block faesslich_slider_content_inner_upper_headline %}
  79.                         {% if sliderElementTopLine and not isCarouselElement %}
  80.                             <div class="slide-item--upper-headline">{{ sliderElementTopLine|raw }}</div>
  81.                         {% endif %}
  82.                     {% endblock %}
  83.                     {% block faesslich_slider_content_inner_headline %}
  84.                         {% if sliderElementTitle %}
  85.                             <div class="slide-item--headline">{{ sliderElementTitle|raw }}</div>
  86.                         {% endif %}
  87.                     {% endblock %}
  88.                     {% block faesslich_slider_content_inner_description %}
  89.                         {% if sliderElementDescription %}
  90.                             {% if '<' not in sliderElementDescription and '>' not in sliderElementDescription %}<div class="slide-item--paragraph" {% if entry.textBoxTextColor %}style="color: {{ entry.textBoxTextColor }};"{% endif %}>{% endif %}
  91.                             {% block faesslich_slider_content_inner_description_text %}
  92.                                 {{ sliderElementDescription|raw }}
  93.                             {% endblock %}
  94.                             {% if '<' not in sliderElementDescription and '>' not in sliderElementDescription %}</div>{% endif %}
  95.                         {% endif %}
  96.                     {% endblock %}
  97.                     {% block faesslich_slider_content_inner_description_additional %}
  98.                         {% if sliderElementDescriptionAdditional %}
  99.                             {% if '<' not in sliderElementDescriptionAdditional and '>' not in sliderElementDescriptionAdditional %}<div class="slide-item--paragraph" {% if entry.textBoxTextColor %}style="color: {{ entry.textBoxTextColor }};"{% endif %}>{% endif %}
  100.                             {% block faesslich_slider_content_inner_description_additional_text %}
  101.                                 {{ sliderElementDescriptionAdditional|raw }}
  102.                             {% endblock %}
  103.                             {% if '<' not in sliderElementDescriptionAdditional and '>' not in sliderElementDescriptionAdditional %}</div>{% endif %}
  104.                         {% endif %}
  105.                     {% endblock %}
  106.                     {% block faesslich_slider_content_inner_cta %}
  107.                         {% if entry.sliderElementCtaUrl and entry.sliderElementCtaText %}
  108.                             <div class="slide-item--button-wrapper">
  109.                                 <{% if not entry.linkWholeArea and not entry.linkWholeSliderArea %}a{% else %}span{% endif %}
  110.                                         class="{% if isCarouselElement %}slide-item--inline-cta{% else %}btn btn-{{ entry.sliderElementCtaType }}{% endif %}"
  111.                                         {% if not entry.linkWholeArea %}href="{{ ctaUrl }}"{% endif %}
  112.                                         rel="noopener">
  113.                                     {% block faesslich_slider_content_inner_cta_inner %}
  114.                                         {{ entry.sliderElementCtaText|raw }}
  115.                                     {% endblock %}
  116.                                 </{% if not entry.linkWholeArea and not entry.linkWholeSliderArea %}a{% else %}span{% endif %}>
  117.                             </div>
  118.                         {% endif %}
  119.                     {% endblock %}
  120.                     {% block faesslich_slider_content_inner_cta2 %}
  121.                         {% if entry.sliderElementCta2Url and entry.sliderElementCta2Text and entry.showAdditionalCta and not entry.linkWholeArea and not entry.linkWholeSliderArea %}
  122.                             <div class="slide-item--button-wrapper ml-2">
  123.                                 <a class="{% if isCarouselElement %}slide-item--inline-cta ml-4{% else %}btn btn-{{ entry.sliderElementCta2Type }}{% endif %}"
  124.                                    href="{{ cta2Url }}"
  125.                                    rel="noopener">
  126.                                     {% block faesslich_slider_content_inner_cta2_inner %}
  127.                                         {{ entry.sliderElementCta2Text|raw }}
  128.                                     {% endblock %}
  129.                                 </a>
  130.                             </div>
  131.                         {% endif %}
  132.                     {% endblock %}
  133.                     </{% if entry.linkWholeArea and not entry.linkWholeSliderArea %}a{% else %}div{% endif %}>
  134.                     {% endblock %}
  135.             </{% if not entry.linkWholeSliderArea %}div{% else %}a{% endif %}>
  136.         {% endif %}
  137.     {% endblock %}
  138. {% endblock %}