{% load i18n static creative %}

<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent">
    <div class="container-fluid">
        <div class="navbar-wrapper">
            <div class="navbar-toggle d-inline">
                <button type="button" class="navbar-toggler">
                    <span class="navbar-toggler-bar bar1"></span>
                    <span class="navbar-toggler-bar bar2"></span>
                    <span class="navbar-toggler-bar bar3"></span>
                </button>
            </div>
            {% block content_title %}
                {% if title %}
                    <a class="navbar-brand">{{ title }}</a>
                {% endif %}
            {% endblock %}
        </div>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation"
                aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-bar navbar-kebab"></span>
            <span class="navbar-toggler-bar navbar-kebab"></span>
            <span class="navbar-toggler-bar navbar-kebab"></span>
        </button>
        <div class="collapse navbar-collapse" id="navigation">
            {% block usertools %}
                {% if user.is_active and user.is_staff or has_permission %}
                    <ul class="navbar-nav {{ direction.nav }}">
                        {% block nav-global %}{% endblock %}
                        <li class="dropdown nav-item">
                            <a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
                                <div class="photo">
                                    <img src="{% static "creative/assets/img/anime3.png" %}" alt="Profile Photo">
                                </div>
                                <b class="caret d-none d-lg-block d-xl-block"></b>
                                <p class="d-lg-none">{% trans 'Log out' %}</p>
                            </a>
                            <ul class="dropdown-menu dropdown-navbar {{ direction.panel }}">
                                {% block userlinks %}
                                    <li class="nav-link">
                                        <b class="nav-item dropdown-item">{{ user.get_full_name }}</b>
                                    </li>

                                    {% if site_url %}
                                        <li class="nav-link">
                                            <a href="{{ site_url }}"
                                               class="nav-item dropdown-item">{% trans 'View site' %}</a>
                                        </li>
                                    {% endif %}

                                    {% if user.has_usable_password %}
                                        <li class="nav-link">
                                            <a href="{% url 'admin:password_change' %}"
                                               class="nav-item dropdown-item">{% trans 'Change password' %}</a>
                                        </li>
                                    {% endif %}

                                    {% if user.is_active and user.is_staff %}
                                        {% url 'django-admindocs-docroot' as docsroot %}
                                        {% if docsroot %}
                                            <li class="nav-link">
                                                <a href="{{ docsroot }}"
                                                   class="nav-item dropdown-item">{% trans 'Documentation' %}</a>
                                            </li>
                                        {% endif %}
                                    {% endif %}

                                {% endblock %}
                                <li class="dropdown-divider"></li>

                                <li class="nav-link">
                                    <a href="{% url 'admin:logout' %}"
                                       class="nav-item dropdown-item">{% trans 'Log out' %}</a>
                                </li>
                            </ul>
                        </li>
                        <li class="separator d-lg-none"></li>
                    </ul>
                {% endif %}
            {% endblock %}
        </div>
    </div>
</nav>
<!-- End Navbar -->