django-multipage-template-f.../app/app_template/templates/components/_nav.html
2022-04-19 22:56:42 +02:00

58 lines
1.5 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"
data-action="click->navbar#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>