New version, completely

This commit is contained in:
2019-08-22 16:12:05 +02:00
parent 9840a2f278
commit 8689dd8c63
221 changed files with 72660 additions and 0 deletions

26
web/index.py Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/python3
import cherrypy
import config
static_dir = '/templates/' # Needs to have trailing and leading slash '/'
class landingPage(object):
'''Base Index constructor and expose function'''
@cherrypy.expose
def index(self):
header = config.read_html('header', static_dir)
menu_raw = config.read_html('top_menu', static_dir)
menu = menu_raw.format(energy = '', weather = '',
status = '', temphumi = '')
body = self.body()
footer = config.read_html('footer', static_dir)
result = header\
+ menu\
+ body\
+ footer
return result
def body(self):
admin_preformat = config.read_html('landing_page', static_dir)
admin_html = admin_preformat
return admin_html