From 96f993d026b96651f2c45c8366f4ab771a37cf28 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Nov 2020 10:11:45 +0000 Subject: [PATCH] Improve handling of banner images --- webinterface.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/webinterface.py b/webinterface.py index 84b1550b6..7b16d089f 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3557,9 +3557,10 @@ def htmlProfile(rssIconAtTop: bool, # If this is the news account then show a different banner if isSystemAccount(nickname): + bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain) profileHeaderStr = \ '\n' + 'src="/users/' + nickname + '/' + bannerFile + '" />\n' if loginButton: profileHeaderStr += '
' + loginButton + '
\n' @@ -6000,11 +6001,16 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, else: editor = isEditor(baseDir, nickname) + domain = domainFull + if ':' in domain: + domain = domain.split(':')[0] + htmlStr = htmlHeader(cssFilename, profileStyle) + bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain) htmlStr += \ '' + \ '\n' + 'src="/users/' + nickname + '/' + bannerFile + '" />\n' htmlStr += '
' + \ headerButtonsFrontScreen(translate, nickname, @@ -6063,10 +6069,12 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str, showPublishButton = editor htmlStr = htmlHeader(cssFilename, profileStyle) + + bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain) htmlStr += \ '' + \ '\n' + 'src="/users/' + nickname + '/' + bannerFile + '" />\n' htmlStr += '
' + \ headerButtonsFrontScreen(translate, nickname,