From 509e10e79b0a2a239ad6e7a4c63656fc14386a3d Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Wed, 9 Nov 2022 08:15:29 +0100 Subject: [PATCH] Fix active URL in the navbar --- app/templates/header.html | 5 +++-- app/templates/layout.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/templates/header.html b/app/templates/header.html index 7b48452..a15f051 100644 --- a/app/templates/header.html +++ b/app/templates/header.html @@ -26,11 +26,12 @@ {%- macro header_link(url, text) -%} {% set url_for = BASE_URL + request.app.router.url_path_for(url) %} -{{ text }} +{{ text }} {% endmacro %} {%- macro navbar_item_link(navbar_item) -%} -{{ navbar_item[1] }} +{% set url_for = BASE_URL + navbar_item[0] %} +{{ navbar_item[1] }} {% endmacro %}
diff --git a/app/templates/layout.html b/app/templates/layout.html index d592cc4..7aab073 100644 --- a/app/templates/layout.html +++ b/app/templates/layout.html @@ -19,7 +19,7 @@
{% macro admin_link(url, text) %} {% set url_for = BASE_URL + request.app.router.url_path_for(url) %} -{{ text }} +{{ text }} {% endmacro %}