main
Bob Mottram 2020-07-26 12:45:09 +01:00
parent 1e15f4273b
commit 08928f8ebe
1 changed files with 39 additions and 18 deletions

View File

@ -210,17 +210,20 @@ def setCustomFont(baseDir: str):
def setThemeDefault(baseDir: str): def setThemeDefault(baseDir: str):
name = 'default'
removeTheme(baseDir) removeTheme(baseDir)
setThemeInConfig(baseDir, 'default') setThemeInConfig(baseDir, name)
themeParams = { themeParams = {
"dummyValue": "1234" "dummyValue": "1234"
} }
setThemeFromDict(baseDir, 'default', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeBlue(baseDir: str): def setThemeBlue(baseDir: str):
name = 'blue'
removeTheme(baseDir) removeTheme(baseDir)
setThemeInConfig(baseDir, 'blue') setThemeInConfig(baseDir, name)
themeParams = { themeParams = {
"font-size-header": "22px", "font-size-header": "22px",
"font-size-header-mobile": "32px", "font-size-header-mobile": "32px",
@ -243,12 +246,14 @@ def setThemeBlue(baseDir: str):
"*font-family": "'Domestic_Manners'", "*font-family": "'Domestic_Manners'",
"*src": "url('./fonts/Domestic_Manners.woff2') format('woff2')" "*src": "url('./fonts/Domestic_Manners.woff2') format('woff2')"
} }
setThemeFromDict(baseDir, 'blue', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeNight(baseDir: str): def setThemeNight(baseDir: str):
name = 'night'
removeTheme(baseDir) removeTheme(baseDir)
setThemeInConfig(baseDir, 'night') setThemeInConfig(baseDir, name)
fontStr = \ fontStr = \
"url('./fonts/CheGuevaraTextSans-Regular.woff2') format('woff2')" "url('./fonts/CheGuevaraTextSans-Regular.woff2') format('woff2')"
themeParams = { themeParams = {
@ -281,12 +286,14 @@ def setThemeNight(baseDir: str):
"*font-family": "'CheGuevaraTextSans-Regular'", "*font-family": "'CheGuevaraTextSans-Regular'",
"*src": fontStr "*src": fontStr
} }
setThemeFromDict(baseDir, 'night', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeStarlight(baseDir: str): def setThemeStarlight(baseDir: str):
name = 'starlight'
removeTheme(baseDir) removeTheme(baseDir)
setThemeInConfig(baseDir, 'starlight') setThemeInConfig(baseDir, name)
themeParams = { themeParams = {
"font-size-button-mobile": "36px", "font-size-button-mobile": "36px",
"font-size": "32px", "font-size": "32px",
@ -328,13 +335,14 @@ def setThemeStarlight(baseDir: str):
"*font-family": "'bgrove'", "*font-family": "'bgrove'",
"*src": "url('fonts/bgrove.woff2') format('woff2')" "*src": "url('fonts/bgrove.woff2') format('woff2')"
} }
setThemeFromDict(baseDir, 'starlight', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, 'starlight', 'jpg') setBackgroundFormat(baseDir, name, 'jpg')
def setThemeHenge(baseDir: str): def setThemeHenge(baseDir: str):
name = 'henge'
removeTheme(baseDir) removeTheme(baseDir)
setThemeInConfig(baseDir, 'henge') setThemeInConfig(baseDir, name)
themeParams = { themeParams = {
"font-size-button-mobile": "36px", "font-size-button-mobile": "36px",
"font-size": "32px", "font-size": "32px",
@ -373,12 +381,14 @@ def setThemeHenge(baseDir: str):
"*font-family": "'bgrove'", "*font-family": "'bgrove'",
"*src": "url('fonts/bgrove.woff2') format('woff2')" "*src": "url('fonts/bgrove.woff2') format('woff2')"
} }
setThemeFromDict(baseDir, 'henge', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeZen(baseDir: str): def setThemeZen(baseDir: str):
name = 'zen'
removeTheme(baseDir) removeTheme(baseDir)
setThemeInConfig(baseDir, 'zen') setThemeInConfig(baseDir, name)
themeParams = { themeParams = {
"main-bg-color": "#5c4e41", "main-bg-color": "#5c4e41",
"text-entry-background": "#5c4e41", "text-entry-background": "#5c4e41",
@ -397,10 +407,12 @@ def setThemeZen(baseDir: str):
"dropdown-bg-color": "#504e41", "dropdown-bg-color": "#504e41",
"dropdown-bg-color-hover": "#444" "dropdown-bg-color-hover": "#444"
} }
setThemeFromDict(baseDir, 'zen', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeHighVis(baseDir: str): def setThemeHighVis(baseDir: str):
name = 'highvis'
themeParams = { themeParams = {
"font-size-header": "22px", "font-size-header": "22px",
"font-size-header-mobile": "32px", "font-size-header-mobile": "32px",
@ -417,10 +429,12 @@ def setThemeHighVis(baseDir: str):
"*font-family": "'LinBiolinum_Rah'", "*font-family": "'LinBiolinum_Rah'",
"*src": "url('./fonts/LinBiolinum_Rah.woff2') format('woff2')" "*src": "url('./fonts/LinBiolinum_Rah.woff2') format('woff2')"
} }
setThemeFromDict(baseDir, 'highvis', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeLCD(baseDir: str): def setThemeLCD(baseDir: str):
name = 'lcd'
themeParams = { themeParams = {
"main-bg-color": "#9fb42b", "main-bg-color": "#9fb42b",
"link-bg-color": "#33390d", "link-bg-color": "#33390d",
@ -473,10 +487,12 @@ def setThemeLCD(baseDir: str):
"*font-family": "'LcdSolid'", "*font-family": "'LcdSolid'",
"*src": "url('./fonts/LcdSolid.woff2') format('woff2')" "*src": "url('./fonts/LcdSolid.woff2') format('woff2')"
} }
setThemeFromDict(baseDir, 'lcd', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemePurple(baseDir: str): def setThemePurple(baseDir: str):
name = 'purple'
fontStr = \ fontStr = \
"url('./fonts/CheGuevaraTextSans-Regular.woff2') format('woff2')" "url('./fonts/CheGuevaraTextSans-Regular.woff2') format('woff2')"
themeParams = { themeParams = {
@ -516,10 +532,12 @@ def setThemePurple(baseDir: str):
"*font-family": "'CheGuevaraTextSans-Regular'", "*font-family": "'CheGuevaraTextSans-Regular'",
"*src": fontStr "*src": fontStr
} }
setThemeFromDict(baseDir, 'purple', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeHacker(baseDir: str): def setThemeHacker(baseDir: str):
name = 'hacker'
themeParams = { themeParams = {
"main-bg-color": "black", "main-bg-color": "black",
"link-bg-color": "black", "link-bg-color": "black",
@ -555,10 +573,12 @@ def setThemeHacker(baseDir: str):
"event-color": "#00ff00", "event-color": "#00ff00",
"image-corners": "0%" "image-corners": "0%"
} }
setThemeFromDict(baseDir, 'hacker', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeLight(baseDir: str): def setThemeLight(baseDir: str):
name = 'light'
themeParams = { themeParams = {
"font-size-button-mobile": "36px", "font-size-button-mobile": "36px",
"font-size": "32px", "font-size": "32px",
@ -601,7 +621,8 @@ def setThemeLight(baseDir: str):
"*font-family": "'ElectrumADFExp-Regular'", "*font-family": "'ElectrumADFExp-Regular'",
"*src": "url('./fonts/ElectrumADFExp-Regular.otf') format('opentype')" "*src": "url('./fonts/ElectrumADFExp-Regular.otf') format('opentype')"
} }
setThemeFromDict(baseDir, 'light', themeParams) setThemeFromDict(baseDir, name, themeParams)
setBackgroundFormat(baseDir, name, 'jpg')
def setThemeImages(baseDir: str, name: str) -> None: def setThemeImages(baseDir: str, name: str) -> None: