public/themes/karen/index.html.twig line 1

Open in your IDE?
  1. {% extends getThemeDir('base.html.twig') %}
  2. {% block seo %}
  3.     {{ render_seo('homepage', null, app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}
  4. {% endblock %}
  5. {% block body %}
  6.     {% set sliders = getPostTypesOnTheme('slider') %}
  7.     {% if sliders|length > 0 %}
  8.         <div class="header">
  9.             <div class="px-3 lg:container group w-full mt-4 lg:mt-10">
  10.                 <div dir="rtl" class="swiper header-slider h-52 md:h-96 cursor-pointer">
  11.                     <div class="swiper-wrapper">
  12.                         {% for key,item in sliders %}
  13.                             <a href="{{ path('app_shop_site_products') }}" class="swiper-slide">
  14.                                 <img src="{{ getPostTypeMetaOnTheme(item , 'image') }}" class="rounded-xl" alt="">
  15.                             </a>
  16.                         {% endfor %}
  17.                     </div>
  18.                     <div class="swiper-pagination-wrapper">
  19.                         <div class="swiper-pagination"></div>
  20.                     </div>
  21.                     <div
  22.                             class="absolute z-10 bottom-5 opacity-0 invisible group-hover:opacity-100 transition-all duration-300 group-hover:visible right-6 hidden lg:flex items-center gap-x-2 child:flex-center child:w-9 child:h-9 child:cursor-pointer child:bg-white child:dark:bg-gray-800 child:text-gray-700 child:dark:text-gray-200 child:rounded-full child:shadow child-hover:text-blue-600 child-hover:dark:text-blue-500">
  23.                         <button class="button-prev">
  24.                             <svg class="size-5 -rotate-90">
  25.                                 <use href="#chevron"/>
  26.                             </svg>
  27.                         </button>
  28.                         <button class="button-next">
  29.                             <svg class="size-5 rotate-90">
  30.                                 <use href="#chevron"/>
  31.                             </svg>
  32.                         </button>
  33.                     </div>
  34.                 </div>
  35.             </div>
  36.         </div>
  37.     {% endif %}
  38.     {% include getThemeDir('modules/categories.html.twig') with {} %}
  39.     {#    {% include getThemeDir('modules/off-slider.html.twig') with {} %} #}
  40.     {% set products1 = getProducts() %}
  41.     {% include getThemeDir('modules/product-bar.html.twig') with {'title' : 'جدیدترین محصولات' ,
  42.         subtitle: "جدیدترین و بروزترین محصولات",
  43.         products:products1} %}
  44.     {% set small_banners = getPostTypesOnTheme('banner') %}
  45.     {% if small_banners|length > 0 %}
  46.         <section
  47.                 class="mx-4 lg:container mt-10 lg:mt-20 flex flex-col lg:flex-row items-center gap-5 child:rounded-xl child:overflow-hidden">
  48.             {% for key,item in small_banners|slice(0, 2) %}
  49.                 <a href="{{ getPostTypeMetaOnTheme(item , 'link') }}" class="group">
  50.                     <img src="{{ getPostTypeMetaOnTheme(item , 'image') }}"
  51.                          class="group-hover:scale-105 transition-transform duration-300"
  52.                          alt="">
  53.                 </a>
  54.             {% endfor %}
  55.         </section>
  56.     {% endif %}
  57.     {% set products3 = getProducts({} , 'default' , 10) %}
  58.         {% include getThemeDir('modules/product-bar-grid.html.twig') with {'title' : 'داغ ترین محصولات' ,
  59.             subtitle: "داغ ترین محصولات ما",
  60.             products:products3} %}
  61.     {% set products2 = getProducts({} , 'random' , 10) %}
  62.     {% include getThemeDir('modules/product-bar.html.twig') with {'title' : 'محصولات پر فروش' ,
  63.         subtitle: "پر فروش ترین محصولات",
  64.         products:products2} %}
  65.         {% include getThemeDir('modules/brand-bar.html.twig') with {} %}
  66.         {% include getThemeDir('modules/article-bar.html.twig') with {'title' : 'مقالات' , articles:[]} %}
  67. {% endblock %}