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'
|
||||
searchBannerFilename = \
|
||||
baseDir + '/img/search_banner.png'
|
||||
leftColImageFilename = \
|
||||
baseDir + '/img/left_col_image.png'
|
||||
rightColImageFilename = \
|
||||
baseDir + '/img/right_col_image.png'
|
||||
else:
|
||||
profileImageFilename = \
|
||||
baseDir + '/img/image_' + themeNameLower + '.png'
|
||||
|
@ -894,6 +898,10 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
|||
baseDir + '/img/banner_' + themeNameLower + '.png'
|
||||
searchBannerFilename = \
|
||||
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',
|
||||
'options', 'block', 'search', 'calendar')
|
||||
|
@ -960,6 +968,20 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
|||
except BaseException:
|
||||
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:
|
||||
result = False
|
||||
|
|
|
@ -5301,7 +5301,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
editImageClass = 'rightColEditImage'
|
||||
htmlStr += \
|
||||
'\n <center>\n' + \
|
||||
' <img class="rightColImg" loading="lazy" src="/users/' + \
|
||||
' <img class="rightColImg" ' + \
|
||||
'loading="lazy" src="/users/' + \
|
||||
nickname + '/right_col_image.png" />\n' + \
|
||||
' </center>\n'
|
||||
|
||||
|
|
Loading…
Reference in New Issue