Set account link active when visiting

This commit is contained in:
Alexandre Iooss 2021-10-13 15:51:47 +02:00
parent d6a8a2b68e
commit ac75442c84
2 changed files with 2 additions and 4 deletions

View file

@ -43,7 +43,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
<ul class="navbar-nav">
{% if request.user.is_authenticated %}
<li class="nav-item">
<a class="nav-link" href="{% url 'account_email' %}">
{% url 'account_email' as url %}
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16">
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10z"/>
</svg>

View file

@ -60,7 +60,4 @@ SPDX-License-Identifier: GPL-2.0-or-later
{% include "socialaccount/snippets/login_extra.html" %}
</div>
</div>
{% endblock %}