templates/clainFront/accueil/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Accueil{% endblock %}
  3. {% block body %}
  4. {# offre du jour #}
  5. {# <div class="d-flex justify-content-center offre-title  mt-3">
  6.     <span>
  7.         Offre <span style="color: #BEB623;">du jour</span>
  8.     </span>
  9. </div> #}
  10. {# SECTION OFFRE DU JOUR #}
  11. {# <section class="first-section mb-3" id="slideshow-section" style="background-image: url({{ asset('uploads/slide/slide1.jpg')}}); background-size: cover; background-repeat: no-repeat; background-position: top; position: relative; min-height: 50vh; 
  12.          width: 100%;">
  13.     {# conteneur fluid }
  14.     <div class="container-fluid d-none">
  15.         {# two card }
  16.         <div class="row p-5" style="padding-top:200px !important;">
  17.             {% if productsDay|length == 6 %}
  18.             <div class="col-md-6">
  19.                 <div class="p-5 text-center deal-jour" style="background-color: white;">
  20.                     <span class="span">Produits <span style="color: #BEB623;">du jour</span></span>
  21.                     <div class="d-flex justify-content-center mt-3">
  22.                         <div class="col-md-6 px-2 p-1 time-end">
  23.                             Finit dans <span id="clock">{{ "now"|date("H:i:s") }}</span>
  24.                         </div>
  25.                     </div>
  26.                     <div class="row mt-4 product-list">
  27.                         {% for item in productsDayLeft %}
  28.                         <div class="col-md-4 mb-2">
  29.                             <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt=""
  30.                                 title="{{ item.description }}" class="img-fluid">
  31.                             <p class="mt-2">
  32.                                 {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  33.                             </p>
  34.                             <p><span>{{ item.priceDealer }}<s class="ms-1">{{ item.priceCust }}</s></span></p>
  35.                         </div>
  36.                         {% endfor %}
  37.                     </div>
  38.                 </div>
  39.             </div>
  40.             <div class="col-md-6">
  41.                 <div class="p-5 text-center big-save" style="background-color: white;">
  42.                     <span>Produits <span style="color: #BEB623;">du jour</span></span>
  43.                     <div class="d-flex justify-content-center mt-3">
  44.                         <div class="col-md-6 px-2 p-1 plus-marque">
  45.                             + plus de 500 marques
  46.                         </div>
  47.                     </div>
  48.                     <div class="row mt-4 product-list">
  49.                         {% for item in productsDayRight %}
  50.                         <div class="col-md-4 mb-2">
  51.                             <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt=""
  52.                                 title="{{ item.description }}" class="img-fluid">
  53.                             <p class="mt-2">
  54.                                 {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  55.                             </p>
  56.                             <p><span>{{ item.priceDealer }}<s class="ms-1">{{ item.priceCust }}</s></span></p>
  57.                         </div>
  58.                         {% endfor %}
  59.                     </div>
  60.                 </div>
  61.             </div>
  62.             {% else %}
  63.             <div class="col-md-12">
  64.                 <div class="p-5 text-center offre-jour">
  65.                     <span class="span">Produits du jour</span>
  66.                     <div class="row mt-4 product-list">
  67.                         {% for item in productsDayAll %}
  68.                         <div class="col mb-2">
  69.                             <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt=""
  70.                                 title="{{ item.description }}" class="img-fluid">
  71.                             <p class="mt-2">
  72.                                 {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  73.                             </p>
  74.                             <p><span>{{ item.priceDealer }}<s class="ms-1">{{ item.priceCust }}</s></span></p>
  75.                         </div>
  76.                         {% endfor %}
  77.                     </div>
  78.                 </div>
  79.             </div>
  80.             {% endif %}
  81.         </div>
  82.     </div>
  83.     {# produit du jour responsive }
  84.     <div class="container-fluid p-5 productDay-responsive" style="padding-top:200px !important;">
  85.         <div class="card p-3" style="color: #3B4C4E !important;">
  86.             <div class="mb-3 achat-title">
  87.                 <span>
  88.                     Produit <span style="color: #BEB623;">du jour</span>
  89.                 </span>
  90.             </div>
  91.             {# les produits }
  92.             <div class="d-flex" style="overflow-x: auto;">
  93.                 {% for item in productsDayAll %}
  94.                 <div class="col">
  95.                     <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt="" title="{{ item.description }}"
  96.                         class="img-fluid">
  97.                     <p class="mt-2">
  98.                         {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  99.                     </p>
  100.                     <p><span>{{ item.priceDealer }}<s class="ms-1">{{ item.priceCust }}</s></span></p>
  101.                 </div>
  102.                 {% endfor %}
  103.             </div>
  104.         </div>
  105.     </div>
  106.     <!-- Flèche gauche -->
  107.     <div id="prev" class="arrow left-arrow">&#10094;</div>
  108.     <!-- Flèche droite -->
  109.     <div id="next" class="arrow right-arrow">&#10095;</div>
  110. </section> #}
  111. {# SECTION SLIDE IMAGES #}
  112. <div class="image-slider" style="position: relative;">
  113.     <img src="{{ asset('uploads/slide/slide1.jpg')}}" class="img-fluid slider-image" alt="" id="sliderImage">
  114.     <div class="pt-5 container-fluid  align-items-center d-flex productDay-lg"
  115.         style="position: absolute; height:100% !important; top:0px;">
  116.         {# two card #}
  117.         <div class="row">
  118.             {% if productsDay|length == 6 %}
  119.             <div class="col-6 mt-5">
  120.                 <div class="p-3 text-center deal-jour" style="background-color: rgba(255,255,255,0.8);">
  121.                     <span class="span">Produits <span style="color: #BEB623;">du jour</span></span>
  122.                     <div class="d-flex justify-content-center mt-3">
  123.                         <div class="col-md-6 px-2 p-1 time-end">
  124.                             Finit dans <span id="clock">{{ "now"|date("H:i:s") }}</span>
  125.                         </div>
  126.                     </div>
  127.                     <div class="row mt-4 product-list">
  128.                         {% for item in productsDayLeft %}
  129.                         <div class="col-md-4 mb-2">
  130.                             <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt=""
  131.                                 title="{{ item.description }}" class="img-fluid">
  132.                             <p class="mt-2">
  133.                                 {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  134.                             </p>
  135.                             <p><span>{{ item.priceDealer|number_format('2',',',' ') }} MGA</span></p>
  136.                         </div>
  137.                         {% endfor %}
  138.                     </div>
  139.                 </div>
  140.             </div>
  141.             <div class="col-6 mt-5">
  142.                 <div class="p-3 text-center big-save" style="background-color: rgba(255,255,255,0.8);">
  143.                     <span>Produits <span style="color: #BEB623;">du jour</span></span>
  144.                     <div class="d-flex justify-content-center mt-3">
  145.                         <div class="col-md-6 px-2 p-1 plus-marque">
  146.                             + plus de 500 marques
  147.                         </div>
  148.                     </div>
  149.                     <div class="row mt-4 product-list">
  150.                         {% for item in productsDayRight %}
  151.                         <div class="col-md-4 mb-2">
  152.                             <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt=""
  153.                                 title="{{ item.description }}" class="img-fluid">
  154.                             <p class="mt-2">
  155.                                 {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  156.                             </p>
  157.                             <p><span>{{ item.priceDealer|number_format('2',',',' ') }} MGA</s></span></p>
  158.                         </div>
  159.                         {% endfor %}
  160.                     </div>
  161.                 </div>
  162.             </div>
  163.             {% else %}
  164.             <div class="col-md-12">
  165.                 <div class="p-5 text-center offre-jour">
  166.                     <span class="span">Produits du jour</span>
  167.                     <div class="row mt-4 product-list">
  168.                         {% for item in productsDayAll %}
  169.                         <div class="col mb-2">
  170.                             <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt=""
  171.                                 title="{{ item.description }}" class="img-fluid">
  172.                             <p class="mt-2">
  173.                                 {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  174.                             </p>
  175.                             <p><span>{{ item.priceDealer|number_format('2',',',' ') }} MGA</span></p>
  176.                         </div>
  177.                         {% endfor %}
  178.                     </div>
  179.                 </div>
  180.             </div>
  181.             {% endif %}
  182.         </div>
  183.     </div>
  184.     {# PRODUIT DU JOUR RESPONSIVE #}
  185.     <div class=" pb-5 pt-5 container-fluid d-none" style="position: absolute; height:100% !important; top:0px;">
  186.         <div class="d-flex justify-content-center achat-title  mt-3">
  187.             <span>
  188.                 Produits <span style="color: #BEB623;">du jour</span>
  189.             </span>
  190.         </div>
  191.         <div class="swiper mySwiper mt-3">
  192.             <div class="swiper-wrapper">
  193.                 {% for item in productsDayAll %}
  194.                 <div class="swiper-slide">
  195.                     <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt="{{ item.description }}"
  196.                         class="img-fluid rounded w-100">
  197.                 </div>
  198.                 {% endfor %}
  199.             </div>
  200.             <!-- Flèches -->
  201.             <div class="swiper-button-next"></div>
  202.             <div class="swiper-button-prev"></div>
  203.         </div>
  204.         {# <div class="d-flex mt-3 gap-3" style="overflow-x: auto; white-space: nowrap;">
  205.             {% for item in productsDayAll %}
  206.             <div class="flex-shrink-0" style="min-width: 200px;">
  207.                 <div class="p-2" style="background-color: white;">
  208.                     <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt="" title="{{ item.description }}"
  209.                         class="img-fluid rounded" width="200" height="200">
  210.                 </div>
  211.             </div>
  212.             {% endfor %}
  213.         </div> #}
  214.         {# <div class="slider-container mt-3">
  215.             {% for item in productsDayAll %}
  216.             <div style="min-width: 200px; flex-shrink: 0; scroll-snap-align: start;">
  217.                 <div class="p-2" style="background-color: white;">
  218.                     <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt="" title="{{ item.description }}"
  219.                         class="img-fluid rounded w-100">
  220.                 </div>
  221.             </div>
  222.             {% endfor %}
  223.         </div> #}
  224.         {#<div class="d-flex mt-3" style="overflow-x: auto;">
  225.             {% for item in productsDayAll %}
  226.             <div class="col-md-3">
  227.                 <div class="p-3" style="background-color: white; border-radius:20px;">
  228.                     <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt="" title="{{ item.description }}"
  229.                         class="img-fluid" width="200" height="200">
  230.                     <p class="mt-2">
  231.                         {{ (item.description|slice(0, 10)|raw)|nl2br }}...
  232.                     </p>
  233.                     <p><span>{{ item.priceDealer }}</p>
  234.                 </div>
  235.             </div>
  236.             {% endfor %}
  237.         </div>#}
  238.     </div>
  239. </div>
  240. <div class="container-fluid">
  241.     {# SWIPER SLIDER #}
  242.     {# PRODUIT DU JOUR RESPONSIVE #}
  243.     <div class="productDay-md d-none">
  244.         <div class="d-flex justify-content-center achat-title  mt-3">
  245.             <span class="text-center">
  246.                 Produits <span style="color: #BEB623;">du jour</span>
  247.             </span>
  248.         </div>
  249.         <div class="">
  250.             <div class="swiper mySwiper mt-3">
  251.                 <div class="swiper-wrapper">
  252.                     {% for item in productsDayAll %}
  253.                     <div class="swiper-slide">
  254.                         <img src="{{ asset('uploads/products/' ~ item.imageName)}}" alt="{{ item.description }}"
  255.                             class="uniform-img">
  256.                     </div>
  257.                     {% endfor %}
  258.                 </div>
  259.                 <!-- Flèches -->
  260.                 {# <div class="swiper-button-next"></div>
  261.                 <div class="swiper-button-prev"></div> #}
  262.             </div>
  263.         </div>
  264.     </div>
  265.     {# SECTION ACHETER PAR CATEGORIE #}
  266.     <section class="second-section mb-3">
  267.         {# achat par categorie #}
  268.         <div class="d-flex justify-content-center achat-title">
  269.             <span class="text-center">
  270.                 Acheter <span style="color: #BEB623;">par catégorie</span>
  271.             </span>
  272.         </div>
  273.         {# two card #}
  274.         <div class="row mt-3 mb-3 card-achat">
  275.             <div class="col-md-6">
  276.                 <div class="p-4 card-achat-one" style="background-color: #badfc2;">
  277.                     {# viva et image femme #}
  278.                     {# <div class="d-flex ">
  279.                         <div class="col-md-8">
  280.                             <h1><i>Viva</i></h1>
  281.                             <span>Votre sélection de mode</span>
  282.                             <div class="btn-profitez mt-2">
  283.                                 <div class="p-2 col-md-10">
  284.                                     <b>Profitez-en maintenant</b>
  285.                                 </div>
  286.                             </div>
  287.                         </div>
  288.                         <div class="col-md-4">
  289.                             <div class="img-femme">
  290.                                 <img src="{{ asset('img/femme.png')}}" alt="" class="img-fluid">
  291.                             </div>
  292.                         </div>
  293.                     </div> #}
  294.                     <div class="row mb-4">
  295.                         <h1><i>Sélection de mode</i></h1>
  296.                         {# <span>Votre sélection de mode</span> #}
  297.                         <div class="btn-profitez mt-2">
  298.                             <div class="p-2 col-md-10">
  299.                                 <b>Profitez-en maintenant</b>
  300.                             </div>
  301.                         </div>
  302.                     </div>
  303.                     {# produits femme #}
  304.                     <div class="row viva-product align-items-center justify-content-center">
  305.                         {% for item in priceMode %}
  306.                         <div class="col mb-2">
  307.                             <div class="p-2">
  308.                                 <img src="{{ asset('uploads/products/' ~ item.productImage)}}" alt=""
  309.                                     class="img-fluid ">
  310.                                 <span>{{ item.prix|number_format(0, ',', ' ') }} MGA</span>
  311.                                 <p style="white-space:nowrap;">{{ item.productTitle|slice(0, 16) ~
  312.                                     (item.productTitle|length > 16 ? '...' : '') }}</p>
  313.                             </div>
  314.                         </div>
  315.                         {% endfor %}
  316.                         {# <div class="col-md-4 mx-3 p-2">
  317.                             <img src="{{ asset('img/viva-2.png')}}" alt="" class="img-fluid">
  318.                             <span>US $13.94</span><s>US $35.75</s>
  319.                         </div>
  320.                         <div class="col-md-4 p-2">
  321.                             <img src="{{ asset('img/viva-3.png')}}" alt="" class="img-fluid">
  322.                             <span>US $13.94</span><s>US $35.75</s>
  323.                         </div> #}
  324.                     </div>
  325.                 </div>
  326.             </div>
  327.             <div class="col-md-6">
  328.                 <div class="row cat-produit" style="position: relative;">
  329.                     {# liste des catégories #}
  330.                     {% for item in catTable %}
  331.                     <div class="col-md-6 mb-3 produit-item" style="display: none;">
  332.                         <a onclick="window.location='{{ path('app_cat_search', {'query': item.title }) }}'"
  333.                             style="cursor:pointer;">
  334.                             <img src="{{ asset('uploads/categories/' ~ item.image )}}" alt="" class="img-fluid"
  335.                                 style="height: 100% !important;">
  336.                             <span
  337.                                 style="color: rgb(255, 255, 255); font-weight: 700; background-color: rgba(0, 0, 0, 0.6); display: inline-block; white-space: nowrap; padding: 5px 10px;">
  338.                                 {{ item.title }}
  339.                             </span>
  340.                         </a>
  341.                     </div>
  342.                     {% endfor %}
  343.                     {# boutton de navigation pour les catégories #}
  344.                     <div class="d-flex justify-content-between align-items-center btn-cat-nav">
  345.                         <button id="prevBtn" class="btn" disabled style="background-color: #4597A4;">
  346.                             <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="white"
  347.                                 class="bi bi-chevron-left" viewBox="0 0 16 16">
  348.                                 <path fill-rule="evenodd"
  349.                                     d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0" />
  350.                             </svg>
  351.                         </button>
  352.                         <button id="nextBtn" class="btn" style="background-color: #4597A4;">
  353.                             <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="white"
  354.                                 class="bi bi-chevron-right" viewBox="0 0 16 16">
  355.                                 <path fill-rule="evenodd"
  356.                                     d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708" />
  357.                             </svg>
  358.                         </button>
  359.                     </div>
  360.                 </div>
  361.             </div>
  362.         </div>
  363.         <div class="cat-md d-none">
  364.             <div class="swiper mySwiper mt-3">
  365.                 <div class="swiper-wrapper">
  366.                     {% for item in catTable %}
  367.                     <div class="swiper-slide">
  368.                         <a href="" style="cursor:pointer;">
  369.                             <img src="{{ asset('uploads/categories/' ~ item.image )}}" alt="" class="uniform-img">
  370.                             <span
  371.                                 style="color: rgb(255, 255, 255); font-weight: 700; background-color: rgba(0, 0, 0, 0.6); display: inline-block; white-space: nowrap; padding: 5px 10px;">
  372.                                 {{ item.title }}
  373.                             </span>
  374.                         </a>
  375.                     </div>
  376.                     {% endfor %}
  377.                 </div>
  378.                 <!-- Flèches -->
  379.                 {# <div class="swiper-button-next"></div>
  380.                 <div class="swiper-button-prev"></div> #}
  381.             </div>
  382.         </div>
  383.     </section>
  384.     <section class="produitDeMarque">
  385.         <div class="d-flex justify-content-center other-title mb-3">
  386.             <span class="text-center">
  387.                 Produits <span style="color: #BEB623;">de marque</span>
  388.             </span>
  389.         </div>
  390.         <hr>
  391.         <h5>Chaussures de marque.</h5>
  392.         <hr>
  393.         <div class="row">
  394.             {% for product in chaussures %}
  395.             <div class="col-md-2 p-2 other-product  mb-2"
  396.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  397.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  398.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  399.                         style="font-size: 13px;">MGA</span></span>
  400.                 <p>
  401.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  402.                 </p>
  403.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  404.                     <div class="col-md-12 mb-2">
  405.                         <div class="article-simi p-2 px-4">
  406.                             <span style="font-size: 15px;">Fiche produit</span>
  407.                         </div>
  408.                     </div>
  409.                 </div>
  410.                 <div class="overlay-panier">
  411.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  412.                         style="text-decoration: none; color:white;">
  413.                         <i class="bi bi-cart fs-2"></i>
  414.                     </a>
  415.                 </div>
  416.             </div>
  417.             {% endfor %}
  418.         </div>
  419.         <hr>
  420.         <h5>Montres de marque.</h5>
  421.         <hr>
  422.         <div class="row">
  423.             {% for product in montres %}
  424.             <div class="col-md-2 p-2 other-product  mb-2"
  425.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  426.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  427.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  428.                         style="font-size: 13px;">MGA</span></span>
  429.                 <p>
  430.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  431.                 </p>
  432.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  433.                     <div class="col-md-12 mb-2">
  434.                         <div class="article-simi p-2 px-4">
  435.                             <span style="font-size: 15px;">Fiche produit</span>
  436.                         </div>
  437.                     </div>
  438.                 </div>
  439.                 <div class="overlay-panier">
  440.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  441.                         style="text-decoration: none; color:white;">
  442.                         <i class="bi bi-cart fs-2"></i>
  443.                     </a>
  444.                 </div>
  445.             </div>
  446.             {% endfor %}
  447.         </div>
  448.         <hr>
  449.         <h5>Pour femme</h5>
  450.         <hr>
  451.         <div class="row">
  452.             {% for product in femmes %}
  453.             <div class="col-md-2 p-2 other-product  mb-2"
  454.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  455.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  456.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  457.                         style="font-size: 13px;">MGA</span></span>
  458.                 <p>
  459.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  460.                 </p>
  461.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  462.                     <div class="col-md-12 mb-2">
  463.                         <div class="article-simi p-2 px-4">
  464.                             <span style="font-size: 15px;">Fiche produit</span>
  465.                         </div>
  466.                     </div>
  467.                 </div>
  468.                 <div class="overlay-panier">
  469.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  470.                         style="text-decoration: none; color:white;">
  471.                         <i class="bi bi-cart fs-2"></i>
  472.                     </a>
  473.                 </div>
  474.             </div>
  475.             {% endfor %}
  476.         </div>
  477.         <hr>
  478.         <h5>Timberland</h5>
  479.         <hr>
  480.         <div class="row">
  481.             {% for product in timberlands %}
  482.             <div class="col-md-2 p-2 other-product  mb-2"
  483.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  484.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  485.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  486.                         style="font-size: 13px;">MGA</span></span>
  487.                 <p>
  488.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  489.                 </p>
  490.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  491.                     <div class="col-md-12 mb-2">
  492.                         <div class="article-simi p-2 px-4">
  493.                             <span style="font-size: 15px;">Fiche produit</span>
  494.                         </div>
  495.                     </div>
  496.                 </div>
  497.                 <div class="overlay-panier">
  498.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  499.                         style="text-decoration: none; color:white;">
  500.                         <i class="bi bi-cart fs-2"></i>
  501.                     </a>
  502.                 </div>
  503.             </div>
  504.             {% endfor %}
  505.         </div>
  506.         <hr>
  507.         <h5>Air Jord</h5>
  508.         <hr>
  509.         <div class="row">
  510.             {% for product in airs %}
  511.             <div class="col-md-2 p-2 other-product  mb-2"
  512.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  513.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  514.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  515.                         style="font-size: 13px;">MGA</span></span>
  516.                 <p>
  517.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  518.                 </p>
  519.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  520.                     <div class="col-md-12 mb-2">
  521.                         <div class="article-simi p-2 px-4">
  522.                             <span style="font-size: 15px;">Fiche produit</span>
  523.                         </div>
  524.                     </div>
  525.                 </div>
  526.                 <div class="overlay-panier">
  527.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  528.                         style="text-decoration: none; color:white;">
  529.                         <i class="bi bi-cart fs-2"></i>
  530.                     </a>
  531.                 </div>
  532.             </div>
  533.             {% endfor %}
  534.         </div>
  535.         <hr>
  536.         <h5>Gucci</h5>
  537.         <hr>
  538.         <div class="row">
  539.             {% for product in guccis %}
  540.             <div class="col-md-2 p-2 other-product  mb-2"
  541.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  542.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  543.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  544.                         style="font-size: 13px;">MGA</span></span>
  545.                 <p>
  546.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  547.                 </p>
  548.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  549.                     <div class="col-md-12 mb-2">
  550.                         <div class="article-simi p-2 px-4">
  551.                             <span style="font-size: 15px;">Fiche produit</span>
  552.                         </div>
  553.                     </div>
  554.                 </div>
  555.                 <div class="overlay-panier">
  556.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  557.                         style="text-decoration: none; color:white;">
  558.                         <i class="bi bi-cart fs-2"></i>
  559.                     </a>
  560.                 </div>
  561.             </div>
  562.             {% endfor %}
  563.         </div>
  564.         <hr>
  565.         <h5>Alo</h5>
  566.         <hr>
  567.         <div class="row">
  568.             {% for product in alos %}
  569.             <div class="col-md-2 p-2 other-product  mb-2"
  570.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  571.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  572.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  573.                         style="font-size: 13px;">MGA</span></span>
  574.                 <p>
  575.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  576.                 </p>
  577.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  578.                     <div class="col-md-12 mb-2">
  579.                         <div class="article-simi p-2 px-4">
  580.                             <span style="font-size: 15px;">Fiche produit</span>
  581.                         </div>
  582.                     </div>
  583.                 </div>
  584.                 <div class="overlay-panier">
  585.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  586.                         style="text-decoration: none; color:white;">
  587.                         <i class="bi bi-cart fs-2"></i>
  588.                     </a>
  589.                 </div>
  590.             </div>
  591.             {% endfor %}
  592.         </div>
  593.         <hr>
  594.         <h5>Louis Vuitton</h5>
  595.         <hr>
  596.         <div class="row">
  597.             {% for product in louis %}
  598.             <div class="col-md-2 p-2 other-product  mb-2"
  599.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  600.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  601.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  602.                         style="font-size: 13px;">MGA</span></span>
  603.                 <p>
  604.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  605.                 </p>
  606.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  607.                     <div class="col-md-12 mb-2">
  608.                         <div class="article-simi p-2 px-4">
  609.                             <span style="font-size: 15px;">Fiche produit</span>
  610.                         </div>
  611.                     </div>
  612.                 </div>
  613.                 <div class="overlay-panier">
  614.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  615.                         style="text-decoration: none; color:white;">
  616.                         <i class="bi bi-cart fs-2"></i>
  617.                     </a>
  618.                 </div>
  619.             </div>
  620.             {% endfor %}
  621.         </div>
  622.         <hr>
  623.         <h5>Christian Dior</h5>
  624.         <hr>
  625.         <div class="row">
  626.             {% for product in diors %}
  627.             <div class="col-md-2 p-2 other-product  mb-2"
  628.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  629.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  630.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  631.                         style="font-size: 13px;">MGA</span></span>
  632.                 <p>
  633.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  634.                 </p>
  635.                 <div class="d-flex flex-column justify-content-center align-items-center overlay">
  636.                     <div class="col-md-12 mb-2">
  637.                         <div class="article-simi p-2 px-4">
  638.                             <span style="font-size: 15px;">Fiche produit</span>
  639.                         </div>
  640.                     </div>
  641.                 </div>
  642.                 <div class="overlay-panier">
  643.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  644.                         style="text-decoration: none; color:white;">
  645.                         <i class="bi bi-cart fs-2"></i>
  646.                     </a>
  647.                 </div>
  648.             </div>
  649.             {% endfor %}
  650.         </div>
  651.         
  652.     </section>
  653.     {# SECTION VOUS AIMEREZ AUSSI #}
  654.     {# <section class="second-section">
  655.         {# vous aimerez aussi }
  656.         <div class="d-flex justify-content-center other-title mb-3">
  657.             <span class="text-center">
  658.                 Vous <span style="color: #BEB623;">aimerez aussi</span>
  659.             </span>
  660.         </div>
  661.         {# liste produits }
  662.         {% if taobaoProducts['error'] is defined %}
  663.         <div class="row">
  664.             <center>
  665.                 <div class="card col-6 p-3" style="color: #858796 !important;">
  666.                     <h4 class="mb-3"><strong>Erreur {{taobaoProducts.codeError}} </strong></h4>
  667.                     <h5>Des produits doivent s'afficher ici.</h5>
  668.                     <span>Si ce n'est pas le cas, veuillez actualiser la page ou nous contacter.</span>
  669.                     <a href="" class="btn mt-2"
  670.                         style="background-color: #4597A4 !important; color:white;">Actualiser</a>
  671.                 </div>
  672.             </center>
  673.         </div>
  674.         {% else %}
  675.         <div class="row">
  676.             {% set lastProduct = null %}
  677.             {% if taobaoProducts is not empty %}
  678.             {% for product in taobaoProducts %}
  679.             <div class="col-md-2 p-2 other-product  mb-2"
  680.                 onclick="window.location='{{ path('app_fiche_produit', {'id': product.num_iid})}}'">
  681.                 <img src="{{product.pic_url}}" alt="" title="{{ product.title }}" class="img-fluid mb-3">
  682.                 <span style="font-size: 18px; font-weight:700;">{{product.price|number_format('2', ',', ' ')}} <span
  683.                         style="font-size: 13px;">MGA</span></span>
  684.                 <p>
  685.                     {{ (product.title|slice(0,30)|raw)|nl2br }}...
  686.                 </p>
  687.                 {# <div class="d-flex flex-column justify-content-center align-items-center overlay">
  688.                     <div class="col-md-12 mb-2">
  689.                         <div class="article-simi p-2 px-4">
  690.                             <span style="font-size: 15px;">Articles similaires</span>
  691.                         </div>
  692.                     </div>
  693.                 </div> }
  694.                 <div class="overlay-panier">
  695.                     <a href="{{ path('app_fiche_produit', {'id': product.num_iid})}}"
  696.                         style="text-decoration: none; color:white;">
  697.                         <i class="bi bi-cart fs-2"></i>
  698.                     </a>
  699.                 </div>
  700.             </div>
  701.             {% endfor %}
  702.             {% else %}
  703.             <p>Aucun produit trouvé.</p>
  704.             {% endif %}
  705.         </div>
  706.         {# boutton voir plus }
  707.         <div class="mt-4 d-flex justify-content-center">
  708.             <div class="col-md-2 p-2 text-center btn-voir-plus">
  709.                 <i class="bi bi-arrow-repeat"></i> Charger plus...
  710.             </div>
  711.         </div>
  712.         {% endif %}
  713. </div> #}
  714. </div>
  715. {# script pour le date #}
  716. <script>
  717.     function updateClock() {
  718.         let now = new Date();
  719.         let timeString = now.toLocaleTimeString('fr-FR'); // Format HH:MM:SS
  720.         document.getElementById('clock').textContent = timeString;
  721.     }
  722.     setInterval(updateClock, 1000); // Mise à jour chaque seconde
  723.     updateClock(); // Appel initial
  724. </script>
  725. {# image slide produit du jour #}
  726. {# //
  727. <script>
  728.     //     // Liste des images pour le diaporama
  729.     //     const images = [
  730.     //         "{{ asset('uploads/slide/slide1.jpg') }}",
  731.     //         "{{ asset('uploads/slide/slide2.jpg') }}",
  732.     //         "{{ asset('uploads/slide/slide3.jpg') }}",
  733.     //         "{{ asset('uploads/slide/slide6.jpg') }}",
  734.     //         "{{ asset('uploads/slide/slide9.avif') }}"
  735.     //     ];
  736.     //     let currentIndex = 0;  // Index de l'image actuelle
  737.     //     const section = document.getElementById('slideshow-section');
  738.     //     // Fonction pour changer l'image de fond
  739.     //     function changeBackground() {
  740.     //         section.style.transition = 'background-image 1s ease-in-out';  // Animation de transition
  741.     //         section.style.backgroundImage = `url('${images[currentIndex]}')`;
  742.     //     }
  743.     //     // Slide automatique toutes les 5 secondes
  744.     //     setInterval(function() {
  745.     //         currentIndex = (currentIndex + 1) % images.length;
  746.     //         changeBackground();
  747.     //     }, 10000);
  748.     //     // Navigation manuelle avec les flèches
  749.     //     document.getElementById('prev').addEventListener('click', function() {
  750.     //         currentIndex = (currentIndex - 1 + images.length) % images.length;
  751.     //         changeBackground();
  752.     //     });
  753.     //     document.getElementById('next').addEventListener('click', function() {
  754.     //         currentIndex = (currentIndex + 1) % images.length;
  755.     //         changeBackground();
  756.     //     });
  757.     //     // Initial image
  758.     //     changeBackground();
  759.     // </script> #}
  760. <script>
  761.     const images = [
  762.         "{{ asset('uploads/slide/slide1.jpg') }}",
  763.         "{{ asset('uploads/slide/slide2.jpg') }}",
  764.         "{{ asset('uploads/slide/slide3.jpg') }}",
  765.         "{{ asset('uploads/slide/slide6.jpg') }}",
  766.     ];
  767.     let index = 0;
  768.     const imageElement = document.getElementById('sliderImage');
  769.     setInterval(() => {
  770.         index = (index + 1) % images.length;
  771.         // Ajoute la classe d'animation de transition
  772.         imageElement.classList.add('fade-out');
  773.         // Attends la fin de l'animation avant de changer l'image
  774.         setTimeout(() => {
  775.             imageElement.src = images[index];
  776.             imageElement.classList.remove('fade-out');
  777.         }, 500); // Durée de l'animation (500ms)
  778.     }, 5000); // Change d’image toutes les 5 secondes
  779. </script>
  780. {% endblock %}