Show banner

main
Bob Mottram 2019-11-14 14:52:35 +00:00
parent 0ac9f8856d
commit 7c6f413e95
1 changed files with 14 additions and 2 deletions

View File

@ -2348,10 +2348,22 @@ def htmlTimeline(translate: {},pageNumber: int, \
cssFilename=baseDir+'/epicyon-profile.css' cssFilename=baseDir+'/epicyon-profile.css'
if os.path.isfile(baseDir+'/epicyon.css'): if os.path.isfile(baseDir+'/epicyon.css'):
cssFilename=baseDir+'/epicyon.css' cssFilename=baseDir+'/epicyon.css'
bannerFile='banner.png'
bannerFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+bannerFile
if not os.path.isfile(bannerFilename):
bannerFile='banner.jpg'
bannerFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+bannerFile
if not os.path.isfile(bannerFilename):
bannerFile='banner.gif'
bannerFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+bannerFile
if not os.path.isfile(bannerFilename):
bannerFile='banner.webp'
with open(cssFilename, 'r') as cssFile: with open(cssFilename, 'r') as cssFile:
profileStyle = \ profileStyle = \
cssFile.read().replace('banner.png', \ cssFile.read().replace('banner.png', \
'/users/'+nickname+'/banner.png') '/users/'+nickname+'/'+bannerFile)
moderator=isModerator(baseDir,nickname) moderator=isModerator(baseDir,nickname)