html.xonsh/theme.py

40 lines
829 B
Python

#!/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/navbar.css",
"bodyCss": "css/home.css",
"headerCss": "",
"footCss": ""
}
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)