{% load static %}

<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="{% url 'home' %}">
      <img src="{% static 'favicons/favicon.png' %}" alt="" width="30" height="24" class="d-inline-block align-text-top">
      VulnDEMO
    </a>

    {# The navbar "burger" menu which appears on small screens #}
    <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">

        <li class="nav-item">
            <a class="nav-link" href="{% url 'home' %}">Home</a>
        </li>

        <li class="nav-item">
          <a
            class="nav-link {% if not user.is_authenticated %}disabled{% endif %}"
            href="{% url 'vulnerabilities' %}"
            {% if not user.is_authenticated %}aria-disabled="true"{% endif %}>
            Vulnerabilities
          </a>
        </li>
      </ul>

      {# Right-aligned items #}
      <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
        {% if user.is_staff %}
        <li class="nav-item">
          <a class="nav-link" href="{% url 'admin:index' %}"><i class="fa-solid fa-screwdriver-wrench"></i> Admin</a>
        </li>
        {% endif %}
      </ul>
    </div>
  </div>
</nav>

{% comment %}
vi: ft=htmldjango
{% endcomment %}
