templates/frontoffice_bundle/base.html.twig line 1

  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <meta name="description" content="">
  7.     <meta name="author" content="">
  8.     <title>L'épicerie de Rabat</title>
  9.     <link rel="icon" href="{{ asset("bundles/Frontoffice/images/logo_link.png") }}">
  10.      <!-- Google Web Fonts -->
  11.     <link rel="preconnect" href="https://fonts.googleapis.com">
  12.     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  13.     <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Raleway:wght@600;800&display=swap" rel="stylesheet"> 
  14.     <!-- Icon Font Stylesheet -->
  15.     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css"/>
  16.     <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">
  17.     <!-- Libraries Stylesheet -->
  18.     <link href="{{ asset("bundles/Frontoffice/lib/lightbox/css/lightbox.min.css") }}" rel="stylesheet">
  19.     <link href="{{ asset("bundles/Frontoffice/lib/owlcarousel/assets/owl.carousel.min.css") }}" rel="stylesheet">
  20.         <link href="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/assets/owl.theme.default.min.css" rel="stylesheet">
  21.     <!-- Customized Bootstrap Stylesheet -->
  22.     <link href="{{ asset("bundles/Frontoffice/css/bootstrap.min.css") }}" rel="stylesheet">
  23.     <link href="{{ asset("bundles/Frontoffice/css/animate.css") }}" rel="stylesheet">
  24.     <!-- Template Stylesheet -->
  25.     <link href="{{ asset("bundles/Frontoffice/css/style.css") }}" rel="stylesheet">
  26.     <link href="{{ asset("bundles/Frontoffice/css/toastr.css") }}" rel="stylesheet">
  27. </head>
  28. <body>
  29. <style>
  30. .owl-carousel .owl-dots{
  31.     display:none !important;
  32. }
  33. </style>
  34.     <!-- Spinner Start -->
  35.         <div id="spinner" class="show w-100 vh-100 bg-white position-fixed translate-middle top-50 start-50  d-flex align-items-center justify-content-center">
  36.             <div class="spinner-grow text-primary" role="status"></div>
  37.         </div>
  38.         <!-- Spinner End -->
  39.         <!-- Navbar start -->
  40.         <div class="container-fluid fixed-top">
  41.             <div class="container topbar bg-primary d-none d-lg-block">
  42.                 <div class="d-flex justify-content-between">
  43.                     <div class="top-info ps-2">
  44.                         <small class="me-3"><i class="fas fa-phone-alt me-2 text-secondary"></i> <a href="#" class="text-white"> +212 5 37 55 66 77</a></small>
  45.                         <small class="me-3"><i class="fas fa-envelope me-2 text-secondary"></i><a href="#" class="text-white">contact@epicerie.com</a></small>
  46.                     </div>
  47.                     <div class="top-link pe-2">
  48.                         {# <a href="#" class="text-white"><small class="text-white mx-2">Politique de confidentialité</small>/</a>
  49.                         <a href="#" class="text-white"><small class="text-white mx-2">Conditions d'utilisation</small>/</a>
  50.                         <a href="#" class="text-white"><small class="text-white ms-2">Ventes et remboursements</small></a> #}
  51.                     </div>
  52.                 </div>
  53.             </div>
  54.             <div class="container px-0">
  55.                 <nav class="navbar navbar-light bg-white navbar-expand-xl">
  56.                     {# <a href="/" class="navbar-brand"><h1 class="text-primary display-6">Epicerie</h1></a> #}
  57.                     <a href="/" class="navbar-brand"><h1 class="text-primary display-6"><img src="{{ asset("bundles/Frontoffice/images/logo.jpg") }}" alt="logo" /></h1></a>
  58.                     <button class="navbar-toggler py-2 px-3" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
  59.                         <span class="fa fa-bars text-primary"></span>
  60.                     </button>
  61.                     <div class="collapse navbar-collapse bg-white" id="navbarCollapse">
  62.                         <div class="navbar-nav mx-auto">
  63.                         <a href="/" class="nav-item nav-link {% if app.request.pathinfo == '/' %}active{% endif %}">Acceuil</a>
  64.                         <a href="/products" class="nav-item nav-link {% if app.request.pathinfo == '/products' %}active{% endif %}">Produits</a>
  65.                         <a href="/propos" class="nav-item nav-link {% if app.request.pathinfo == '/propos' %}active{% endif %}">A propos</a>
  66.                         <a href="/account" class="nav-item nav-link {% if app.request.pathinfo == '/account' %}active 
  67.                             {% elseif app.request.pathinfo == '/monProfil' %}active
  68.                             {% elseif app.request.pathinfo == '/mesCommandes' %}active
  69.                             {% elseif app.request.pathinfo == '/mesCommandes/detailsCommandes/' %}active
  70.                             {% endif %}">
  71.                         Mon compte</a>
  72.                         <a href="/contact" class="nav-item nav-link {% if app.request.pathinfo == '/contact' %}active{% endif %}">Contact</a>
  73.                     </div>
  74.                         <div class="d-flex m-3 me-0">
  75.                             {# <button class="btn-search btn border border-secondary btn-md-square rounded-circle bg-white me-4" data-bs-toggle="modal" data-bs-target="#searchModal"><i class="fas fa-search text-primary"></i></button> #}
  76.                             <a href="/panier" class="position-relative me-4 my-auto">
  77.                                 <i class="fa fa-shopping-bag fa-2x"></i>
  78.                                 <span id='nbrArticle' class="position-absolute bg-secondary rounded-circle d-flex align-items-center justify-content-center text-dark px-1" style="top: -5px; left: 15px; height: 20px; min-width: 20px;">{{npanier}}</span>
  79.                             </a>
  80.                             <a href="/account" class="my-auto">
  81.                                 <i class="fas fa-user fa-2x"></i>
  82.                             </a>
  83.                         </div>
  84.                     </div>
  85.                 </nav>
  86.             </div>
  87.         </div>
  88.         <!-- Navbar End -->
  89. {% block body %}
  90. {% endblock %}
  91.         <!-- Footer Start -->
  92.         <div class="container-fluid bg-dark text-white-50 footer pt-5 mt-5">
  93.             <div class="container py-1">
  94.                 <div class="pb-4 mb-4" style="border-bottom: 1px solid rgba(226, 175, 24, 0.5) ;">
  95.                     <div class="row g-4">
  96.                         <div class="col-lg-3">
  97.                             <a href="#">
  98.                                 <h1 class="text-primary mb-0">Epicerie</h1>
  99.                                 <p class="text-secondary mb-0">Produits frais</p>
  100.                             </a>
  101.                         </div>
  102.                         <div class="col-lg-6">
  103.                             {# <div class="position-relative mx-auto">
  104.                                 <input class="form-control border-0 w-100 py-3 px-4 rounded-pill" type="number" placeholder="Votre email">
  105.                                 <button type="submit" class="btn btn-primary border-0 border-secondary py-3 px-4 position-absolute rounded-pill text-white" style="top: 0; right: 0;">S'abonner maintenant</button>
  106.                             </div> #}
  107.                         </div>
  108.                         <div class="col-lg-3">
  109.                             <div class="d-flex justify-content-end pt-3">
  110.                                 <a class="btn btn-outline-secondary me-2 btn-md-square rounded-circle" href=""><i class="fab fa-facebook-f"></i></a>
  111.                                 <a class="btn btn-outline-secondary me-2 btn-md-square rounded-circle" href=""><i class="fab fa-instagram"></i></a>
  112.                                 <a class="btn btn-outline-secondary btn-md-square rounded-circle" href=""><i class="fab fa-linkedin-in"></i></a>
  113.                             </div>
  114.                         </div>
  115.                     </div>
  116.                 </div>
  117.                 <div class="row g-5">
  118.                     <div class="col-lg-3 col-md-6">
  119.                         <div class="footer-item">
  120.                             <h4 class="text-light mb-3">Pourquoi les gens nous apprécient !</h4>
  121.                             <p class="mb-4">La mise en page du texte reste essentiellement inchangée. Elle a été popularisée dans les années 1960 avec des logiciels de mise en page comme Aldus PageMaker, incluant des passages du Lorem Ipsum.</p>
  122.                             <a href="" class="btn border-secondary py-2 px-4 rounded-pill text-primary">Lire la suite</a>
  123.                         </div>
  124.                     </div>
  125.                     <div class="col-lg-3 col-md-6">
  126.                         <div class="d-flex flex-column text-start footer-item">
  127.                             <h4 class="text-light mb-3">Menu</h4>
  128.                             <a href="/" class="btn-link {% if app.request.pathinfo == '/' %}active{% endif %}">Acceuil</a>
  129.                             <a href="/products" class="btn-link {% if app.request.pathinfo == '/products' %}active{% endif %}">Produits</a>
  130.                             <a href="/propos" class="btn-link {% if app.request.pathinfo == '/propos' %}active{% endif %}">A propos</a>
  131.                             <a href="/account" class="btn-link {% if app.request.pathinfo == '/account' %}active{% endif %}">Mon compte</a>
  132.                             <a href="/contact" class="btn-link {% if app.request.pathinfo == '/contact' %}active{% endif %}">Contact</a>
  133.                         </div>
  134.                     </div>
  135.                     <div class="col-lg-3 col-md-6">
  136.                         <div class="d-flex flex-column text-start footer-item">
  137.                             <h4 class="text-light mb-3">Categories</h4>
  138.                             <a class="btn-link" href="/products/Légumes/1/">Légumes</a>
  139.                             <a class="btn-link" href="/products/Fruits/2/">Fruits</a>                                        
  140.                             <a class="btn-link" href="/products/Poissons/3/">Poissons</a>                                        
  141.                             <a class="btn-link" href="/products/Réstauration/4/">Réstauration</a>                                        
  142.                             <a class="btn-link" href="/products/Hygiènes/5/">Hygiènes</a>                                        
  143.                             <a class="btn-link" href="/products/Alimentations_générales/6/">Alimentations générales</a>
  144.                         </div>
  145.                     </div>
  146.                     <div class="col-lg-3 col-md-6">
  147.                         <div class="footer-item">
  148.                             <h4 class="text-light mb-3">Contact</h4>
  149.                             <p>Adresse: Rabat ville </p>
  150.                             <p>Email: contact@epicerie.com</p>
  151.                             <p>Télephone: +212 5 37 55 66 77</p>
  152.                             {# <img src="img/payment.png" class="img-fluid" alt=""> #}
  153.                         </div>
  154.                     </div>
  155.                 </div>
  156.             </div>
  157.         </div>
  158.         <div class="container-fluid copyright bg-dark py-4">
  159.             <div class="container">
  160.                 <div class="row">
  161.                     <div class="col-md-6 text-center text-md-start mb-3 mb-md-0">
  162.                             <span class="text-light"><a href="#"><i class="fas fa-copyright text-light me-2"></i>Épicerie</a>, Tous droits réservés.</span>
  163.                     </div>
  164.                     <div class="col-md-6 my-auto text-center text-md-end text-white">
  165.                         Conception & Développement <a class="border-bottom" href="https://proxisoft.ma" target='blank'>PROXISOFT</a>
  166.                     </div>
  167.                 </div>
  168.             </div>
  169.         </div>
  170.         <a href="#" class="btn btn-primary border-3 border-primary rounded-circle back-to-top"><i class="fa fa-arrow-up"></i></a>   
  171.     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
  172.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"></script>
  173.     <script src="{{ asset("bundles/Frontoffice/lib/easing/easing.min.js") }}"></script>
  174.     <script src="{{ asset("bundles/Frontoffice/lib/waypoints/waypoints.min.js") }}"></script>
  175.     <script src="{{ asset("bundles/Frontoffice/lib/lightbox/js/lightbox.min.js") }}"></script>
  176.     {# <script src="{{ asset("bundles/Frontoffices/lib/owlcarousel/owl.carousel.min.js") }}"></script> #}
  177.     <script src="https://owlcarousel2.github.io/OwlCarousel2/assets/vendors/jquery.min.js"></script>
  178.     <script src="https://owlcarousel2.github.io/OwlCarousel2/assets/owlcarousel/owl.carousel.js"></script>
  179.     <script type="text/javascript" src="{{ asset('bundles/Backoffice/js/noty/packaged/jquery.noty.packaged.min.js') }}"></script>
  180.     <script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
  181.     <!-- Template Javascript -->
  182.     <script src="{{ asset("bundles/Frontoffice/js/main.js") }}"></script>
  183.     <script src="{{ asset("bundles/Frontoffice/js/toastr.js") }}"></script>
  184. <script type="text/javascript">
  185. console.log('is con')
  186.   {# $(document).ready(function() { #}
  187.     {# $.ajax({
  188.     type: 'get',
  189.     url: '/getData',
  190.     success: function(data) {
  191.         // Parse JSON data
  192.         var categories = data.categorie;
  193.         
  194.                 var categoryLinks = $('#categoryLinks');
  195.         
  196.         // Iterate over categories and generate HTML links
  197.         categories.forEach(function(category) {
  198.             // Create a new <a> element for each category
  199.             var categoryLink = $('<a class="btn-link" href="/category/' + category.id + '">' + category.titre + '</a><br/>');
  200.             // Append the <a> element to the container
  201.             categoryLinks.append(categoryLink);
  202.         });
  203.         $("#nbrArticle").html(data.panier)
  204.     }
  205. }); #}
  206.     var owl = $('.owl-carousel');
  207.     owl.owlCarousel({
  208.         items:6, 
  209.     // items change number for slider display on desktop
  210.     
  211.         loop:true,
  212.         margin:10,
  213.         autoplay:true,
  214.         autoplayTimeout:3000,
  215.         autoplayHoverPause:true
  216.     });
  217.      {# }) #}
  218.     function goToMenu(menu){
  219.         window.location = menu;
  220.     }
  221.     $( "#newsletterForm" ).submit(function( event ) {
  222.         // Stop form from submitting normally
  223.         event.preventDefault();
  224.         // Get some values from elements on the page:
  225.         var $form = $( this ),
  226.                 mail = $form.find( "input[name='email']" ).val(),
  227.                 url = $form.attr( "action" );
  228.         // Send the data using post
  229.         var posting = $.post( url, {email: mail } );
  230.         // Put the results in a div
  231.         posting.done(function( data ) {
  232.             //var content = $( data ).find( "#content" );
  233.             //$( "#result" ).empty().append( content );*/
  234.             if(data == "OK"){
  235.                 $("#rsp").css("color","green");
  236.                 document.getElementById("rsp").innerHTML = "Merci de vous avoir enregistré dans notre newsletter";
  237.             }
  238.             else{
  239.                 $("#rsp").css("color","red");
  240.                 document.getElementById("rsp").innerHTML = data;
  241.             }
  242.         });
  243.     });
  244.    
  245.     $('.input-number').change(function() {
  246.         minValue =  parseFloat($(this).attr('min'));
  247.         maxValue =  parseFloat($(this).attr('max'));
  248.         valueCurrent = parseFloat($(this).val());
  249.         
  250.         name = $(this).attr('name');
  251.         if(valueCurrent >= minValue) {
  252.             $(".btn-number[data-type='minus'][data-field='"+name+"']").removeAttr('disabled')
  253.         } else {
  254.             Swal.fire({
  255.                 icon: 'error',
  256.                 title: 'Oops...',
  257.                 text: "Désolé, la valeur minimale a été atteinte",
  258.             });
  259.             $(this).val($(this).data('oldValue'));
  260.         }
  261.         if(valueCurrent <= maxValue) {
  262.             $(".btn-number[data-type='plus'][data-field='"+name+"']").removeAttr('disabled');
  263.         } else {
  264.             Swal.fire({
  265.                 icon: 'error',
  266.                 title: 'Oops...',
  267.                 text: "Désolé, la valeur maximale a été atteinte",
  268.             });
  269.             $(this).val($(this).data('oldValue'));
  270.         }
  271.     });
  272. </script>
  273.   
  274. {% block js %}
  275. {% endblock %}
  276. </body>
  277. </html>