From 59122901ceabcdf3154cc6efe666e8faf21d7f04 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin <valentin.gagarin@tweag.io> Date: Wed, 19 Feb 2025 15:43:45 +0100 Subject: [PATCH] make login link part of global navigation this makes navigation uniform and the information architecture easier to reason about --- panel/src/panel/templates/base.html | 32 ++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/panel/src/panel/templates/base.html b/panel/src/panel/templates/base.html index a068007c..7f8b2e18 100644 --- a/panel/src/panel/templates/base.html +++ b/panel/src/panel/templates/base.html @@ -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>