forked from indymedia/epicyon
Support for shares background images
parent
31dc45fd2a
commit
30dabd12a1
16
theme.py
16
theme.py
|
@ -594,6 +594,8 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
if themeNameLower == 'default':
|
if themeNameLower == 'default':
|
||||||
loginBackgroundImageFilename = \
|
loginBackgroundImageFilename = \
|
||||||
baseDir + '/img/login-background.png'
|
baseDir + '/img/login-background.png'
|
||||||
|
sharesBackgroundImageFilename = \
|
||||||
|
baseDir + '/img/shares-background.png'
|
||||||
profileImageFilename = \
|
profileImageFilename = \
|
||||||
baseDir + '/img/image.png'
|
baseDir + '/img/image.png'
|
||||||
bannerFilename = \
|
bannerFilename = \
|
||||||
|
@ -603,6 +605,8 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
else:
|
else:
|
||||||
loginBackgroundImageFilename = \
|
loginBackgroundImageFilename = \
|
||||||
baseDir + '/img/login_background_' + themeNameLower + '.png'
|
baseDir + '/img/login_background_' + themeNameLower + '.png'
|
||||||
|
sharesBackgroundImageFilename = \
|
||||||
|
baseDir + '/img/shares_background_' + themeNameLower + '.png'
|
||||||
profileImageFilename = \
|
profileImageFilename = \
|
||||||
baseDir + '/img/image_' + themeNameLower + '.png'
|
baseDir + '/img/image_' + themeNameLower + '.png'
|
||||||
bannerFilename = \
|
bannerFilename = \
|
||||||
|
@ -632,6 +636,18 @@ def setThemeImages(baseDir: str, name: str) -> None:
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if os.path.isfile(sharesBackgroundImageFilename):
|
||||||
|
try:
|
||||||
|
copyfile(sharesBackgroundImageFilename,
|
||||||
|
accountDir + '/shares-background.png')
|
||||||
|
except BaseException:
|
||||||
|
pass
|
||||||
|
elif os.path.isfile(accountDir + '/shares-background.png'):
|
||||||
|
try:
|
||||||
|
os.remove(accountDir + '/shares-background.png')
|
||||||
|
except BaseException:
|
||||||
|
pass
|
||||||
|
|
||||||
if os.path.isfile(profileImageFilename) and \
|
if os.path.isfile(profileImageFilename) and \
|
||||||
os.path.isfile(bannerFilename):
|
os.path.isfile(bannerFilename):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue