templates/product/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Nos produits{% endblock %}
  3. {% block body %}
  4. <!-- Navbar Start -->
  5.     <div class="container-fluid position-relative p-0">
  6.        <div class="container-fluid bg-primary py-5 bg-header" style="margin-bottom: 90px;">
  7.             <div class="row py-5">
  8.                 <div class="col-12 pt-lg-5 mt-lg-5 text-center">
  9.                     <h1 class="display-4 text-white animated zoomIn">Notre Boutique</h1>
  10.                     <a href="{{ path('home') }}" class="h5 text-white">Accueil</a>
  11.                     <i class="far fa-circle text-white px-2"></i>
  12.                     <a href="" class="h5 text-white">Boutique</a>
  13.                 </div>
  14.             </div>
  15.         </div>
  16.     </div>
  17. <!-- Navbar End -->
  18.  <!-- Shop Start -->
  19.  <div class="container-fluid pt-5">
  20.     <div class="row px-xl-5">
  21.     <!-- Shop Sidebar Start -->
  22.         <div class="col-lg-3 col-md-12">
  23.             {{ form(form) }}
  24.         </div>
  25.          <!-- Shop Product Start -->
  26.          <div class="col-lg-9 col-md-12">
  27.             <div class="row pb-3">
  28.                 <div class="col-12 pb-1">
  29.                     <div class="d-flex align-items-center justify-content-between mb-4">
  30.                         <form action="">
  31.                             <div class="input-group">
  32.                                 <input type="text" class="form-control" placeholder="Search by name">
  33.                                 <div class="input-group-append">
  34.                                     <span class="input-group-text bg-transparent text-primary">
  35.                                         <i class="fa fa-search"></i>
  36.                                     </span>
  37.                                 </div>
  38.                             </div>
  39.                         </form>
  40.                     </div>
  41.                 </div>
  42.             
  43.              {% for product in products %}
  44.                 <div class="col-lg-4 col-md-6 col-sm-12 pb-1">
  45.                     <div class="card product-item border-0 mb-4">
  46.                         <div class="card-header product-img position-relative overflow-hidden bg-transparent border p-0">
  47.                             <img class="img-fluid w-100" src="/uploads/{{product.image}}" alt="{{product.name}}" alt="">
  48.                         </div>
  49.                         <div class="card-body border-left border-right text-center p-0 pt-4 pb-3">
  50.                             <h6 class="text-truncate mb-3">{{ product.name}}</h6>
  51.                             <span class="product-subtitle text-center">{{product.subtitle}}</span>
  52.                             <div class="d-flex justify-content-center">
  53.                                 <h6>{{(product.price / 100 )|number_format(2,',', '.')}} FCFA </h6>
  54.                             </div>
  55.                         </div>
  56.                         <div class="card-footer d-flex justify-content-between bg-light border">
  57.                             <a href="{{ path('product_show', {slug: product.slug}) }}" class="btn btn-sm text-dark p-0"><i class="fas fa-eye text-primary mr-1"></i>Voir détails</a>
  58.                             <a href="{{ path('add_to_cart', {id: product.id}) }}" class="btn btn-sm text-dark p-0"><i class="fas fa-shopping-cart text-primary mr-1"></i>Ajout panier</a>
  59.                         </div>
  60.                     </div>
  61.                 </div>
  62.             {% endfor %}
  63.              <div class="col-12 pb-1">
  64.                  <nav aria-label="Page navigation">
  65.                    <ul class="pagination justify-content-center mb-3">
  66.                      <li class="page-item disabled">
  67.                        <a class="page-link" href="#" aria-label="Previous">
  68.                          <span aria-hidden="true">&laquo;</span>
  69.                          <span class="sr-only">Préc</span>
  70.                        </a>
  71.                      </li>
  72.                      <li class="page-item active"><a class="page-link" href="#">1</a></li>
  73.                      <li class="page-item"><a class="page-link" href="#">2</a></li>
  74.                      <li class="page-item"><a class="page-link" href="#">3</a></li>
  75.                      <li class="page-item">
  76.                        <a class="page-link" href="#" aria-label="Next">
  77.                          <span aria-hidden="true">&raquo;</span>
  78.                          <span class="sr-only">Suiv</span>
  79.                        </a>
  80.                      </li>
  81.                    </ul>
  82.                  </nav>
  83.              </div>
  84.          </div>
  85.      </div>
  86.      <!-- Shop Product End -->
  87.  </div>
  88. </div>
  89. <!-- Shop End -->
  90. {% endblock %}