templates/home/listingGrid.html.twig line 128

  1. {% extends 'base2.html.twig' %}
  2. {% block body %}
  3.     <div class="font-inter dark:bg-background sticky-header-first-content">
  4.       <div class="dark:bg-background">
  5.   <div class="relative flex items-start pt-10">
  6.     <div
  7.   class="listing-sidebar bg-white dark:bg-foreground shadow-front-2 z-50 lg:w-80 w-full lg:sticky fixed transition-all ease-in-out translate-x-0 lg:left-0 -left-full top-20 lg:h-full h-screen"
  8. >
  9.   <div
  10.     class="border-b lg:border-gray-200 border-transparent dark:border-foreground p-5"
  11.   >
  12.     <p
  13.       class="text-gray-700 text-lg dark:text-gray-300 font-semibold lg:block hidden"
  14.     >
  15.       Filter
  16.     </p>
  17.     <div class="lg:hidden flex justify-between container mx-auto">
  18.       <svg
  19.         xmlns="http://www.w3.org/2000/svg"
  20.         class="h-6 w-6"
  21.         fill="none"
  22.         viewBox="0 0 24 24"
  23.         stroke="currentColor"
  24.         stroke-width="2"
  25.       >
  26.         <path
  27.           stroke-linecap="round"
  28.           stroke-linejoin="round"
  29.           d="M11 17l-5-5m0 0l5-5m-5 5h12"
  30.         />
  31.       </svg>
  32.       <svg
  33.         xmlns="http://www.w3.org/2000/svg"
  34.         class="h-6 w-6 close-left-sidebar"
  35.         fill="none"
  36.         viewBox="0 0 24 24"
  37.         stroke="currentColor"
  38.         stroke-width="2"
  39.       >
  40.         <path
  41.           stroke-linecap="round"
  42.           stroke-linejoin="round"
  43.           d="M6 18L18 6M6 6l12 12"
  44.         />
  45.       </svg>
  46.     </div>
  47.   </div>
  48. {{ form_start(form) }}
  49.   <div class="p-5 h-5/6 overflow-y-auto">
  50.     <!-- Search bar Start-->
  51.       <div class="">
  52.         {{ form_row(form.q, { 'attr': {'class': 'border border-gray-200 dark:border-gray-800 dark:text-gray-300 rounded-lg px-4 dark:bg-foreground py-[11px] shadow-input hover:border hover:border-blue-200 focus:border-blue-200 focus:outline-none w-5/6 mb-4'} })}}
  53.       </div>
  54.   <!-- Search bar END-->
  55.   <p
  56.       class="mb-1 text-gray-700 text-[17px] dark:text-gray-300 font-semibold lg:block hidden"
  57.     >
  58.       Les catégories
  59.     </p>
  60.   <!-- Category filter Start-->
  61.       {% block _category_widget %}
  62.           {% for child in form.Category %}
  63.               {{ form_widget(child) }}
  64.               {{ form_label(child) }}
  65.               <br>
  66.           {% endfor %}
  67.       {% endblock %}
  68.   <!-- Category filter END-->
  69.      <p
  70.       class="mb-1 mt-4 text-gray-700 text-[17px] dark:text-gray-300 font-semibold lg:block hidden"
  71.     >
  72.       Commerce véfifié
  73.     </p>
  74.     
  75.     <!-- Vefified filter Start-->
  76.       <label class="flex items-center mb-1 cursor-pointer">
  77.           {{ form_widget(form.verified) }}
  78.           <span class="ml-2 text-gray-700 text-[12px] dark:text-gray-300">
  79.               Vérifié par Best of Sarlat
  80.           </span>
  81.       </label>
  82.     <!-- Vefified filter END-->
  83.     <!-- Submit Start-->
  84.       <button
  85.       type="submit"
  86.       class="bg-blue-500 text-white hover:bg-blue-600 rounded-lg w-full p-3.5 mt-9 mb-4"
  87.     >
  88.       Lancer la recherche
  89.     </button>
  90.     <!-- Submit END-->
  91. {{ form_end(form) }}
  92.   </div>
  93. </div>
  94.     <div
  95.       class="listing-sidebar-overlay fixed w-full h-full inset-0 z-10 cursor-pointer bg-black opacity-70 hidden"
  96.     ></div>
  97.     <div class="flex-1">  
  98.       <!-- content-start  -->
  99.       <!-- main content started  -->
  100.       <div class="flex items-start">
  101.         <div class="lg:basis-96 basis-auto lg:flex-shrink-0 flex-shrink mr-7">
  102.           <div class="flex justify-between flex-wrap mb-3">
  103.             <p
  104.               class="text-lg font-semibold text-gray-500 dark:text-gray-200 p-5"
  105.             >
  106.     {% set available_shops = shops|filter(shop => shop.available == true) %}
  107.     <p>Commerces disponibles - <span class="text-gray-700">{{ available_shops|length }}</span> résultats</p>  
  108.           </div>
  109.           
  110.           <!-- start shop --> 
  111.           {% for shop in shops %}
  112.            {% if shop.available %}
  113.           <div class="pl-7 mb-5 item js-marker" data-lat="{{ shop.latitude }}" data-lng="{{ shop.longitude}}">
  114.             <a
  115.             href="{{ path('app_home_show', {'id' : shop.id })}}"
  116.             class="flex lg:flex-row flex-col bg-white shadow-front-2 dark:bg-foreground mb-7"
  117.           >
  118.           <div class="grid lg:grid-cols-1 sm:grid-cols-2 grid-cols-1 gap-7">
  119.               <div
  120.                 id="map-1"
  121.                 class="cursor-pointer overflow-hidden rounded-t-lg group"
  122.               >
  123.                 <div class="relative overflow-hidden">
  124.                   <img
  125.                     class="w-full h-80 object-cover rounded-t-lg group-hover:scale-105 transition-all"
  126.                     src="img/Image/landing-page-image/researching.jpg"
  127.                     alt=""
  128.                   />
  129.                   <div
  130.                     class="absolute bottom-0 top-1/2 flex items-start flex-col justify-end left-0 pb-5 pl-5 pt-2 card-linear-gradient w-full"
  131.                   >
  132.                   {% for category in shop.categories %}
  133.                     <span
  134.                       class="bg-pink-600 text-xs text-white rounded-full px-3 py-1 mb-3 inline-flex"
  135.                       >{{ category.name }}</span
  136.                     >
  137.                   {% endfor %}
  138.                     <div class="flex text-white items-center mb-2">
  139.                       <h2 class="text-xl capitalize font-semibold mr-2">
  140.                         {{ shop.name }}
  141.                       </h2>
  142.                       {% if shop.verified == true %}
  143.                       <svg
  144.                         width="20"
  145.                         height="20"
  146.                         viewBox="0 0 20 20"
  147.                         fill="none"
  148.                         xmlns="http://www.w3.org/2000/svg"
  149.                       >
  150.                         <path
  151.                           d="M15.6562 4.34313C16.4688 5.15625 16.6906 6.31875 16.4031 7.34688C17.3531 7.85 18 8.85 18 10C18 11.15 17.3531 12.15 16.4031 12.6531C16.7188 13.6812 16.4688 14.8156 15.6562 15.6562C14.8156 16.4688 13.6812 16.6906 12.6531 16.4031C12.15 17.3531 11.15 18 10 18C8.85 18 7.85 17.3531 7.34688 16.4031C6.31875 16.7188 5.15625 16.4688 4.34313 15.6562C3.53 14.8156 3.28125 13.6812 3.59687 12.6531C2.64687 12.15 2 11.15 2 10C2 8.85 2.64687 7.85 3.59687 7.34688C3.25312 6.31875 3.53 5.15625 4.34313 4.34313C5.15625 3.53 6.31875 3.28125 7.34688 3.59687C7.85 2.64687 8.85 2 10 2C11.15 2 12.15 2.64687 12.6531 3.59687C13.6812 3.25312 14.8156 3.53 15.6562 4.34313Z"
  152.                           fill="#00AB55"
  153.                         />
  154.                         <path
  155.                           d="M7 10L8.64645 11.6464C8.84171 11.8417 9.15829 11.8417 9.35355 11.6464L13 8"
  156.                           stroke="white"
  157.                           stroke-width="1.2"
  158.                           stroke-linecap="round"
  159.                         />
  160.                       </svg>
  161.                       {% endif %}
  162.                     </div>
  163.                     <p class="text-sm font-normal text-white mb-4">
  164.                       {{ shop.addressCity }}
  165.                     </p>
  166.                   </div>
  167.                 </div>
  168.                 <div
  169.                   class="flex justify-between p-6 bg-gray-100 dark:bg-foreground rounded-b-lg"
  170.                 >
  171.                   <div class="flex">
  172.                     <div class="flex">
  173.                       <svg
  174.                         class="w-5 mr-0 h-auto flex-shrink-0 text-yellow-400"
  175.                         xmlns="http://www.w3.org/2000/svg"
  176.                         class="h-5 w-5"
  177.                         viewBox="0 0 20 20"
  178.                         fill="currentColor"
  179.                       >
  180.                         <path
  181.                           d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
  182.                         />
  183.                       </svg>
  184.                       <svg
  185.                         class="w-5 mr-0 h-auto flex-shrink-0 text-yellow-400"
  186.                         xmlns="http://www.w3.org/2000/svg"
  187.                         class="h-5 w-5"
  188.                         viewBox="0 0 20 20"
  189.                         fill="currentColor"
  190.                       >
  191.                         <path
  192.                           d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
  193.                         />
  194.                       </svg>
  195.                       <svg
  196.                         class="w-5 mr-0 h-auto flex-shrink-0 text-yellow-400"
  197.                         xmlns="http://www.w3.org/2000/svg"
  198.                         class="h-5 w-5"
  199.                         viewBox="0 0 20 20"
  200.                         fill="currentColor"
  201.                       >
  202.                         <path
  203.                           d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
  204.                         />
  205.                       </svg>
  206.                       <svg
  207.                         class="w-5 mr-0 h-auto flex-shrink-0 text-yellow-400"
  208.                         xmlns="http://www.w3.org/2000/svg"
  209.                         class="h-5 w-5"
  210.                         viewBox="0 0 20 20"
  211.                         fill="currentColor"
  212.                       >
  213.                         <path
  214.                           d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
  215.                         />
  216.                       </svg>
  217.                       <svg
  218.                         class="w-5 mr-0 h-auto flex-shrink-0 text-yellow-400"
  219.                         xmlns="http://www.w3.org/2000/svg"
  220.                         class="h-5 w-5"
  221.                         viewBox="0 0 20 20"
  222.                         fill="currentColor"
  223.                       >
  224.                         <path
  225.                           d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
  226.                         />
  227.                       </svg>
  228.                     </div>
  229.                     <span class="text-base mx-2 dark:text-gray-100">{{ shop.rating }}</span>
  230.                     <span class="text-gray-500 dark:text-gray-400">(56)</span>
  231.                   </div>
  232.                 </div>
  233.               </div>
  234.             </div>
  235.             </a>
  236.           </div>
  237.             {% endif %}
  238.         {% endfor %}
  239.         </div>
  240. <div class="w-screen h-90 flex flex-row map-container-grid ">
  241.   <div id="map" class="float-right h-full flex-1">
  242.   </div>
  243. </div>
  244.         <button
  245.           type="button"
  246.           class="bg-white p-4 map-btn lg:hidden shadow-front-3 items-center flex fixed bottom-7 left-1/2 -translate-x-1/2"
  247.         >
  248.           <svg
  249.             class="mr-2 text-blue-500"
  250.             width="16"
  251.             height="16"
  252.             viewBox="0 0 16 16"
  253.             fill="none"
  254.             xmlns="http://www.w3.org/2000/svg"
  255.           >
  256.             <path
  257.               d="M10.6668 4.98896C10.6668 6.16693 9.04232 8.26612 8.32899 9.11184C8.15787 9.33837 7.84232 9.33837 7.67121 9.11184C6.95788 8.26612 5.33343 6.16693 5.33343 4.98896C5.33343 3.55922 6.52676 2.40002 8.0001 2.40002C9.47343 2.40002 10.6668 3.55922 10.6668 4.98896ZM8.0001 5.67934C8.49121 5.67934 8.88899 5.29316 8.88899 4.81636C8.88899 4.33978 8.49121 3.95339 8.0001 3.95339C7.50899 3.95339 7.11121 4.33978 7.11121 4.81636C7.11121 5.29316 7.50899 5.67934 8.0001 5.67934ZM11.0579 6.27911C11.069 6.25322 11.0801 6.22733 11.0912 6.19929L13.669 5.19823C14.0201 5.06231 14.4001 5.31258 14.4001 5.67934V11.5217C14.4001 11.7331 14.2668 11.923 14.0645 12.0028L10.8445 13.252V6.72355C10.9223 6.57468 10.9934 6.42798 11.0579 6.27911ZM4.94232 6.27911C5.00676 6.42798 5.07788 6.57468 5.15565 6.72355V12.1474L2.33143 13.2455C1.98121 13.362 1.6001 13.1312 1.6001 12.7644V6.92203C1.6001 6.7106 1.73288 6.50133 1.93543 6.44092L4.65788 5.38377C4.71121 5.69013 4.8201 5.99433 4.94232 6.27911ZM8.88454 9.54333C9.19343 9.18735 9.67787 8.57679 10.1334 7.90151V13.28L5.86676 12.0956V7.90151C6.32232 8.57679 6.80676 9.18735 7.11565 9.54333C7.57121 10.1151 8.42899 10.1151 8.88454 9.54333Z"
  258.               fill="currentColor"
  259.             />
  260.           </svg>
  261.           Map View
  262.         </button>
  263.       </div>
  264.     </div>
  265.   </div>
  266. </div>
  267.       <div class="scroll-top-btn opacity-0 transition-all">
  268.   <button
  269.     type="button"
  270.     class="bg-blue-500 p-2 fixed z-50 bottom-0 hover:-translate-y-2 transition-all right-0 m-10 rounded-full"
  271.   >
  272.     <svg
  273.       xmlns="http://www.w3.org/2000/svg"
  274.       class="h-6 w-6 text-white"
  275.       fill="none"
  276.       viewBox="0 0 24 24"
  277.       stroke="currentColor"
  278.       stroke-width="2"
  279.     >
  280.       <path
  281.         stroke-linecap="round"
  282.         stroke-linejoin="round"
  283.         d="M7 11l5-5m0 0l5 5m-5-5v12"
  284.       />
  285.     </svg>
  286.   </button>
  287. </div>
  288.  
  289. {% endblock %}