templates/base.html.twig line 1

Open in your IDE?
  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, shrink-to-fit=no">
  6.     <meta name="description" content="de bons ingrédients 100% français">
  7.     <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
  8.     <meta name="generator" content="Jekyll v4.1.1">
  9.     <title>{% block title %} Sur Le Pouce {% endblock %}</title>
  10.     <!-- Bootstrap core CSS -->
  11.         <link href="{{ asset('assets/css/bootstrap.min.css') }}" rel="stylesheet">
  12.     <link rel="stylesheet" href="{{ asset('assets/css/styles.css') }}">
  13.     {% block javascript %}
  14.     {% endblock %}
  15.     <style>
  16.         .bd-placeholder-img {
  17.             font-size: 1.125rem;
  18.             text-anchor: middle;
  19.             -webkit-user-select: none;
  20.             -moz-user-select: none;
  21.             -ms-user-select: none;
  22.             user-select: none;
  23.         }
  24.         @media (min-width: 768px) {
  25.             .bd-placeholder-img-lg {
  26.                 font-size: 3.5rem;
  27.             }
  28.         }
  29.     </style>
  30.     <!-- Custom styles for this template -->
  31.     <link href="{{ asset('assets/css/carousel.css') }}" rel="stylesheet">
  32. </head>
  33. <body>
  34. <header>
  35.     <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
  36.         <a class="navbar-brand" href="{{ path('home') }}">Sur Le Pouce</a>
  37.         <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
  38.             <span class="navbar-toggler-icon"></span>
  39.         </button>
  40.         <div class="collapse navbar-collapse" id="navbarCollapse">
  41.             <ul class="navbar-nav mr-auto">
  42.                 <li class="nav-item active">
  43.                     <a class="nav-link" href="{{ path('app_produit') }}">Nos produits</a>
  44.                 </li>
  45.                 <li class="nav-item active">
  46.                     <a class="nav-link" href="{{ path('app_somme_nous') }}">Qui sommes nous</a>
  47.                 </li>
  48.                 <li class="nav-item active">
  49.                     <a class="nav-link" href="{{ path('app_contact') }}">Contact</a>
  50.                 </li>
  51.                 
  52.             </ul>
  53.             <div class="navbar-item-custom">
  54.                 {% if app.user %}
  55.                 <a href="{{path('account') }}"> Mon compte  <small>({{ app.user.firstname }})</small> </a>   
  56.                 <a href="{{path('app_logout') }}"> Déconnexion </a>
  57.                 {% else %}
  58.                 <a href="{{path('app_login')}}"> connexion </a> | <a href="{{path('register')}}"> Inscription </a>
  59.                 {% endif %}
  60.             </div>
  61.                 <a href="{{path('cart')}}">
  62.                  {% set cartLength = app.session.get('cart')|length %}
  63.                   <img src="{{asset('assets/img/shopping-cart.png')}}" class="cart-icon" alt = "Mon panier">
  64.                 <span><span class="text-left">{{ app.session.get('cartLength') }}</span></span>
  65.                 {% if cartLength is defined and cartLength > 0 %}
  66.                   <span>{{ cartLength }}</span>
  67.                     {% endif %}
  68.                 </a>
  69.         </div>
  70.     </nav>
  71. </header>
  72. <main role="main">
  73. {% if block('carousel')  is defined %}
  74.     <div id="myCarousel" class="carousel slide" data-ride="carousel">
  75.         <ol class="carousel-indicators">
  76.         {% for key,header in headers %}
  77.             <li data-target="#myCarousel" data-slide-to="{{ key }}" {% if key == 0 %}class="active"{% endif %}></li>
  78.             {% endfor %}
  79.             
  80.         </ol>
  81.         <div class="carousel-inner">
  82.         {% for key,header in headers %}
  83.             
  84.             <div class="carousel-item {% if key == 0 %} active {% endif %}" style="background: url('/uploads/{{ header.illustration }}');background-size:cover; background-position:center;">
  85.                 <div class="container">
  86.                     <div class="carousel-caption text-left">
  87.                         <h1>{{ header.title }}</h1>
  88.                         <p>{{ header.content }}</p>
  89.                     </div>
  90.                 </div>
  91.             </div>
  92.         
  93.         {% endfor %}
  94.         </div>
  95.         <a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
  96.             <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  97.             <span class="sr-only">Previous</span>
  98.         </a>
  99.         <a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
  100.             <span class="carousel-control-next-icon" aria-hidden="true"></span>
  101.             <span class="sr-only">Next</span>
  102.         </a>
  103.     </div>
  104. {% endif %}
  105.     <!-- Marketing messaging and featurettes
  106.     ================================================== -->
  107.     <!-- Wrap the rest of the page in another container to center all the content. -->
  108.     <div class="container marketing {% if block('carousel')  is not defined %}mt-5{% endif %}">
  109.         {% block content %}
  110.             
  111.         {% endblock %}
  112.         <!-- /END THE FEATURETTES -->
  113.     </div><!-- /.container -->
  114.         <!-- FOOTER -->
  115.         <footer  md-6 class="footer-custom">
  116.         
  117.             <p>
  118.             &copy; 2020-2023 Sur Le Pouce
  119.             <small>Les sandwichs made in france<br/> 
  120.             
  121.             </p>
  122.         </footer>
  123. </main>
  124.     <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
  125.     <script src="{{asset('assets/js/bootstrap.bundle.js')}}"></script>
  126.     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
  127.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
  128.     <script type="text/javascript">
  129.     function placeFooter() {
  130.         if( $(document.body).height() < $(window).height() ) {
  131.             $("footer").css({position: "fixed", bottom:"0px"});
  132.         } else {
  133.             $("footer").css({position: ""});
  134.         }
  135.     }
  136.     placeFooter();
  137. </script>
  138. </body>
  139. {% block script %}
  140. {% endblock %}
  141. </html>