templates/base.html.twig line 105

Open in your IDE?
  1. {# templates/base.html.twig #}
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5.     <!--Import Google Icon Font-->
  6.     <link rel="icon" type="image/png" alt="Lune" href="assets/images/logo_lune.ico"/>
  7.     <title>{% block title %}Lune{% endblock %}</title>
  8.     <!--Let browser know website is optimized for mobile-->
  9.     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  10.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  11.     {% block stylesheets %}
  12.             {{ encore_entry_link_tags('app') }}>
  13.     {% endblock %}
  14. </head>
  15. <body>
  16.     <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  17.     <div class="cookies">
  18.         <div class="cookies-content">
  19.             <div class="cookies-text">
  20.                 <p>En poursuivant votre navigation sur ce site, vous acceptez l’utilisation de cookies pour vous proposer des contenus et services adaptés à vos centres d’intérêts. <a href="/PolitiqueConf">En savoir plus</a></p>
  21.             </div>
  22.             <div class="cookies-button">
  23.                 <button class="cookies-accept" onclick="acceptCookies();">Accepter</button>
  24.                 <button class="cookies-refuse">Refuser</button>
  25.             </div>
  26.         </div>
  27.     </div>
  28.     <div class="Banniere">
  29.         
  30.         <div class="logo">
  31.             <a href="{{ path('home') }}">
  32.                 <img class="img_log" src="{{ asset('build/images/LOGO_SB_deepBlue.png') }}"/>
  33.             </a>
  34.         </div>
  35.         <div class= "item-menu">
  36.             {% set k = 0 %}
  37.             {% for cat in category %}
  38.                 {% set k = k + 1 %}
  39.             {% endfor %}
  40.             {% if k > 0 %}
  41.                 <button class="item-1" id="categories2">
  42.                     {% set i = 0 %}
  43.                     {% for cat in category %}
  44.                         {% set i = i+1 %}
  45.                     {% endfor %}
  46.                     <div class="openMenu2" id="{{i}}">
  47.                         Catégories
  48.                     </div>
  49.                     
  50.                     {% set i = 0 %}
  51.                     {% set j = 0 %}
  52.                     <div id="topBar2">
  53.                         <div id="SelectionCat">
  54.                             {% for cat in category %}
  55.                                 {% set i = i+1 %}
  56.                                 <li class="listCat" id="{{i}}"><a id="{{i}}" href="#">{{cat.title}}</a></li>
  57.                             {% endfor %}
  58.                             {% set i = 0 %}
  59.                         </div>
  60.                         <div id="SelectionSousCat">
  61.                             {% for cat in category %}
  62.                             {% set i = i+1 %}
  63.                             {% set j = 0 %}
  64.                             <div id="affichageSousCat{{i}}">
  65.                                 <dl class="subMenu2">
  66.                                     {% for Souscat in sousCategory %}
  67.                                         {% if Souscat.category == cat %}
  68.                                             {% set j = j+1 %}
  69.                                             <dt class="listSousCat"><a href="{{ path('search') }}?q={{Souscat.title}}">{{Souscat.title}}</a></dt>
  70.                                         {% endif %}
  71.                                     {% endfor %}
  72.                                 </dl>
  73.                             </div>
  74.                             {% endfor %}
  75.                         </div>
  76.                     </div>
  77.                 </button>
  78.             {% else %}
  79.                     <button class="item-1">Aucune Catégorie </button>
  80.             {% endif %}
  81.             <button class="item-1" onclick="window.location.href = '{{ path('Contributeurs') }}';">Les partenaires</button>
  82.             <button class="item-1" onclick="window.location.href = '{{path('ticket')}}';">Aide</button>
  83.             {% if app.user %}
  84.                 <button class="item-1" onclick="window.location.href = '{{path('user')}}';">Mon profil</button>
  85.                 <button class="item-1" onclick="window.location.href = '{{path('favorite')}}';">Mes favoris</button>
  86.                 {% if is_granted("ROLE_MODERATOR") %}
  87.                     <button class="item-1" onclick="window.location.href = '{{ path('admin_accueil_admin') }}';">Administration</button>
  88.                 {% endif %}
  89.                 <button class="lout item-1_btn Btn_primary" onclick="window.location.href = '{{path('app_logout')}}';">Se déconnecter</button>
  90.             {% else %}
  91.                 <button class="item-1_btn Btn_primary" onclick="window.location.href = '{{path('app_login')}}';">Se connecter</button>
  92.             {% endif %}
  93.         </div>
  94.     </div>
  95.     {# <div id="notification">test</div> #}
  96.     {% for message in app.flashes('notification') %}
  97.         <div id="notification">
  98.             {{ message }}
  99.         </div>
  100.     {% endfor %}
  101. {% block content %}
  102. {% endblock %}
  103. {% block container %}
  104.         {# Permet l'affichage des détails d'un seul article
  105.     <div id = "articleBoxContainer" class="pop_article container_hidden">
  106.        
  107.     </div> #}
  108.     <div id = "questionContainer" class="popQuestion container_hidden">
  109.       <div id = "verif_form" class="modal-dialog" role="document">
  110.         <div class="modal-content rounded-4 shadow">
  111.           <div class="modal-body p-4 text-center">
  112.             <h5 id = "question" class="mb-0">Question</h5>
  113.             <p id = "questionDetail" class="mb-0">Détails</p>
  114.           </div>
  115.           <div class="modal-footer flex-nowrap p-0">
  116.             <button id= "choix-1" type="button" class="btn btn-lg btn-link fs-6 text-decoration-none col-6 m-0 rounded-0 border-right"><strong>Choix 1</strong></button>
  117.             <button id = "choix-2" type="button" class="btn btn-lg btn-link fs-6 text-decoration-none col-6 m-0 rounded-0" data-bs-dismiss="modal">Choix 2</button>
  118.           </div>
  119.         </div>
  120.       </div>
  121.        
  122.     </div>
  123.     <script type="module">
  124.         import affichage from "/assets/js/affichage.js";
  125.         affichage.init();
  126.     </script>
  127. {% endblock %}
  128. {% block scripts %}
  129.     <script src="/assets/js/bootstrap.bundle.js"></script>
  130.     <script
  131.             src="https://code.jquery.com/jquery-3.3.1.min.js"
  132.             integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  133.             crossorigin="anonymous"></script>
  134.     <!--JavaScript at end of body for optimized loading-->
  135.     <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
  136.     <script>
  137.         $(document).ready(function(){
  138.             // $('.parallax').parallax();
  139.             $('.sidenav').sidenav();
  140.             //$('select').formSelect();
  141.         });
  142.         $('#notification').delay(5000).hide(500)
  143.         function imgError(image){
  144.             image.onerror = "";
  145.             image.src = "https://images.pexels.com/photos/276452/pexels-photo-276452.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260";
  146.             return true;
  147.         }  
  148.     </script>
  149.     
  150.     <script type="module">
  151.         import home from "/assets/js/home.js";
  152.         home.init();
  153.     </script>
  154.     <script type="module">
  155.         import gestionIndicateur from "/assets/js/gestion_indicateurs.js";
  156.         gestionIndicateur.initialisation();
  157.     </script>
  158.     <script>
  159.         function acceptCookies(){
  160.             document.cookie += "acceptCookies=true;";
  161.             document.getElementsByClassName("cookies")[0].style.display = "none";
  162.         }
  163.         //$(document).ready(function(){
  164.             if(document.cookie.indexOf("acceptCookies=true") != -1){
  165.                 document.getElementsByClassName("cookies")[0].style.display = "none";
  166.             }
  167.         //});
  168.     </script>
  169.     
  170. {% endblock %} 
  171. </body>
  172. </html>