templates/areas/product-trending-brick/view.html.twig line 1

Open in your IDE?
  1. {% embed 'app/area-brick-layout.html.twig' %}
  2.     {% block content %}
  3.         {% set productCategories = productCategories ?? pimcore_relations('productCategories').getElements() %}
  4.         {% if  editmode or productCategories is not empty %}
  5.             <section class="py-10 lg:pb-20">
  6.                 <div class="container">
  7.                     <div>
  8.                         <h2 class="mb-10 text-2xl md:text-4xl ">{{ 'Onze hardlopers' | trans }}</h2>
  9.                     </div>
  10.                     {% if editmode and productCategories is empty %}
  11.                         {{ info("Nog geen producten geselecteerd.")|raw }}
  12.                     {% endif %}
  13.                     <div class="!px-5 !-mx-5 sm:!px-0 sm:!mx-auto swiper product-swiper">
  14.                         <div class="swiper-wrapper">
  15.                             {% for productCategory in productCategories %}
  16.                                 <a
  17.                                     {% if productCategory.page() %}
  18.                                         href="{{ productCategory.page().url | trimUrl }}"
  19.                                     {% endif %}
  20.                                     class="!h-auto flex flex-col overflow-hidden transition rounded-md group swiper-slide hover:drop-shadow-xl"
  21.                                 >
  22.                                     {% if editmode and productCategory.page().url is not defined %}
  23.                                         {% embed 'app/editmodenotice.html.twig' %}
  24.                                             {% block title %} Er is nog geen pagina ingesteld voor dit product. {% endblock %}
  25.                                         {% endembed %}
  26.                                     {% endif %}
  27.                                     <div class="relative text-center">
  28.                                         {% if productCategory.renderThumbnail is defined %}
  29.                                             {{ productCategory.renderThumbnail('product-category-thumbnail', {
  30.                                                     'imgAttributes': {
  31.                                                         'class': 'w-full',
  32.                                                     },
  33.                                                     'pictureAttributes': {
  34.                                                         'class': 'block w-full'
  35.                                                     }
  36.                                                 })|raw }}
  37.                                         {% endif %}
  38.                                     </div>
  39.                                     <div class="flex flex-col justify-between flex-grow gap-0 bg-white">
  40.                                         <div class="px-6 pt-6 pb-7">
  41.                                             <h3 class="mb-3 text-lg font-bold md:text-xl group-hover:text-blue">{{ productCategory.name ?: productCategory.key }}</h3>
  42.                                             <div class="!text-gray-800 line-clamp-3">{{ productCategory.seo_heading_3 }}</div>
  43.                                         </div>
  44.                                         <div class="px-6 pb-8">
  45.                                             <button class="!p-0 button button__secondary button--align-left group">
  46.                                                 <span class="block">{{ 'Bekijk producten' | trans }}</span>
  47.                                                 <span class="flex items-center justify-center w-6 h-6 ml-3 bg-white rounded-full shadow-md text-blue group-hover:bg-blue group-hover:text-white">
  48.                                                     <svg class="h-3.5 w-3.5" xmlns="http://www.w3.org/2000/svg"
  49.                                                             viewBox="0 0 16 16">
  50.                                                         <path fill="currentColor" fill-rule="currentColor"
  51.                                                                 d="m6.406 15.656 6.963-6.731c.249-.24.389-.575.389-.925 0-.35-.14-.685-.389-.925L6.406.343A1.206 1.206 0 0 0 4.657.41l-.09.113a1.297 1.297 0 0 0 .154 1.67L10.731 8l-6.008 5.806a1.295 1.295 0 0 0-.065 1.783c.463.52 1.248.55 1.748.066Z"></path>
  52.                                                     </svg>
  53.                                                 </span>
  54.                                             </button>
  55.                                         </div>
  56.                                     </div>
  57.                                 </a>
  58.                             {% endfor %}
  59.                         </div>
  60.                         <div class="flex items-center justify-between gap-6 mt-6 lg:justify-end">
  61.                             <div class="flex items-center !w-auto custom-swiper-pagination"></div>
  62.                             <div class="flex gap-2.5 items-center text-blue">
  63.                                 <div class="arrow-swiper-button-prev">
  64.                                     <svg width="24px" height="18px" xmlns="http://www.w3.org/2000/svg"><g id="&gt;-Klimaatbeheersing-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" ><g id="coolworld-product-category-vd-375-v02.3" transform="translate(-296 -3452)" fill="currentColor"><g id="Group-4" transform="translate(0 3333)"><g id="components/navigation/mobile/carousel" transform="translate(21 116)"><g id="icons/ui/arrow-line-right-copy" transform="translate(275 3)"><path d="M22.659 7.643H5.095L9.92 2.817A1.328 1.328 0 1 0 8.044.939L.707 8.277a1 1 0 0 0 0 1.414l7.337 7.338a1.328 1.328 0 0 0 1.878-1.878l-4.827-4.826h17.564a1.341 1.341 0 0 0 0-2.682Z" id="arrow-line-left" transform="matrix(1 0 0 -1 0 17.968)"/></g></g></g></g></g></svg>
  65.                                 </div>
  66.                                 <div class="arrow-swiper-button-next">
  67.                                     <svg width="24px" height="18px" xmlns="http://www.w3.org/2000/svg"><g id="&gt;-Klimaatbeheersing-v2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="coolworld-product-category-vd-375-v02.3" transform="translate(-332 -3452)" fill="currentColor"><g id="Group-4" transform="translate(0 3333)"><g id="components/navigation/mobile/carousel" transform="translate(21 116)"><g id="icons/ui/arrow-line-right" transform="translate(311 3)"><path d="M22.659 7.643H5.095L9.92 2.817A1.328 1.328 0 1 0 8.044.939L.707 8.277a1 1 0 0 0 0 1.414l7.337 7.338a1.328 1.328 0 0 0 1.878-1.878l-4.827-4.826h17.564a1.341 1.341 0 0 0 0-2.682Z" id="arrow-line-right" transform="matrix(-1 0 0 1 24 0)"/></g></g></g></g></g></svg>
  68.                                 </div>
  69.                             </div>
  70.                         </div>
  71.                     </div>
  72.                 </div>
  73.             </section>
  74.         {% endif %}
  75.     {% endblock %}
  76. {% endembed %}