CostaCoffe/modules/public/home.py

38 lines
1.0 KiB
Python
Raw Normal View History

2024-01-13 11:57:50 +07:00
from mako.template import Template
import config.globalvar as globalvar
2022-03-16 11:06:52 +07:00
class main:
def __init__(self):
pass
def html(self, params):
2023-11-04 19:12:11 +07:00
interface_template = params["mako_website"]['template' ]
topnav = params["mako_website"]['topnav' ]
footer = params["mako_website"]['footer' ]
container = params["mako_website"]['container' ]
2022-03-16 11:06:52 +07:00
name = "World"
2023-10-24 20:37:32 +07:00
user_roles = ["guest"]
active_page = "Home"
2022-03-16 11:06:52 +07:00
return Template(interface_template).render(
GV_title = globalvar.GV_title,
GV_base_url = globalvar.GV_base_url,
topnav = Template(topnav).render(
GV_title = globalvar.GV_title,
2023-11-04 19:12:11 +07:00
menu = globalvar.GV_menu['public']['topnav'],
2023-10-24 20:37:32 +07:00
user_roles = user_roles,
active_page = active_page
2022-03-16 11:06:52 +07:00
),
footer = Template(footer).render(
2023-11-04 19:12:11 +07:00
copyright_holder = globalvar.GV_copyright,
2022-03-16 11:06:52 +07:00
),
container = Template(container).render(
GV_base_url = globalvar.GV_base_url,
greeting = "Hello " + name + ", " + "Welcome to " + globalvar.GV_title
)
)