custom/static-plugins/NdVoorwindenTheme/src/Resources/views/storefront/element/cms-element-page-listing.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-page-listing.html.twig' %}
  2. {% set imageSize = ' h-full w-full' %}
  3. {% block element_page_listing_elongated_image_content %}
  4.     {% sw_thumbnails 'cms-image-thumbnails' with {
  5.         media: element.data.images.image_1_desktop,
  6.         attributes: {
  7.             'class': 'page-listing-img-desktop object-cover hidden lg:block rounded-sm' ~ corners ~ imageSize,
  8.             'alt': (element.data.images.image_1_desktop.alt ?: ''),
  9.             'title': (element.data.images.image_1_desktop.title ?: '')
  10.         }
  11.     } %}
  12.     <div class="ratio ratio_1x1 lg:hidden">
  13.         {% sw_thumbnails 'cms-image-thumbnails' with {
  14.             media: element.data.images.image_2_mobile,
  15.             attributes: {
  16.                 'class': 'page-listing-img-mobile rounded-sm',
  17.                 'alt': (element.data.images.image_2_mobile.alt ?: ''),
  18.                 'title': (element.data.images.image_2_mobile.title ?: '')
  19.             }
  20.         } %}
  21.     </div>
  22. {% endblock %}
  23. {% block element_page_listing_default_image_content %}
  24.     <div class="ratio ratio_1x1">
  25.         {% sw_thumbnails 'cms-image-thumbnails' with {
  26.             media: element.data.images.image_1_desktop,
  27.             attributes: {
  28.                 'class': 'page-listing-img w-auto object-cover rounded-sm' ~ corners ~ imageSize,
  29.                 'alt': (element.data.images.image_1_desktop.alt ?: ''),
  30.                 'title': (element.data.images.image_1_desktop.title ?: '')
  31.             }
  32.         } %}
  33.     </div>
  34. {% endblock %}
  35. {% block element_page_listing_text_content %}
  36.     <div class="{% if elongated %} absolute left-0 bottom-10 lg:pb-0 p-4 {% endif %}lg:flex lg:flex-col lg:flex-grow">
  37.         {% if title %}
  38.             <h2 class="h2 font-bold text-lg my-2 !font-display {% if elongated %}!text-white{% else %}text-black{% endif %} md:text-2xl">
  39.                 {{ title }}
  40.             </h2>
  41.         {% endif %}
  42.         {% if text %}
  43.             <div class="text-sm {% if elongated %}text-white pb-4 {% else %}text-black{% endif %}">
  44.                 {{ text }}
  45.             </div>
  46.         {% endif %}
  47.         {% if button.active %}
  48.             <a role="button"
  49.                class="{% if elongated %} btn-link {% else %}btn rounded-sm {{ button.type }}{% endif %} text-sm mt-2 lg:max-w-fit"
  50.                href="{{ button.url }}"
  51.                {% if button.newtab %}target="_blank"{% endif %}>
  52.                 {{ button.text }}
  53.                 {% if not elongated %}
  54.                     <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
  55.                         <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
  56.                     </svg>
  57.                 {% endif %}
  58.             </a>
  59.         {% endif %}
  60.     </div>
  61. {% endblock %}