From 812bd0f9971e70eb1dd48bef9b7c46c05ae0d1cf Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Sat, 9 Aug 2025 09:05:09 +0700 Subject: [PATCH] Add home link variable on navbar title --- modules/sample/prime.py | 4 +++- pages/sample/prime.html | 2 ++ templates/prime/html/navbar.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/sample/prime.py b/modules/sample/prime.py index 87cb583..7ea66a1 100644 --- a/modules/sample/prime.py +++ b/modules/sample/prime.py @@ -11,7 +11,8 @@ class main: user_roles = [1,2] # A roles that user have active_page = "Sample" # Current active page name - + + home = "/" copyright = "Copyright (C) 2022 Dita Aji Pratama" greeting = "A prime dashboard based on bootstrap 5" @@ -106,6 +107,7 @@ class main: title = title, navbar = Template(params["mako"]["website"]['navbar']).render( title = title, + home = home, menu = menu_navbar, profile = menu_profile, user_roles = user_roles, diff --git a/pages/sample/prime.html b/pages/sample/prime.html index 5de1309..c83332b 100644 --- a/pages/sample/prime.html +++ b/pages/sample/prime.html @@ -22,6 +22,7 @@ params["mako"] = { user_roles = [1,2] # A roles that user have active_page = "Users" # Current active page name +home = "/" copyright = "Copyright (C) 2022 Dita Aji Pratama" greeting = "Hello world" @@ -132,6 +133,7 @@ greeting = "Hello world" title = title, navbar = Template(params["mako"]["website"]['navbar']).render( title = title, + home = home, menu = menu_navbar, profile = menu_profile, user_roles = user_roles, diff --git a/templates/prime/html/navbar.html b/templates/prime/html/navbar.html index 3eae64e..38c60d5 100644 --- a/templates/prime/html/navbar.html +++ b/templates/prime/html/navbar.html @@ -1,7 +1,7 @@