django-multipage-template-f.../app/app_template/templates/components/_nav.html
Andros Fenollosa 6cdc7f43a3 Add Stimulus
2022-04-19 21:51:43 +02:00

57 lines
1.4 KiB
HTML

<ul class="nav__ul">
{# Links always visible #}
<li>
<a
href="#"
class="nav__link nav__link--page{% if active_nav == "home" %} active{% endif %}"
data-page="home"
data-action="click->navbar#changePage"
>
Home
</a>
</li>
{% if user.is_authenticated %}
{# Links only if identified #}
<li>
<a
href="#"
class="nav__link nav__link--page{% if active_nav == "profile" %} active{% endif %}"
data-page="profile"
data-action="click->navbar#changePage"
>
Profile
</a>
</li>
<li>
<a
href="#"
class="nav__link"
id="logout"
>
Logout
</a>
</li>
{% else %}
{# Links only if not identified #}
<li>
<a
href="#"
class="nav__link nav__link--page{% if active_nav == "login" %} active{% endif %}"
data-page="login"
data-action="click->navbar#changePage"
>
Login
</a>
</li>
<li>
<a
href="#"
class="nav__link nav__link--page{% if active_nav == "signup" %} active{% endif %}"
data-page="signup"
data-action="click->navbar#changePage"
>
Signup
</a>
</li>
{% endif %}
</ul>