templates/defaut/products.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2.  {% block head_css %}
  3.      {{ parent() }}
  4.      <link rel="stylesheet" type="text/css"
  5.            href="{{ asset('assets/vendor/choices/css/choices.min.css') }}">
  6.          <style>
  7.              @media only screen and (max-width: 754px) and (min-width: 320px) {
  8.                  .col-md-3 {
  9.                      width: 33%;
  10.                      width: calc(100%/2) !important;
  11.                      flex: none;
  12.                  }
  13.              }
  14.              .card-hover:hover {
  15.                  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15), 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  16.                  transform: translateY(-5px);
  17.                  transition: all 0.3s ease-out;
  18.              }
  19.              .card-hover:hover h2 {
  20.                  text-shadow: unset;
  21.                  -webkit-transform: translateY(0);
  22.                  -ms-transform: translateY(0);
  23.                  transform: translateY(0);
  24.                  background: #151515;
  25.                  color: #dadada;
  26.                  top: 0%;
  27.                  margin: 0;
  28.                  border: 1px solid #2d2d2d;
  29.                  border-bottom-color: rgb(45, 45, 45);
  30.                  border-bottom-style: solid;
  31.                  border-bottom-width: 1px;
  32.                  border-bottom: unset;
  33.              }
  34.              .type-item {
  35.                  position: absolute;
  36.                  top: 20%;
  37.                  left: 50%;
  38.                  transform: translate(-50%, -50%);
  39.                  z-index: 2;
  40.                  background-color: #0000008c;
  41.                  font-size: 13px;
  42.                  color: #fff;
  43.                  width: 95%;
  44.                  text-align: center;
  45.                  -webkit-transition: all .2s ease-in;
  46.                  transition: all .2s ease-in;
  47.              }
  48.              .card-hover:hover .type-item {
  49.                  transform: translate(-50%, -60%);
  50.              }
  51.              .service-card:hover h2 {
  52.                  position: absolute;
  53.                  top: 0px;
  54.                  left: 50%;
  55.                  transform: translate(-50%, 0%);
  56.                  transition: all 0.3s ease-out;
  57.              }
  58.          </style>
  59.  {% endblock %}
  60. {% block title %} {% endblock %}
  61. {% block body %}
  62.     <!-- =======================
  63.     Page Banner START -->
  64.     <section class="py-0">
  65.         <div class="container">
  66.             <div class="row">
  67.                 <div class="col-12">
  68.                         <div class="bg-light p-4 text-center rounded-3">
  69.                             <h1 class="m-0"> {{ service }} {{ category }} </h1>
  70.                             <!-- Breadcrumb -->
  71.                             <div class="d-flex justify-content-center">
  72.                                 <nav aria-label="breadcrumb">
  73.                                     <ol class="breadcrumb breadcrumb-dots mb-0">
  74.                                         <li class="breadcrumb-item"><a href="{{ path('app_defaut') }}">Accueil</a></li>
  75.                                        {# <li class="breadcrumb-item"><a
  76.                                                     href="{{ path('app_get_category', {slug: categorie.slug}) }}">{{ categorie.name }}</a>
  77.                                         </li>#}
  78.                                         <li class="breadcrumb-item active" aria-current="page"></li>
  79.                                     </ol>
  80.                                 </nav>
  81.                             </div>
  82.                         </div>
  83.                 </div>
  84.             </div>
  85.         </div>
  86.     </section>
  87.     <!-- =======================
  88.     Page Banner END -->
  89.     <!-- =======================
  90. Page content START -->
  91.     <section class="pt-5">
  92.         <div class="container">
  93.             <!-- Content and button -->
  94.             <div class="d-sm-flex justify-content-sm-between align-items-center mb-4">
  95.                 <h5 class="mb-2 mb-sm-0"></h5>
  96.             </div>
  97.             <div class="row">
  98.                 {% for product in categories %}
  99.                     <!-- Card item START -->
  100.                     <div class="col-md-3 mb-3 service-card">
  101.                         <div class="card bg-transparent card-hover">
  102.                             <a href="{{ path('app_get_product', {service: product.slug,category:product.slugcategory, slug: product.slugquality}) }}">
  103.                                 <div class="position-relative">
  104.                                     <!-- Image -->
  105.                                     <img src="/document/{{ product.socialnetwork|lower }}/category/{{ category|lower }}.svg" class="card-img" alt="{{ product.quality }}">
  106.                                     <!-- Overlay -->
  107.                                     <span class="badge type-item p-2 badge-pill">
  108.                                            <h2> </h2> {{ product.quality }}
  109.                                         </span>
  110.                                     <div class="card-img-overlay d-flex flex-column p-3">
  111.                                         <div class="w-100 mt-auto text-end">
  112.                                         </div>
  113.                                     </div>
  114.                                 </div>
  115.                             </a>
  116.                             {#<div class="card-body text-center">
  117.                                     <h5 class="card-title"><a href="{{ path('app_get_service', {slug: socialNetwork}) }}">{{ socialNetwork }}</a></h5>
  118.                                     <p class="mb-2"></p>
  119.                                     <h5 class="card-title"><a href="{{ path('app_get_service', {slug: socialNetwork}) }}" class="btn btn-primary">SECTIONNER</a></h5>
  120.                                 </div>#}
  121.                         </div>
  122.                         {# <div class="service-card-text">
  123.                                 <p>Texte à ajouter</p>
  124.                             </div>#}
  125.                     </div>
  126.                     {#{% for category in servicecategory.categories %}
  127.                         <div class="col-sm-6 col-lg-4 col-xl-3">
  128.                             <div class="card shadow">
  129.                                 <!-- Image -->
  130.                                 <a href="{{ path('app_get_category', {slug: category.slug}) }}">
  131.                                 <img src="{{ vich_uploader_asset(category,'imageFile')  }}" class="card-img-top" alt="{{ servicecategory.name }}">
  132.                                 </a>
  133.                                 <div class="card-body pb-0">
  134.                                     <!-- Badge and favorite -->
  135.                                     <div class="d-flex justify-content-between mb-2">
  136.                                         <a href="#" class="badge bg-success bg-opacity-10 text-success">{{ servicecategory.name }}</a>
  137.                                         <a href="#" class="text-danger"><i class="fas fa-heart"></i></a>
  138.                                     </div>
  139.                                     <!-- Title -->
  140.                                     <h5 class="card-title fw-normal"><a href="{{ path('app_get_category', {slug: category.slug}) }}">{{ category.name }}</a></h5>
  141.                                     <p class="mb-2 text-truncate-2"></p>
  142.                                 </div>
  143.                                 <!-- Card footer -->
  144.                                 <div class="card-footer pt-0 pb-3">
  145.                                     <hr>
  146.                                     <div class="d-flex justify-content-between ">
  147.                                         <!-- Rating star -->
  148.                                         <ul class="list-inline mb-0">
  149.                                             <li class="list-inline-item me-0 small"><i class="fas fa-star text-warning"></i>
  150.                                             </li>
  151.                                             <li class="list-inline-item me-0 small"><i class="fas fa-star text-warning"></i>
  152.                                             </li>
  153.                                             <li class="list-inline-item me-0 small"><i class="fas fa-star text-warning"></i>
  154.                                             </li>
  155.                                             <li class="list-inline-item me-0 small"><i class="fas fa-star text-warning"></i>
  156.                                             </li>
  157.                                             <li class="list-inline-item me-0 small"><i
  158.                                                         class="fas fa-star-half-alt text-warning"></i></li>
  159.                                             <li class="list-inline-item ms-2 h6 fw-light mb-0"></li>
  160.                                         </ul>
  161.                                     </div>
  162.                                 </div>
  163.                             </div>
  164.                         </div>#}
  165.                 {% else %}
  166.                     {# {% for servicecategory in service_category %}
  167.                             <div class="col-12 text-center">
  168.                             <!-- Subtitle -->
  169.                             <h2>La catégorie <span class="text-danger"> {{ servicecategory.name|lower }}</span>  est actuellement vide</h2>
  170.                             <!-- info -->
  171.                             <p class="mb-0">Consultez tous les catégories disponibles et achetez ceux qui répondent à vos besoins.</p>
  172.                             <!-- Button -->
  173.                             <a href="{{ path('app_defaut') }}" class="btn btn-primary mt-4 mb-0">Retour à l'accueil</a>
  174.                         </div>
  175.                         {% endfor %}#}
  176.                     <!-- Card item END -->
  177.                 {% endfor %}
  178.             </div>
  179.         </div>
  180.     </section>
  181.     <section class="py-5">
  182.         <div class="container">
  183.             <div class="row">
  184.                 <!-- Main content START -->
  185.                 <div class="col-12">
  186.                     <div class="row g-4">
  187.                         {#{% for categorie in categories %}#}
  188.                         <!-- Book Grid START -->
  189.                         {#{% for product in categorie.products %}
  190.                         <!-- Card item START -->
  191.                         <div class="col-sm-6 col-lg-4 col-xl-3">
  192.                             <div class="card shadow h-100">
  193.                                 <div class="position-relative">
  194.                                     <!-- Image -->
  195.                                     <img src="{{ vich_uploader_asset(product,'imageFile')  }}" class="card-img-top" width="300px" height="300px" alt="book image">
  196.                                     <!-- Overlay -->
  197.                                     <div class="card-img-overlay d-flex z-index-0 p-3">
  198.                                         <!-- Card overlay Top -->
  199.                                         <div class="w-100 mb-auto d-flex justify-content-end">
  200.                                             <!-- Card format icon -->
  201.                                             <div class="icon-md bg-dark rounded-circle fs-5">
  202.                                                 <a href="#" class="text-white"><i class="bi bi-hdd-network"></i></a>
  203.                                             </div>
  204.                                         </div>
  205.                                     </div>
  206.                                 </div>
  207.                                 <!-- Card body -->
  208.                                 <div class="card-body px-3">
  209.                                     <!-- Title -->
  210.                                     <h5 class="card-title mb-0">
  211.                                         <a href="{{ path('app_get_product', {slug: product.slug}) }}" class="stretched-link">{{ product.name }}</a>
  212.                                     </h5>
  213.                                 </div>
  214.                                 <!-- Card footer -->
  215.                                 <div class="card-footer pt-0 px-3">
  216.                                     <div class="d-flex justify-content-between align-items-center">
  217.                                         <span class="h6 fw-light mb-0"></span>
  218.                                         <!-- Price -->
  219.                                         <h5 class="text-success mb-0">{{ product.princeMin }} €</h5>
  220.                                     </div>
  221.                                 </div>
  222.                             </div>
  223.                         </div>
  224.                         <!-- Card item END -->
  225.                         {% else %}
  226.                             {% for servicecategory in categories %}
  227.                                 <div class="col-12 text-center">
  228.                                     <!-- Subtitle -->
  229.                                     <h2>La catégorie <span class="text-danger"> {{ servicecategory.name|lower }}</span>  est actuellement vide</h2>
  230.                                     <!-- info -->
  231.                                     <p class="mb-0">Consultez tous les catégories disponibles et achetez ceux qui répondent à vos besoins.</p>
  232.                                     <!-- Button -->
  233.                                     <a href="{{ path('app_defaut') }}" class="btn btn-primary mt-4 mb-0">Retour à l'accueil</a>
  234.                                 </div>
  235.                             {% endfor %}
  236.                         {% endfor %}
  237.                         {% endfor %}#}
  238.                     </div>
  239.                     <!-- Book Grid END -->
  240.                 </div>
  241.                 <!-- Main content END -->
  242.             </div><!-- Row END -->
  243.         </div>
  244.     </section>
  245.     <!-- =======================
  246.     Page content END -->
  247. {% endblock %}
  248. {% block head_js %}
  249.     {{ parent() }}
  250.     <script src="{{ asset('assets/vendor/choices/js/choices.min.j') }}"></script>
  251. {% endblock %}