django-multipage-template-f.../app/app_template/templates/components/_nav.html

58 lines
1.5 KiB
HTML
Raw Normal View History

2022-04-19 21:51:43 +02:00
<ul class="nav__ul">
2022-04-19 21:14:01 +02:00
{# Links always visible #}
<li>
<a
href="#"
class="nav__link nav__link--page{% if active_nav == "home" %} active{% endif %}"
2022-04-19 21:51:43 +02:00
data-page="home"
data-action="click->navbar#changePage"
2022-04-19 21:14:01 +02:00
>
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 %}"
2022-04-19 21:51:43 +02:00
data-page="profile"
data-action="click->navbar#changePage"
2022-04-19 21:14:01 +02:00
>
Profile
</a>
</li>
<li>
<a
href="#"
class="nav__link"
id="logout"
2022-04-19 22:56:42 +02:00
data-action="click->navbar#logout"
2022-04-19 21:14:01 +02:00
>
Logout
</a>
</li>
{% else %}
{# Links only if not identified #}
<li>
<a
href="#"
class="nav__link nav__link--page{% if active_nav == "login" %} active{% endif %}"
2022-04-19 21:51:43 +02:00
data-page="login"
data-action="click->navbar#changePage"
2022-04-19 21:14:01 +02:00
>
Login
</a>
</li>
<li>
<a
href="#"
class="nav__link nav__link--page{% if active_nav == "signup" %} active{% endif %}"
2022-04-19 21:51:43 +02:00
data-page="signup"
data-action="click->navbar#changePage"
2022-04-19 21:14:01 +02:00
>
Signup
</a>
</li>
{% endif %}
</ul>