<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <div class="container">
    <a class="navbar-brand" href="{% url 'article_list' %}">Navbar</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav">
        <li class="nav-item">
          <a class="nav-link" href="{% url 'author_list' %}">Список авторов</a>
        </li>
      </ul>
        {% if not user.is_authenticated %}
            <a class="btn btn-success" href="{% url 'user-login' %}?next={{ request.get_full_path }}">Войти</a>
            <a class="btn btn-success" href="{% url 'user-register' %}?next={{ request.get_full_path }}">Регистрация</a>
        {% else %}
            <li class="menu-right">Привет, <a href="{% url 'user-detail' user.pk %}">{{ user.username }}</a>!</li>
            <a class="btn btn-danger" href="{% url 'user-logout' %}?next={{ request.get_full_path }}">Выйти</a>
        {% endif %}
    </div>
  </div>
</nav>