<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
    <div id="navbarCollapse" class="collapse navbar-collapse">
      <ul class="navbar-nav me-auto mb-2 mb-md-0">
        <li class="nav-item active">
          <a class="nav-link active" href="{% url 'dataStorage:home' %}"><i class="bi bi-house-fill"></i> Home </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="https://github.com/rshnGhost/eSpace"><i class="bi bi-github"></i> Get This Code</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#contact"><i class="bi bi-telephone-fill"></i> Contact</a>
        </li>
        <li class="nav-item">
          <div class="nav-link py-1"><i class="btn btn-dark py-1 bi bi-lightbulb-off" id="darkMode"></i></div>
        </li>
        </ul>
        <ul class="navbar-nav">
        <li class="nav-item">
        {% if not request.user.is_authenticated and not "/accounts/login" in request.get_full_path %}
        <form class="d-flex" action="{% url 'auth_login' %}" method="post">
          {% csrf_token %}
            <input type="text" class="form-control me-2" name="username" placeholder="Username">
            <input type="password" class="form-control me-2" name="password" placeholder="Password">
            <input type="submit" class="btn btn-outline-success my-2 my-sm-0" value="Login">
        </form>
        {% endif %}
        </li>
        {% if request.user.is_authenticated and user %}
        <li class="nav-item active">
          <a {% if request.user.is_staff %}href="{% url 'admin:index' %}"{% endif %} class="nav-link">{{ user }}</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="{% url 'auth_logout' %}"><i class="bi bi-box-arrow-right"></i> Logout</a>
        </li>
        {% else %}
        <li class="nav-item">
          <a class="nav-link" href="{% url 'registration_register' %}"><i class="bi bi-person-plus-fill"></i> Register</a>
        </li>
        {% endif %}
      </ul>
    </div>
</nav>
