templates/menu/menu.side.html.twig line 1

Open in your IDE?
  1. <div id="admin-left-sidebar" class="sidebar sidebar-dark sidebar-main sidebar-expand-lg sidebar-main-resize mini large-screen">
  2.     <!-- App logo and controls -->
  3.     <div id="admin-left-logo" class="navbar navbar-dark bg-dark-100 navbar-static border-0">
  4.         <div class="navbar-brand flex-fill wmin-0">
  5.             <img id="menu-logo" src="{{ asset('images/logo2-1.svg') }}" class="sidebar-resize-hide" alt="">
  6.             <img id="menu-logo2" src="{{ asset('images/logo2-2.svg') }}" class="sidebar-resize-hide hiddenText" alt="">
  7.         </div>
  8.     </div>
  9.     <!-- /app logo and controls -->
  10.     <hr>
  11.     <!-- Sidebar content -->
  12.     <div class="l-navbar" id="nav-bar">
  13.         <nav class="nav">
  14.             <div>
  15.                 <div class="nav_list">
  16.                     <ul class="menu_items">
  17.                         {% include 'menu/menu.html.twig' %}
  18.                     </ul>
  19.                 </div>
  20.             </div>
  21.         </nav>
  22.     </div>
  23.     <!-- /sidebar content -->
  24.     {% if has_parameter_granted('multilingual') %}
  25.     <!-- Flags -->
  26.     <div id="admin-left-flags" class="language-switcher">
  27.            <!--
  28.         <a href="{{ get_url_with_locale(app.request.uri, 'en') }}">
  29.             <img src="{{ asset('build/images/flags/en.png') }}" title="{{ 'language.en'|trans({},'country') }}" alt="{{ 'language.en'|trans({},'country') }}">
  30.         </a>
  31.         -->
  32.         <a href="{{ get_url_with_locale(app.request.uri, 'fr') }}">
  33.             <img src="{{ asset('build/images/flags/fr.png') }}" title="{{ 'language.fr'|trans({},'country') }}" alt="{{ 'language.fr'|trans({},'country') }}">
  34.         </a>
  35.         <a href="{{ get_url_with_locale(app.request.uri, 'de') }}">
  36.             <img src="{{ asset('build/images/flags/de.png') }}" title="{{ 'language.de'|trans({},'country') }}" alt="{{ 'language.de'|trans({},'country') }}">
  37.         </a>
  38.     </div>
  39.     <!-- /flags -->
  40.     {% endif %}
  41. </div>
  42. <script>
  43.     $(document).ready(function() {
  44.         $(".content-wrapper").mousemove(
  45.             // Mouse enter page content (to remove menu display bug)
  46.             function() {
  47.                 // Hide fields
  48.                 displayFields(false);
  49.             }
  50.         );
  51.         $("#menu-logo2").click(
  52.             // Click on logo => back to home
  53.             function() {
  54.                 window.location.href = "{{ path('home') }}"
  55.             }
  56.         );
  57.         $("#admin-left-sidebar").hover(
  58.             // Mouse enter left menu
  59.             function() {
  60.                 // Display menu text
  61.                 setTimeout(function () {
  62.                     displayFields(true);
  63.                 }, 150); /* delay of css transition */
  64.             },
  65.             // Mouse leave left menu
  66.             function() {
  67.                 // Hide menu text
  68.                 displayFields(false);
  69.             }
  70.         );
  71.         $(".nav_list").hover(
  72.             // Mouse enter left menu
  73.             function() {
  74.                 // Display menu text
  75.                 setTimeout(function () {
  76.                     displayFields(true);
  77.                 }, 150); /* delay of css transition */
  78.             }
  79.         );
  80.         function displayFields(display) {
  81.             if (display) {
  82.                 $("#admin-left-sidebar .nav_name, #admin-left-sidebar .badgeMenu").each(function() {
  83.                     if ($(this).hasClass("hiddenText")) {
  84.                         $(this).removeClass("hiddenText");
  85.                         $(this).addClass("visibleText");
  86.                     }
  87.                 });
  88.                 $("#menu-logo2").each(function() {
  89.                     if ($(this).hasClass("hiddenText")) {
  90.                         $(this).removeClass("hiddenText");
  91.                         $(this).addClass("visibleText");
  92.                     }
  93.                 });
  94.                 $("#menu-logo").each(function() {
  95.                     if ($(this).hasClass("visibleText")) {
  96.                         $(this).removeClass("visibleText");
  97.                         $(this).addClass("hiddenText");
  98.                     }
  99.                 });
  100.             } else {
  101.                 $("#admin-left-sidebar .nav_name, #admin-left-sidebar .badgeMenu").each(function() {
  102.                     if ($(this).hasClass("visibleText")) {
  103.                         $(this).removeClass("visibleText");
  104.                         $(this).addClass("hiddenText");
  105.                     }
  106.                 });
  107.                 $("#client-logo").each(function() {
  108.                     if ($(this).hasClass("visibleText")) {
  109.                         $(this).removeClass("visibleText");
  110.                         $(this).addClass("hiddenText");
  111.                     }
  112.                 });
  113.                 $("#menu-logo").each(function() {
  114.                     if ($(this).hasClass("hiddenText")) {
  115.                         $(this).removeClass("hiddenText");
  116.                         $(this).addClass("visibleText");
  117.                     }
  118.                 });
  119.                 $("#menu-logo2").each(function() {
  120.                     if ($(this).hasClass("visibleText")) {
  121.                         $(this).removeClass("visibleText");
  122.                         $(this).addClass("hiddenText");
  123.                     }
  124.                 });
  125.             }
  126.         }
  127.     });
  128. </script>