templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="es">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1">
  6.     <title>SIGMEC{% block title %}{% endblock %}</title>
  7.     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
  8.     <link rel="icon" type="image/x-icon" href="{{ asset('img/sistema/favicon.ico') }}">
  9.     <!-- Google Font: Source Sans Pro -->
  10.     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  11.     <!-- Font Awesome -->
  12.     <link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
  13.     <!-- Theme style -->
  14.     <link rel="stylesheet" href="{{ asset('css/adminlte.min.css') }}">
  15.     {% block stylesheets %}{% endblock %}
  16.     {% if app.request.query.get('embedded') == '1' %}
  17.     <style>
  18.         /* ðŸ”¹ Estilos para modo embebido */
  19.         body {
  20.             background-color: #f8f9fa;
  21.         }
  22.         .main-header,
  23.         .main-sidebar,
  24.         .main-footer {
  25.             display: none !important;
  26.         }
  27.         .content-wrapper {
  28.             margin-left: 0 !important; /* evita desplazamiento lateral por sidebar oculto */
  29.             padding: 15px 25px;
  30.             background: white;
  31.             box-shadow: none; 
  32.         }
  33.         .wrapper {
  34.             background-color: #fff;
  35.         }
  36.     </style>
  37.     {% endif %}
  38. <!-- Google tag (gtag.js) -->
  39. <script async src="https://www.googletagmanager.com/gtag/js?id=G-7EVJ0XBQ4Y"></script>
  40. <script>
  41.   window.dataLayer = window.dataLayer || [];
  42.   function gtag(){dataLayer.push(arguments);}
  43.   gtag('js', new Date());
  44.   gtag('config', 'G-7EVJ0XBQ4Y');
  45. </script>
  46. <body class="hold-transition sidebar-mini">
  47. <div class="wrapper">
  48.     {# ðŸ”¹ Mostrar Navbar solo si NO está en modo embebido #}
  49.     {% if app.request.query.get('embedded') != '1' %}
  50.     <!-- Navbar -->
  51.     <nav class="main-header navbar navbar-expand navbar-white navbar-light" style="background-color: #01746d">
  52.         <!-- Left navbar links -->
  53.         <ul class="navbar-nav">
  54.             <li class="nav-item">
  55.                 <a class="nav-link d-lg-none" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
  56.             </li>
  57.         </ul>
  58.         <!-- Right navbar links -->
  59.         <ul class="navbar-nav ml-auto">
  60.             <li class="nav-item">
  61.                 <a class="nav-link" data-widget="fullscreen" href="#" role="button">
  62.                     <i class="fas fa-expand-arrows-alt"></i>
  63.                 </a>
  64.             </li>
  65.             {% if app.session.get('periodo').nombre is defined %}
  66.             <li class="nav-item p-0">
  67.                 <span class="nav-link pl-0 pr-0">
  68.                     {{ app.session.get('periodo').nombre }}
  69.                 </span>
  70.             </li>
  71.             {% endif %}
  72.             <li class="nav-item dropdown user user-menu">
  73.                 <a href="#" class="nav-link" data-toggle="dropdown">
  74.                     <img src="{{ asset('img/sistema/user-generic.png') }}" class="user-image" alt="User Image">
  75.                     <span class="hidden-xs">{{ app.user.nombre }} {{ app.user.papellido }}</span>
  76.                 </a>
  77.                 <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
  78.                     <div class="user-header text-center">
  79.                         <img src="{{ asset('img/sistema/user-generic.png') }}" class="img-circle img-size-64 pt-2" alt="User Image">
  80.                         <p class="p-4">
  81.                             {{ app.user.nombre }} {{ app.user.papellido }}
  82.                             <br>
  83.                             <small>{{ app.user.unidad }}</small>
  84.                             <br>
  85.                             <small>{{ app.user.rol }}</small>
  86.                         </p>
  87.                     </div>
  88.                     <div class="dropdown-divider"></div>
  89.                     <a href="#" class="dropdown-item dropdown-footer">Configuraciones</a>
  90.                     <a href="{{ path('app_logout') }}" class="dropdown-item dropdown-footer">Cerrar sesión</a>
  91.                 </div>
  92.             </li>
  93.         </ul>
  94.     </nav>
  95.     <!-- Sidebar -->
  96.     <aside class="main-sidebar elevation-2 sidebar-light-teal">
  97.         <!-- Brand Logo -->
  98.         <a href="{{ path('homepage') }}" class="brand-link text-center">
  99.             <img src="{{ asset('img/sistema/logo.png') }}" alt="SIGMEC" class="brand-image elevation-2" style="opacity: .8; float: none">
  100.         </a>
  101.         <!-- Sidebar -->
  102.         <div class="sidebar">
  103.             <div class="user-panel mb-1 d-flex">
  104.                 <div class="info w-100">
  105.                     <p class="text-center mb-0" style="font-size: 14px">
  106.                         {{ app.user.nombre }} {{ app.user.papellido }}<br>
  107.                         {{ app.user.unidad}} <br>
  108.                         {{ app.user.rol }}
  109.                     </p>
  110.                 </div>
  111.             </div>
  112.             {% include 'menu.html.twig' %}
  113.         </div>
  114.     </aside>
  115.     {% endif %}
  116.     <!-- Message alert -->
  117.     <div id="content-message" style="position: fixed; top: 0; left: 0; width: 100%; z-index: 5000;" class="modal">
  118.         <div class="row">
  119.             <div class="col-lg-5 col-md-12 ml-auto">
  120.                 <div class="alert alert-dismissible" style="margin: 20px">
  121.                     <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
  122.                     <h5><i class="icon"></i> <span class="title-alert"></span></h5>
  123.                     <p><span class="body-alert"></span></p>
  124.                 </div>
  125.             </div>
  126.         </div>
  127.     </div>
  128.     <!-- Main Content -->
  129.     {% block body %}{% endblock %}
  130.     {% if app.request.query.get('embedded') != '1' %}
  131.     <!-- Footer -->
  132.     <footer class="main-footer">
  133.         <div class="float-right d-none d-sm-block">
  134.             <b>Version</b> {{ app.request.server.get('VERSION') }}
  135.         </div>
  136.         <strong>CONALEP Estado de México &copy; {{ "now"|date('Y') }}</strong> Derechos reservados
  137.     </footer>
  138.     {% endif %}
  139. </div>
  140. <!-- Scripts -->
  141. <script src="{{ asset('plugins/jquery/jquery.min.js') }}"></script>
  142. <script src="{{ asset('plugins/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
  143. <script src="{{ asset('js/adminlte.min.js') }}"></script>
  144. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
  145. <script>
  146.     $(function(){
  147.         $('#content-message').css("display", "none");
  148.     });
  149.     function alertMessage(type, body){
  150.         let mensaje = $('#content-message');
  151.         mensaje.find('.body-alert').text(body);
  152.         if (type === 0){
  153.             mensaje.find('.alert').addClass('alert-success');
  154.             mensaje.find('.icon').addClass('icon fas fa-check');
  155.             mensaje.find('.title-alert').text('¡Éxito!');
  156.         } else {
  157.             mensaje.find('.alert').addClass('alert-danger');
  158.             mensaje.find('.icon').addClass('fa fa-ban');
  159.             mensaje.find('.title-alert').text('¡Error!');
  160.         }
  161.         mensaje.css("display", "block");
  162.         setTimeout(function(){ mensaje.fadeOut(); }, 5000);
  163.     }
  164.     function closeModal(id){
  165.         $(`#${id}`).removeClass('show');
  166.         $(`#${id}`).fadeOut();
  167.         $('body').removeClass('modal-open');
  168.         $('.modal-backdrop').remove();
  169.     }
  170. </script>
  171. {% block javascripts %}{% endblock %}
  172. </body>
  173. </html>