mirror of https://gitlab.com/bashrc2/epicyon
Copy left and right column images when changing theme
parent
70e57fa71a
commit
68ce54563f
22
theme.py
22
theme.py
|
@ -887,6 +887,10 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
baseDir + '/img/banner.png'
|
baseDir + '/img/banner.png'
|
||||||
searchBannerFilename = \
|
searchBannerFilename = \
|
||||||
baseDir + '/img/search_banner.png'
|
baseDir + '/img/search_banner.png'
|
||||||
|
leftColImageFilename = \
|
||||||
|
baseDir + '/img/left_col_image.png'
|
||||||
|
rightColImageFilename = \
|
||||||
|
baseDir + '/img/right_col_image.png'
|
||||||
else:
|
else:
|
||||||
profileImageFilename = \
|
profileImageFilename = \
|
||||||
baseDir + '/img/image_' + themeNameLower + '.png'
|
baseDir + '/img/image_' + themeNameLower + '.png'
|
||||||
|
@ -894,6 +898,10 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
baseDir + '/img/banner_' + themeNameLower + '.png'
|
baseDir + '/img/banner_' + themeNameLower + '.png'
|
||||||
searchBannerFilename = \
|
searchBannerFilename = \
|
||||||
baseDir + '/img/search_banner_' + themeNameLower + '.png'
|
baseDir + '/img/search_banner_' + themeNameLower + '.png'
|
||||||
|
leftColImageFilename = \
|
||||||
|
baseDir + '/img/left_col_image_' + themeNameLower + '.png'
|
||||||
|
rightColImageFilename = \
|
||||||
|
baseDir + '/img/right_col_image_' + themeNameLower + '.png'
|
||||||
|
|
||||||
backgroundNames = ('login', 'shares', 'delete', 'follow',
|
backgroundNames = ('login', 'shares', 'delete', 'follow',
|
||||||
'options', 'block', 'search', 'calendar')
|
'options', 'block', 'search', 'calendar')
|
||||||
|
@ -960,6 +968,20 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
if os.path.isfile(leftColImageFilename):
|
||||||
|
copyfile(leftColImageFilename,
|
||||||
|
accountDir + '/left_col_image.png')
|
||||||
|
except BaseException:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
if os.path.isfile(rightColImageFilename):
|
||||||
|
copyfile(rightColImageFilename,
|
||||||
|
accountDir + '/right_col_image.png')
|
||||||
|
except BaseException:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def setTheme(baseDir: str, name: str) -> bool:
|
def setTheme(baseDir: str, name: str) -> bool:
|
||||||
result = False
|
result = False
|
||||||
|
|
|
@ -5301,7 +5301,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
editImageClass = 'rightColEditImage'
|
editImageClass = 'rightColEditImage'
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
'\n <center>\n' + \
|
'\n <center>\n' + \
|
||||||
' <img class="rightColImg" loading="lazy" src="/users/' + \
|
' <img class="rightColImg" ' + \
|
||||||
|
'loading="lazy" src="/users/' + \
|
||||||
nickname + '/right_col_image.png" />\n' + \
|
nickname + '/right_col_image.png" />\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue