html.xonsh/theme.py

41 lines
856 B
Python
Executable File

#!/usr/bin/python
# Add argparse support, create themes
# Default theme will use the stuff I currently have on the home page
# TODO: don't hard-code theme, look into extensability
basic = {
"navCss": "css/base_navbar.css",
"bodyCss": "css/base_main.css",
"headCss": "",
"footCss": "",
"sideCss": ""
}
class css():
# sTheme = ""
def __init__(self, sTheme = basic):
self.sTheme = sTheme
def getTheme(self):
outStr = ""
for i in self.sTheme:
outStr = outStr + "\n\t<link rel=\"stylesheet\" href=\""
outStr = outStr + str(self.sTheme[i])
outStr = outStr + "\" media=\"\">"
return(outStr)
def __str__(self):
return(self.getTheme())
#def test(sTheme):
# outStr = ""
#
# for i in sTheme.values():
# print(str(i))
#test(basic)