templates/includes/navbar.html.twig line 1

Open in your IDE?
  1. <style>
  2.   .navbar {
  3.     position: relative;
  4.   }
  5.   .white-bg {
  6.     position: absolute;
  7.     top: 0;
  8.     left: -1rem;
  9.     width: 140%; /* Adjust the width here (e.g., 120% or any other value you like) */
  10.     height: 100%;
  11.     background-color: white;
  12.     z-index: -1; /* Set the z-index to -1 to place it behind the navbar content */
  13.   }
  14.   .bg-white {
  15.     background-color: white;
  16.     padding: 20px; /* Add padding to the div if needed */
  17.   }
  18.   .navbar-title {
  19.     display: flex;
  20.     align-items: center;
  21.     justify-content: center;
  22.     font-size: 24px;
  23.     font-weight: bold;
  24.     text-transform: uppercase;
  25.     color: #333;
  26.     margin: 0;
  27.     padding: 10px;
  28.   }
  29.   .navbar-logo {
  30.   font-size: 24px;
  31.   font-weight: bold;
  32. }
  33. .inline-elements {
  34.     display: inline;
  35. }
  36. </style>
  37. <nav class="navbar navbar-top navbar-expand navbar-dashboard navbar-dark ps-0 pe-2 pb-0">
  38.     <input type="hidden" id="user-username" value="{{ app.user.username }}"/>
  39.     <input type="hidden" value="{{ app.user.id }}" id="user_id">
  40.  <div class="white-bg"></div>
  41.   <div class="container-fluid px-0">
  42.     <div class="d-flex justify-content-between w-100" id="navbarSupportedContent">
  43.       <div class="d-flex align-items-center navbar-title">
  44.           <button id="sidebar-toggle" class="sidebar-toggle me-3 btn btn-icon-only d-none d-lg-inline-block align-items-center justify-content-center"><svg class="toggle-icon" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path></svg></button>
  45.       {# <H2 class="mb-3">Salarie</H2> #}
  46.             <div class="navbar-logo block_page"></div>
  47.         <!-- Search form -->
  48.           {# <input type="hidden" id="dossierId" value="{{app.session.get('dossier').abreviation}}" /> #}
  49.          
  50.         <!-- / Search form -->
  51.       </div>
  52.       <!-- Navbar links -->
  53.       <ul class="navbar-nav align-items-center">
  54.       
  55.             {# <div class="navbar-logo"><h2>{{app.session.get('dossier').abreviation}}</H2></div> #}
  56.           {% set notifications = get_notifications() %}
  57.           {% set unreadClass = '' %}
  58.           {% for notification in notifications %}
  59.               {% if notification.seen == false %}
  60.                     {% set unreadClass = 'unread' %}
  61.               {% endif %}
  62.           {% endfor %}
  63.           <li class="nav-item dropdown " style="margin-right: 2rem" >
  64.               <a class=" nav-link text-dark notification-bell {{ unreadClass}} dropdown-toggle" data-unread-notifications="true" href="#" role="button" data-bs-toggle="dropdown" data-bs-display="static" aria-expanded="false">
  65.                   <svg class="icon text-gray-900" fill="currentColor" viewBox="0 0 20 20"
  66.                        xmlns="http://www.w3.org/2000/svg">
  67.                       <path d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"></path>
  68.                   </svg>
  69.               </a>
  70.               <div style="min-width: 300px" class="dropdown-menu dropdown-menu-lg dropdown-menu-center mt-2 py-0" data-bs-popper="none">
  71.                   <div class="list-group list-group-flush">
  72.                       <a href="#" class="text-center text-primary fw-bold border-bottom border-light py-3">Notifications</a>
  73.                       <div id="notification-block">
  74.                           {% for notification in notifications %}
  75.                               <a href="#" class="list-group-item list-group-item-action border-bottom">
  76.                                   <div class="row align-items-center">
  77.                                       <div class="col ps-0 ms-2">
  78.                                           <div class="d-flex justify-content-between align-items-center">
  79.                                               <div class="text-end"><small class="text-danger">{{ notification.created|date('d/m/Y H:i:s') }}</small></div>
  80.                                           </div>
  81.                                           <p class="font-small mt-1 mb-0">{{ notification.message }}.</p>
  82.                                       </div>
  83.                                   </div>
  84.                               </a>
  85.                           {% endfor %}
  86.                           <a href="#" class="dropdown-item text-center fw-bold rounded-bottom py-3" id="view-all">
  87.                               <svg class="icon icon-xxs text-gray-400 me-1" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 12a2 2 0 100-4 2 2 0 000 4z"></path><path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z" clip-rule="evenodd"></path></svg>
  88.                               View all
  89.                           </a>
  90.                       </div>
  91.                   </div>
  92.               </div>
  93.           </li>
  94.           <li>
  95.                <a href="{{ path('app_site') }}" class="navbar-logo" style="font-size: 16px;">
  96.                     <div class="inline-elements">
  97.                        <span>
  98.                             <span class="sidebar-icon">
  99.                             <i class="icon icon-xs me-2 fas fa-exchange-alt"></i>
  100.                                           </span>
  101.                             <span class="sidebar-text">{{ app.session.get('dossier').abreviation }}</span>
  102.                           </span>
  103.                     </div>
  104.                 </a>
  105.           </li>
  106.         <li class="nav-item dropdown ms-lg-3">
  107.           <a class="nav-link dropdown-toggle pt-1 px-0" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  108.             <div class="media d-flex align-items-center">
  109.               <img class="avatar rounded-circle" alt="Image placeholder" src="{{asset('assets/images/avatar-1.png')}}">
  110.               <div class="media-body ms-2 text-dark align-items-center d-none d-lg-block">
  111.                 <span class="mb-0 font-small fw-bold text-gray-900">{{app.user.username}}</span>
  112.               </div>
  113.             </div>
  114.           </a>
  115.           <div class="dropdown-menu dashboard-dropdown dropdown-menu-end mt-2 py-1">
  116.             <a class="dropdown-item d-flex align-items-center" href="#" id="changement_password">
  117.               <svg class="dropdown-icon text-gray-400 me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z" clip-rule="evenodd"></path></svg>
  118.               Changement mot de passe
  119.             </a>
  120.             
  121.             <div role="separator" class="dropdown-divider my-1"></div>
  122.             <a class="dropdown-item d-flex align-items-center" href="{{path('app_logout')}}">
  123.               <svg class="dropdown-icon text-danger me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg>                
  124.               Logout
  125.             </a>
  126.           </div>
  127.         </li>
  128.       </ul>
  129.     </div>
  130.   </div>
  131.   {# </div> #}
  132. </nav>
  133. </br>
  134. <style>
  135.         
  136. #modal_changement_password p {
  137.     font-size: 12px !important;
  138. }
  139.     
  140. </style>
  141. <div class="modal right come-from-modal fade" id="modal_changement_password" aria-labelledby="modal-default" style="display: none;" aria-hidden="true">
  142.     <div class="modal-dialog modal-dialog-top" style="width:30%;max-width:1000px !important"  role="document">
  143.         <div class="modal-content">
  144.             <div class="modal-header">
  145.                 <h2 class="modal-title">Modifier mot de passe</h2>
  146.                 <a role="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></a>
  147.             </div>
  148.             <div class="modal-body">
  149.               <form id="form_changement_password"> 
  150.                  <div class="col-md-12  ">
  151.                       <label class="text-size-12">Mot de passe actuel:</label>
  152.                       <input type="password" class="form-control" name="mdp_current" />
  153.                   </div>
  154.                  <div class="col-md-12  ">
  155.                       <label class="text-size-12">Mot de passe:</label>
  156.                       <input type="password" class="form-control" name="mdp" />
  157.                   </div>
  158.                  <div class="col-md-12  ">
  159.                       <label class="text-size-12">Confirmation mot de passe:</label>
  160.                       <input type="password" class="form-control" name="mdp_confirmation" />
  161.                   </div>
  162.               </form>
  163.             </div>
  164.             <div class="modal-footer justify-content-start" >
  165.                 <button type="submit" class="btn btn-secondary" form="form_changement_password">Enregistre</button>
  166.                 <a type="button" class="btn btn-link" data-bs-dismiss="modal">Fermer</a>
  167.             </div>
  168.         </div>
  169.     </div>
  170. </div>