Add home link variable on navbar title

This commit is contained in:
Dita Aji Pratama 2025-08-09 09:05:09 +07:00
parent 3189bad447
commit 812bd0f997
3 changed files with 6 additions and 2 deletions

View File

@ -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,

View File

@ -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"</pre>
</code>
@ -132,6 +133,7 @@ greeting = "Hello world"</pre>
title = title,
navbar = Template(params["mako"]["website"]['navbar']).render(
title = title,
home = home,
menu = menu_navbar,
profile = menu_profile,
user_roles = user_roles,

View File

@ -1,7 +1,7 @@
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="#">${title}</a>
<a class="navbar-brand" href="${home}">${title}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>