costapy/modules/public/home.py

28 lines
981 B
Python
Raw Permalink 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:
2024-01-13 12:01:14 +07:00
def __init__(self):
pass
2022-03-16 11:06:52 +07:00
2024-01-13 12:01:14 +07:00
def html(self, params):
return Template(params["mako"]["website"]['template']).render(
title = globalvar.title,
baseurl = globalvar.baseurl,
topnav = Template(params["mako"]["website"]['topnav']).render(
title = globalvar.title,
baseurl = globalvar.baseurl,
menu = globalvar.menu['public']['topnav'],
user_roles = ["guest"],
active_page = "Home"
),
footer = Template(params["mako"]["website"]['footer']).render(
copyright = "Dita Aji Pratama",
),
container = Template(params["mako"]["website"]['container']).render(
baseurl = globalvar.baseurl,
greeting = f"Hello world, welcome to {globalvar.title}"
)
2022-03-16 11:06:52 +07:00
)