separate navigation configuration
This commit is contained in:
parent
f94259564a
commit
dfa0c52247
@ -1,28 +1,3 @@
|
||||
title = "CostaPy"
|
||||
|
||||
menu = {
|
||||
"public": {
|
||||
"navbar": [
|
||||
{
|
||||
"name":"Home",
|
||||
"target":"_self",
|
||||
"href":"/",
|
||||
"roles":["guest"]
|
||||
},
|
||||
{
|
||||
"name":"About",
|
||||
"target":"_self",
|
||||
"href":"/about",
|
||||
"roles":["guest"]
|
||||
},
|
||||
{
|
||||
"name":"Docs",
|
||||
"target":"_blank",
|
||||
"href":"https://costapy.ditaajipratama.net",
|
||||
"roles":["guest"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
copyright = "Copyright (C) 2022 Dita Aji Pratama"
|
||||
|
24
config/navigation.py
Normal file
24
config/navigation.py
Normal file
@ -0,0 +1,24 @@
|
||||
menu = {
|
||||
"public": {
|
||||
"navbar": [
|
||||
{
|
||||
"name":"Home",
|
||||
"target":"_self",
|
||||
"href":"/",
|
||||
"roles":["guest"]
|
||||
},
|
||||
{
|
||||
"name":"About",
|
||||
"target":"_self",
|
||||
"href":"/about",
|
||||
"roles":["guest"]
|
||||
},
|
||||
{
|
||||
"name":"Docs",
|
||||
"target":"_blank",
|
||||
"href":"https://costapy.ditaajipratama.net",
|
||||
"roles":["guest"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
from mako.template import Template
|
||||
from config import globalvar
|
||||
from config import globalvar, navigation
|
||||
|
||||
class main:
|
||||
|
||||
@ -11,7 +11,7 @@ class main:
|
||||
title = globalvar.title,
|
||||
header = "Welcome to CostaPy",
|
||||
navbar = Template(params["mako"]["website"]['navbar']).render(
|
||||
menu = globalvar.menu['public']['navbar'],
|
||||
menu = navigation.menu['public']['navbar'],
|
||||
user_roles = ["guest"],
|
||||
active_page = "Home"
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user