forked from indymedia/epicyon
Passing booleans to functions
parent
7c833a177c
commit
a9e19a2a2e
28
theme.py
28
theme.py
|
@ -198,22 +198,34 @@ def setThemeFromDict(baseDir: str, name: str,
|
||||||
css = cssfile.read()
|
css = cssfile.read()
|
||||||
for paramName, paramValue in themeParams.items():
|
for paramName, paramValue in themeParams.items():
|
||||||
if paramName == 'newswire-publish-icon':
|
if paramName == 'newswire-publish-icon':
|
||||||
setNewswirePublishAsIcon(baseDir,
|
if paramValue.lower() == 'true':
|
||||||
paramValue.lower() == 'true')
|
setNewswirePublishAsIcon(baseDir, True)
|
||||||
|
else:
|
||||||
|
setNewswirePublishAsIcon(baseDir, False)
|
||||||
continue
|
continue
|
||||||
elif paramName == 'full-width-timeline-buttons':
|
elif paramName == 'full-width-timeline-buttons':
|
||||||
paramBool = paramValue.lower() == 'true'
|
if paramValue.lower() == 'true':
|
||||||
setFullWidthTimelineButtonHeader(baseDir, paramBool)
|
setFullWidthTimelineButtonHeader(baseDir, True)
|
||||||
|
else:
|
||||||
|
setFullWidthTimelineButtonHeader(baseDir, False)
|
||||||
continue
|
continue
|
||||||
elif paramName == 'icons-as-buttons':
|
elif paramName == 'icons-as-buttons':
|
||||||
setIconsAsButtons(baseDir, paramValue.lower() == 'true')
|
if paramValue.lower() == 'true':
|
||||||
|
setIconsAsButtons(baseDir, True)
|
||||||
|
else:
|
||||||
|
setIconsAsButtons(baseDir, False)
|
||||||
continue
|
continue
|
||||||
elif paramName == 'rss-icon-at-top':
|
elif paramName == 'rss-icon-at-top':
|
||||||
setRssIconAtTop(baseDir, paramValue.lower() == 'true')
|
if paramValue.lower() == 'true':
|
||||||
|
setRssIconAtTop(baseDir, True)
|
||||||
|
else:
|
||||||
|
setRssIconAtTop(baseDir, False)
|
||||||
continue
|
continue
|
||||||
elif paramName == 'publish-button-at-top':
|
elif paramName == 'publish-button-at-top':
|
||||||
setPublishButtonAtTop(baseDir,
|
if paramValue.lower() == 'true':
|
||||||
paramValue.lower() == 'true')
|
setPublishButtonAtTop(baseDir, True)
|
||||||
|
else:
|
||||||
|
setPublishButtonAtTop(baseDir, False)
|
||||||
continue
|
continue
|
||||||
css = setCSSparam(css, paramName, paramValue)
|
css = setCSSparam(css, paramName, paramValue)
|
||||||
filename = baseDir + '/' + filename
|
filename = baseDir + '/' + filename
|
||||||
|
|
Loading…
Reference in New Issue