templates/product/index.html.twig line 1

Open in your IDE?
  1. {% import "macros/product.html.twig" as productMacros %}
  2. {% import "macros/banner.html.twig" as bannerMacros %}
  3. {% import 'macros/banner-brands.html.twig' as bannerBrands %}
  4. {% import "components/product/carousel.html.twig" as categoryCarousel %}
  5. {% import "components/homepage/slider.html.twig" as homepageSlider %}
  6. {% import 'components/button.html.twig' as button %}
  7. {% extends 'base.html.twig' %}
  8. {% block title %}
  9. {{"general.products"|trans ~ " triwu_u" }}
  10. {% endblock %}
  11. {% block mainClass %}pt-20{% endblock %}
  12. {% block login %}{% endblock login %}
  13.     {% block content %}
  14.       {% include 'components/header/categories.html.twig' %}
  15.     {{ homepageSlider.create(slider, "white") }}
  16.     <section class="relative">
  17.         <section class="relative overflow-hidden">
  18.             <img src="{{ asset('build/images/bg-pattern.svg') }}" class="absolute w-full left-0 top-0 opacity-20 h-[900px] object-cover z-10"/>
  19.             <section class="py-edge tablet:px-edge bg-primary desktop:px-0 desktop:pb-10">
  20.                 <div class="relative z-10 mb-4 desktop:mb-10 flex items-center justify-center">
  21.                     <h2 class="text-sm tablet:text-2xl uppercase font-bold text-center text-white desktop:text-4xl ">
  22.                         {{ 'general.homepage_title'|trans }}
  23.                         
  24.                     </h2>
  25.                     <button data-modal="countdownProduct"  id="info-icon" class="ml-2 -mt-4 hover:cursor-pointer border-2 border-white text-white rounded-full w-4 h-4 sm:w-5 sm:h-5 flex items-center justify-center cursor-pointer">
  26.                         ?
  27.                     </button>
  28.                 </div>
  29.                 <div id="cover_carousel" class="relative z-10 flex flex-col gap-5 mx-auto desktop:max-w-7xl desktop:px-0">
  30.                     <div class="splide splide__carousel">
  31.                         <div class="splide__track">
  32.                             <div class="splide__list">
  33.                                 {% for product in pagination %}
  34.                                     <div class="splide__slide">{{ productMacros.productCard(product,groupsProducts) }}</div>
  35.                                 {% endfor %}
  36.                             </div>
  37.                         </div>
  38.                     </div>
  39.                 </div>
  40.             </section>
  41.         </section>
  42.         <section class="grid-cover">
  43.             <div class="grid-cover__container">
  44.                 {% for cat in featuredCategories %}
  45.                     {% if cat.products|length %}
  46.                         {{ categoryCarousel.create(cat.id, cat.name, cat.slug, cat.products,'default',groupsProducts) }}
  47.                     {% endif %}
  48.                 {% endfor %}
  49.                 {{ bannerMacros.homepageBanner(banners, 'banner_extra', 'primary') }}
  50.                 {{ bannerMacros.homepageBanner(banners, 'banner_sustainability', 'secondary') }}
  51.             </div>
  52.             <div>
  53.             {{ bannerBrands.create(featuredBrands) }}
  54.             {% if 'footer_banner' in banners|keys %}
  55.                 {% set b = banners.footer_banner %}
  56.                 {{ bannerMacros.productFooterBanner(b, b.key) }}
  57.             {% endif %}
  58.             
  59.             </div>
  60.         </section>
  61.     </section>
  62.     <div id="ConfirmProduct" data-modal="confirmProduct" tabindex="-1" aria-hidden="true" class="modal-app">
  63.         <div class="modal-app__backdrop"></div>
  64.         <div class="modal-app__container">
  65.             <div class="modal-app__content">
  66.                 <header>
  67.                     <h3 class="text-xl font-bold desktop:text-2xl">
  68.                         {{ "product.confirm.title" | trans }} 
  69.                     </h3>
  70.                 </header>
  71.                 <main class="leading-5 mt-3 mb-4">
  72.                     <p>{{ "product.confirm.desc" | trans }} </p>
  73.                 </main>
  74.                 <a href="{{ path('app_product_add_to_shopping_cart', {'id': '#', 'isIndividual': false, 'newCart': true}) }}" class="ConfirmButton btn btn--primary btn--md btn-buy product-card__price-block__btn">
  75.                     {{ "product.confirm.btn" | trans }} 
  76.                 </a>
  77.                 <button id="CloseConfirmProduct" type="button" class="btn btn--md w-full mt-1">
  78.                     {{ "product.confirm.cancel" | trans }} 
  79.                 </button>
  80.             </div>
  81.         </div>
  82.     </div>
  83.     {% if app.request.query.get('registered') and userId > 0 %}
  84.         <!-- Código del píxel -->
  85.         <img src='http://es.beruby.com/track/509916/dic24/{{userId}}/pixel' border='0' width='1' height='1' alt=''/> 
  86.     {% endif %}
  87. {% endblock %}