<!DOCTYPE html>
{% load staticfiles %} {% load bootstrap4 %} {% load navbar %}
<html lang="fr">
  <head>
    <title>{% block title %}La maraude{% endblock %}</title>
   {% bootstrap_css %}
   {% bootstrap_javascript jquery="full" %}
    <link rel="stylesheet" type="text/css" href="/static/css/base.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/dashboard.css" />
    <link rel="stylesheet" type="text/css" href="/static/open-iconic/font/css/open-iconic-bootstrap.css" />
    {% block extrastyle %}{% endblock %}
    {% if stylesheets %}{% for stylesheet in stylesheets %}<link rel="stylesheet" type="text/css" href="{% static stylesheet %}" />{% endfor %}{% endif %}
  {% block extrahead %}{% endblock %}
  {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
  </head>
  <body {% block extra_body_attrs %}{% endblock %}>
    <!-- START: Navigation Bar -->
    <nav class="navbar fixed-top navbar-dark bg-dark navbar-expand-md shadow p-0">
        <a class="navbar-brand ml-3" href="/">Maraude ALSA</a>
        <span class="nav-item d-flex flex-grow-1 justify-content-center">
            {% block breadcrumbs %}{% endblock %}
        </span>
        {% if user.is_authenticated %}
        <form class="form-inline ml-auto pr-3">
          <input class="form-control py-2 mr-sm-2" type="search" placeholder="Chercher" aria-label="Search">
          <button class="btn btn-outline-success my-2" type="submit">
              <span class="sr-only">Search</span>
              <span class="oi oi-magnifying-glass" title="Search" aria-hidden="true"></span>
          </button>
        </form>
        <ul class="navbar-nav ml-auto">
          <li class="nav-item">
              <a href="{% url 'logout' %}" class="btn btn-outline-warning mx-2">
              <span class="sr-only">Logout</span>
              <span class="oi oi-account-logout" title="Logout" aria-hidden="true">
              </span></a>
          </li>
          {% if user.is_superuser %}
          <li class="nav-item">
              <a href="{% url 'admin:index' %}" class="btn btn-outline-danger mr-2 ">
                 <span class="sr-only">Admin</span>
                 <span class="oi oi-cog" title="Admin" aria-hidden="true">
              </span></a>
          </li>
          {% endif %}
        </ul>
        {% endif %}
    </nav>
    <!-- END: Navigation Bar -->
    <div class="container-fluid">
    <!-- BEGIN: Sidebar -->
      <div class="row">
        <nav class="col-md-2 d-none d-md-block bg-light sidebar">
          <div class="sidebar-sticky">
            <h6 class="sidebar-heading px-3 mt-4 text-muted">Menu</h6>
            <ul class="nav flex-column">
            {% if user.is_authenticated %}
              <li class="nav-item">
                  <a href="{% url 'maraudes:index' %}" class="nav-link {% active namespace="maraudes" append=True %}">Maraudes</a>
              </li>
              <li class="nav-item">
                <a href="{% url 'notes:liste-sujet' %}" class="nav-link {% active namespace="notes" append=True %}">Suivi</a>
              </li>
            {% endif %}
              <li class="nav-item">
                  <a class="nav-link {% active namespace="statistiques" append=True %}" href="{% url "statistiques:index" %}">Statistiques</a>
              </li>
            </ul>
            {% block sidebar %}{% endblock %}
          </div>
        </nav>
        <!-- END: Sidebar -->
        <main role="main" class="col-md-10 ml-sm-auto px-4">
          <div class="container-fluid">
              <div class="row pt-4 d-flex justify-content-center">
              {% bootstrap_messages %}
              </div>
              <div class="row">
                {% block page_content %}{% endblock %}
              </div>
          </div>
        </main>
      </div>
    </div>
  </body>
</html>
