<nav class="navbar navbar-expand-lg bg-light mb-2">
    <div class="container-fluid">
        <a class="navbar-brand" href="{% url "hello_world" %}"><i class="fa-solid fa-dice-d20"></i> CharaSheet</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">
                <li class="nav-item">
                    <a class="nav-link" href="{% url "character:list" %}">Mes perso</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{% url "party:list" %}">Mes groupes</a>
                </li>
            </ul>
            <ul class="navbar-nav">
                {% if user.is_staff %}
                    <li class="nav-item">
                        <a class="nav-link" href="{% url "admin:index" %}">Admin</a>
                    </li>
                {% endif %}

                {% if user.is_authenticated %}
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                            Compte
                        </a>
                        <ul class="dropdown-menu">
                            <li><a class="dropdown-item" href="{% url "password_change" %}">Changer de mot de passe</a></li>
                            <li><a class="dropdown-item" href="{% url "logout" %}">Déconnexion</a></li>
                        </ul>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>
