From 7c6f413e95a940b07594c43a688073d64777f50d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 14 Nov 2019 14:52:35 +0000 Subject: [PATCH] Show banner --- webinterface.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/webinterface.py b/webinterface.py index cb773c7e..a973286c 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2347,11 +2347,23 @@ def htmlTimeline(translate: {},pageNumber: int, \ iconsDir=getIconsDir(baseDir) cssFilename=baseDir+'/epicyon-profile.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: profileStyle = \ cssFile.read().replace('banner.png', \ - '/users/'+nickname+'/banner.png') + '/users/'+nickname+'/'+bannerFile) moderator=isModerator(baseDir,nickname)