make login link part of global navigation

this makes navigation uniform and the information architecture easier to
reason about
This commit is contained in:
Valentin Gagarin 2025-02-19 15:43:45 +01:00
parent fc586273dc
commit 59122901ce

View file

@ -16,17 +16,29 @@
<body>
<header>
{% load custom_tags %}
{% if user.is_authenticated %}
<p>Welcome, {{ user.username }}! <a href="{% auth_url 'logout' %}">Logout</a></p>
{% else %}
<p><a href="{% auth_url 'login' %}">Login</a></p>
{% endif %}
{% block navigation %}
<nav>
<ul>
<li>
<a href="{% url 'index' %}">Start</a>
</li>
<li>
<a href="{% url 'service_list' %}">Services</a>
</li>
{% load custom_tags %}
<li>
{% if user.is_authenticated %}
Welcome, {{ user.username }}! <a id="logout" href="{% auth_url 'logout' %}">Logout</a>
{% else %}
<a id="login" href="{% auth_url 'login' %}">Login</a>
{% endif %}
</li>
</ul>
</nav>
{% endblock navigation %}
</header>
{% block navigation %}
<nav>
</nav>
{% endblock navigation %}
{% block layout %}
<article>