Active class on Your profile link

This commit is contained in:
Rachid Mrad 2024-05-14 18:35:58 -04:00
parent 5ed20c09c3
commit f34da8029a
No known key found for this signature in database

View file

@ -134,7 +134,7 @@
{% block usa_overlay %}<div class="usa-overlay"></div>{% endblock %}
{% block banner %}
<header class="usa-header usa-header-basic">
<header class="usa-header usa-header--basic">
<div class="usa-nav-container">
<div class="usa-navbar">
{% block logo %}
@ -147,7 +147,7 @@
<button type="button" class="usa-menu-btn">Menu</button>
</div>
{% block usa_nav %}
<nav class="usa-nav" aria-label="Primary navigation,">
<nav class="usa-nav" aria-label="Primary navigation">
<button type="button" class="usa-nav__close">
<img src="/public/img/usa-icons/close.svg" role="img" alt="Close" />
</button>
@ -158,9 +158,12 @@
</li>
<li class="usa-nav__primary-item display-flex flex-align-center margin-left-2">
<span class="text-base"> | </span>
<a href="{% url 'user-profile' %}"><span class="text-primary">Your profile</span></a>
{% url 'user-profile' as user_profile_url %}
<a class="usa-nav-link {% if request.path == user_profile_url %}usa-current{% endif %}" href="{{ user_profile_url }}">
<span class="text-primary">Your profile</span>
</a>
</li>
<li class="usa-nav__primary-item display-flex flex-align-center margin-left-2">
<li class="usa-nav__primary-item display-flex flex-align-center">
<span class="text-base"> | </span>
<a href="{% url 'logout' %}"><span class="text-primary">Sign out</span></a>
{% else %}