public/themes/karen/modules/categories.html.twig line 1

Open in your IDE?
  1. {% set productCategories = getProductCategories() %}
  2.         {% if productCategories|length > 0 %}
  3.             <section class="mx-4 lg:container mt-20">
  4.                 <div
  5.                         class="flex flex-col gap-y-4 xs:flex-row items-center justify-between w-full text-center xs:text-start">
  6.                     <div class="flex items-center gap-x-2 sm:gap-x-4">
  7.                     <span class="size-12 hidden xs:flex rounded-lg bg-white shadow-lg dark:bg-gray-800 flex-center">
  8.                         <svg class="size-7 text-gray-700 dark:text-gray-100">
  9.                             <use href="#squares"></use>
  10.                         </svg>
  11.                     </span>
  12.                         <div class="space-y-1 md:space-y-1">
  13.                             <h3 class="text-xl md:text-2xl font-MorabbaMedium text-gray-800 dark:text-gray-50">دسـته
  14.                                 بندی
  15.                                 هـای
  16.                                 <span class="text-blue-600 dark:text-blue-500">محبوب</span>
  17.                             </h3>
  18.                             <p class="text-sm text-gray-500 dark:text-gray-300">جدیدترین و بروزترین دسته بندی ها</p>
  19.                         </div>
  20.                     </div>
  21.                     <div class="w-full xs:w-auto flex justify-center items-center gap-x-2">
  22.                         <a href="{{ path('app_shop_site_products') }}"
  23.                            class="group shadow-xl text-sm md:text-base flex gap-x-1.5 items-center px-2 h-10 md:px-3 text-white bg-blue-600 rounded-xl">
  24.                             <p>مشاهده همه</p>
  25.                             <span
  26.                                     class="w-7 h-7 rounded-full bg-blue-500 flex-center md:group-hover:-translate-x-1 transition-transform duration-300">
  27.                             <svg class="size-5">
  28.                                 <use href="#arrow"/>
  29.                             </svg>
  30.                         </span>
  31.                         </a>
  32.                     </div>
  33.                 </div>
  34.                 <div class="flex items-center justify-evenly flex-wrap mt-12 child:mb-8 gap-x-8 child:items-center child:flex-col child:duration-300 child:cursor-pointer child:gap-y-1 child:text-gray-800 child:dark:text-gray-300 child:relative">
  35.             {% for category in productCategories %}
  36.                     <a href="{{ path('app_shop_site_product_category' , {'urlSlug' : category.urlSlug}) }}" class="group flex">
  37.                         <img src="{{ category.imageUrl }}"
  38.                              class="w-[100px] h-[100px] lg:w-[120px] lg:h-[120px] object-cover group-hover:grayscale group-hover:opacity-90 duration-300"
  39.                              alt="category1"/>
  40.                         <p class="pt-1 text-sm lg:text-lg line-clamp-1">
  41.                             {{ category.name }}
  42.                         </p>
  43.                     </a>
  44.             {% endfor %}
  45.                 </div>
  46.             </section>
  47.         {% endif %}