Compare commits
2 Commits
template/p
...
master
Author | SHA1 | Date | |
---|---|---|---|
dfa0c52247 | |||
f94259564a |
@ -1,28 +1,3 @@
|
|||||||
title = "CostaPy"
|
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"
|
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"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -2,16 +2,16 @@ from bottle import response
|
|||||||
|
|
||||||
host = "localhost"
|
host = "localhost"
|
||||||
port = 11000
|
port = 11000
|
||||||
reloader = False
|
reloader = True
|
||||||
debug = False
|
debug = False
|
||||||
server = 'gunicorn' # default = 'wsgiref'
|
server = 'wsgiref' # try 'gunicorn'
|
||||||
|
|
||||||
session_opts = {
|
session_opts = {
|
||||||
'session.type': 'file',
|
'session.type': 'file',
|
||||||
'session.cookie_expires': 5*60, # Session expiration in seconds: minutes*seconds
|
'session.cookie_expires': 5*60, # Session expiration in seconds: minutes*seconds
|
||||||
'session.data_dir': './.beaker/data',
|
'session.data_dir': './.beaker/data',
|
||||||
'session.auto': True
|
'session.auto': True
|
||||||
}
|
} # beaker's session options
|
||||||
|
|
||||||
def enable_cors():
|
def enable_cors():
|
||||||
response.headers['Access-Control-Allow-Origin' ] = '*'
|
response.headers['Access-Control-Allow-Origin' ] = '*'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from mako.template import Template
|
from mako.template import Template
|
||||||
from config import globalvar
|
from config import globalvar, navigation
|
||||||
|
|
||||||
class main:
|
class main:
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ class main:
|
|||||||
title = globalvar.title,
|
title = globalvar.title,
|
||||||
header = "Welcome to CostaPy",
|
header = "Welcome to CostaPy",
|
||||||
navbar = Template(params["mako"]["website"]['navbar']).render(
|
navbar = Template(params["mako"]["website"]['navbar']).render(
|
||||||
menu = globalvar.menu['public']['navbar'],
|
menu = navigation.menu['public']['navbar'],
|
||||||
user_roles = ["guest"],
|
user_roles = ["guest"],
|
||||||
active_page = "Home"
|
active_page = "Home"
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user