<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='y_img/favicon/favicon.ico') }}">
  <title>
    {% block title %}{{ title | default('USER FORMHä') }}{% endblock %}
  </title>

  <!-- {# i google analytics #} -->
  {% include 'z_comps/google_analytics.html' %}
  <!-- {# f google analytics #} -->

  <!-- {# Librería de aos.js [animaciones] #} -->
  <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">

  <!-- {# i bootstrap #} -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
  <!-- {# icons #}} -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
  <!-- {# f bootstrap #} -->

  <!-- {# i navbar css #} -->
  <link rel="stylesheet" href="{{url_for('static', filename='template/tmp.css')}}">
  <!-- {# navbar #} -->
  <link rel="stylesheet" href="{{url_for('static', filename='template/navbar_footer.css')}}">
  <!-- {# f navbar css #} -->

  <!-- {# i notify css #} -->
  <!-- {# doc: https://github.com/simple-notify/simple-notify?tab=readme-ov-file #} -->
  <!-- CSS -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/simple-notify/dist/simple-notify.css" />
  <!-- JS -->
  <script src="https://cdn.jsdelivr.net/npm/simple-notify/dist/simple-notify.min.js"></script>
  <!-- {# f notify js #} -->

  {% block css %}
  {% endblock %}

</head>
<!-- <body> -->

<body>

  <!-- {# i navbar #} -->
  <nav class="navbar navbar-expand-lg bg-body-tertiary navbar-custom">
    <div class="container-fluid">
      <a class="navbar-brand" href="{{ url_for('user_home') }}">

              <!-- {# inicio logo #} -->
      <div class="logo">
        <?xml version="1.0" encoding="UTF-8"?>
        <svg id="info" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 515.86 515.86">
          <!-- Generator: Adobe Illustrator 29.4.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 152)  -->
          <defs>
            <style>
              .st0 {
                fill: #699dd3;
              }
        
              .st1 {
                fill: #003374;
              }
        
              .st2 {
                fill: #861e5d;
              }
        
              .st3 {
                fill: #93b635;
              }
            </style>
          </defs>
          <path class="st1"
            d="M257.93,0C115.48,0,0,115.48,0,257.93s115.48,257.93,257.93,257.93,257.93-115.48,257.93-257.93S400.38,0,257.93,0ZM257.93,374.4c-64.32,0-116.47-52.14-116.47-116.47s52.14-116.47,116.47-116.47,116.47,52.14,116.47,116.47-52.14,116.47-116.47,116.47Z" />
          <path class="st0"
            d="M257.93,17.99C125.41,17.99,17.99,125.41,17.99,257.93s107.43,239.94,239.94,239.94,239.94-107.43,239.94-239.94S390.45,17.99,257.93,17.99ZM257.93,374.4c-64.32,0-116.47-52.14-116.47-116.47s52.14-116.47,116.47-116.47,116.47,52.14,116.47,116.47-52.14,116.47-116.47,116.47Z" />
          <path class="st2"
            d="M152.7,307.88c-7.2-15.14-11.24-32.07-11.24-49.95s4.05-34.84,11.26-49.99c16.96-56.07,68.26-97.9,171.82-97.9,19.54,0,38.4,2.92,56.16,8.35,6.31,1.93,10.5-6.48,5.14-10.32-39.97-28.63-88.93-45.49-141.85-45.49C117.37,62.58,13.29,159.04,1.19,282.49c12.37,130.93,122.57,233.37,256.74,233.37,41.87,0,81.36-10.04,116.32-27.74-15.86,4.24-32.52,6.51-49.72,6.51-72.39,0-149.29-92.49-171.84-186.75Z" />
          <path class="st3"
            d="M497.87,300.26c0-18.96-3.56-37.08-9.99-53.78-.34-.88-.68-1.76-1.04-2.63-.5-1.26-1.05-2.5-1.58-3.74-1.68-3.88-3.45-7.72-5.43-11.43-.01.07-.02.13-.03.2-25.37-46.71-74.85-78.43-131.74-78.43-12.4,0-24.44,1.54-35.96,4.38,38.48,20.26,64.26,61.4,62.19,108.38-2.65,59.96-51.6,108.7-111.57,111.1-47.26,1.89-88.55-24.41-108.5-63.43-22.95-30.47-36.58-68.37-36.58-109.46,0-12.39,1.25-24.49,3.62-36.18,1.23-6.08-6.66-9.54-10.43-4.6-29.23,38.36-45.92,86.78-43.9,139.18,4.37,113.08,97.12,204.44,210.25,207.21,104.27,2.55,192.24-68.89,215.29-165.52.76-3.17,1.42-6.38,2.03-9.6,1.6-7.46,2.66-15.11,3.11-22.94.03-.33.07-.65.09-.98.1-2.31.18-4.62.18-6.96,0-.11-.01-.23-.01-.34,0-.14.01-.28.01-.42Z" />
        </svg>
      </div>
      <!-- {# fin logo #} -->

      </a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
        aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav me-auto mb-2 mb-lg-0 effect-3">

          <!-- <li class="nav-item"><a class="nav-link" href="#"><i class="bi bi-person-circle"></i> {{nombre}}</a></li> -->
      
          <!-- <li class="nav-item"><a class="nav-link active" href="#">Link</a></li> -->
          

          <li class="nav-item"><a class="nav-link {% if active_page == 'user_home' %}active{% endif %}" href="{{ url_for('user_home') }}"><i class="bi bi-house-fill"></i></i> Inicio</a></li>
          <li class="nav-item"><a class="nav-link {% if active_page == 'user_txteditor' %}active{% endif %}" href="{{url_for('user_txteditor')}}"><i class="bi bi-body-text"></i></i> Nueva Publicación</a></li>
          <li class="nav-item"><a class="nav-link {% if active_page == 'my_posts' %}active{% endif %}" href="{{ url_for('my_posts') }}"><i class="bi bi-file-earmark-richtext"></i> Mis Publicaciones</a></li>
          <li class="nav-item"><a class="nav-link {% if active_page == 'change_pswd' %}active{% endif %}" href="{{ url_for('change_pswd') }}"><i class="bi bi-file-earmark-lock2"></i> Cambiar Contraseña</a></li>
          {% if is_admin %}
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle {% if active_page in [ 'carousel', 'metrics', 'manage_profiles'] %}active{% endif %}" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
              <i class="bi bi-gear-wide"></i> Admin Opc.
            </a>
            
            <ul class="dropdown-menu">
              <!-- <li><hr class="dropdown-divider"></li> -->
              
              <li>
                <a class="dropdown-item" href="{{ url_for('carousel') }}"> 
                  {% if active_page == 'carousel' %}<i class="bi bi-arrow-return-right"></i>{% endif %}
                  <i class="bi bi-easel-fill"></i> Carousel
                </a>
              </li>
              <li>
                <a class="dropdown-item" href="{{ url_for('metrics') }}">
                  {% if active_page == 'metrics' %}<i class="bi bi-arrow-return-right"></i>{% endif %}
                  <i class="bi bi-bar-chart-line-fill"></i> Métricas
                </a>
              </li>
              <li>
                <a class="dropdown-item" href="{{ url_for('manage_profiles') }}">
                  {% if active_page == 'manage_profiles' %}<i class="bi bi-arrow-return-right"></i>{% endif %}
                  <i class="bi bi-person-fill-gear"></i> Perfiles
                </a>
              </li>
              <!-- <li><hr class="dropdown-divider"></li> -->
            </ul>
            
          </li>
          {% endif %}
          <li class="nav-item"><a class="nav-link" href="{{ url_for('logout') }}"><i class="bi bi-door-open-fill"></i> Logout</a></li>

 
        </ul>
      </div>
    </div>
  </nav>
  <!-- {# f navbar #} -->

  <!-- <main> -->
  <main>
    {% block body %}
    {% endblock body %}
  </main>

  {% include 'z_comps/footer.html' %}
  <!-- {# i bootstrap js #} -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
    integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
    crossorigin="anonymous"></script>
  <!-- {# f bootstrap js #} -->

  {% block js %}
  
  {% endblock js %}
  <script type="module" src="{{ url_for('static', filename='z_comps/validation_timestamp.js') }}"></script>
  
</body>

</html>