fix: display the menu bar on error pages

This commit is contained in:
Éloi Rivard 2024-04-09 22:06:08 +02:00
parent 0756859626
commit 42dc023288
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
3 changed files with 55 additions and 36 deletions

View file

@ -1,3 +1,7 @@
Changed
^^^^^^^
- Display the menu bar on error pages.
[0.0.50] - 2024-04-09
---------------------

View file

@ -27,6 +27,13 @@ from .forms import PasswordResetForm
bp = Blueprint("auth", __name__)
@bp.context_processor
def global_processor():
return {
"menu": False,
}
@bp.route("/login", methods=("GET", "POST"))
def login():
if current_user():

View file

@ -20,7 +20,7 @@
<body{% if config["CANAILLE"]["JAVASCRIPT"] and config["CANAILLE"]["HTMX"] %} hx-boost="true"{% endif %}>
{% block menu %}
{% if user and menu %}
{% if menu %}
<div class="ui container menu-container">
<nav class="ui stackable labeled icon seven item {% if self.submenu() | trim %}top attached{% endif %} menu">
{% if logo_url %}
@ -29,6 +29,7 @@
</a>
{% endif %}
{% if user %}
{% if user.can_edit_self %}
<a class="item {% if menuitem is defined and menuitem == "profile" %}active{% endif %}"
href="{{ url_for('core.account.profile_edition', edited_user=user) }}">
@ -67,6 +68,13 @@
<i class="sign out alternate icon"></i>
{% trans %}Log out{% endtrans %}
</a>
{% else %}
<a class="item" href="{{ url_for('core.auth.login') }}">
<i class="sign in alternate icon"></i>
{% trans %}Sign in{% endtrans %}
</a>
{% endif %}
</nav>
{% if self.submenu() | trim %}
<nav class="ui bottom attached equal width borderless menu">