diff --git a/webinterface.py b/webinterface.py index 5953e240..a7ea7ac9 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3567,7 +3567,7 @@ def htmlProfile(cssCache: {}, iconsAsButtons: bool, getLeftColumnContent(baseDir, 'news', domainFull, httpPrefix, translate, iconsDir, False, - False, None, False) + False, None, False, True) profileHeaderStr += ' \n' profileHeaderStr += ' \n' else: @@ -5583,7 +5583,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, httpPrefix: str, translate: {}, iconsDir: str, editor: bool, showBackButton: bool, timelinePath: str, - rssIconAtTop: bool) -> str: + rssIconAtTop: bool, showHeaderImage: bool) -> str: """Returns html content for the left column """ htmlStr = '' @@ -5592,29 +5592,32 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, if ':' in domain: domain = domain.split(':') - leftColumnImageFilename = \ - baseDir + '/accounts/' + nickname + '@' + domain + \ - '/left_col_image.png' - if not os.path.isfile(leftColumnImageFilename): - theme = getConfigParam(baseDir, 'theme').lower() - if theme == 'default': - theme = '' - else: - theme = '_' + theme - themeLeftColumnImageFilename = \ - baseDir + '/img/left_col_image' + theme + '.png' - if os.path.isfile(themeLeftColumnImageFilename): - copyfile(themeLeftColumnImageFilename, leftColumnImageFilename) + if showHeaderImage: + leftColumnImageFilename = \ + baseDir + '/accounts/' + nickname + '@' + domain + \ + '/left_col_image.png' + if not os.path.isfile(leftColumnImageFilename): + theme = getConfigParam(baseDir, 'theme').lower() + if theme == 'default': + theme = '' + else: + theme = '_' + theme + themeLeftColumnImageFilename = \ + baseDir + '/img/left_col_image' + theme + '.png' + if os.path.isfile(themeLeftColumnImageFilename): + copyfile(themeLeftColumnImageFilename, + leftColumnImageFilename) - # show the image at the top of the column - editImageClass = 'leftColEdit' - if os.path.isfile(leftColumnImageFilename): - editImageClass = 'leftColEditImage' - htmlStr += \ - '\n
\n' + \ - ' \n' + \ - '
\n' + # show the image at the top of the column + editImageClass = 'leftColEdit' + if os.path.isfile(leftColumnImageFilename): + editImageClass = 'leftColEditImage' + htmlStr += \ + '\n
\n' + \ + ' \n' + \ + '
\n' if showBackButton: htmlStr += \ @@ -5964,7 +5967,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, getLeftColumnContent(baseDir, nickname, domainFull, httpPrefix, translate, iconsDir, editor, - True, timelinePath, True) + True, timelinePath, True, False) htmlStr += '\n' + htmlFooter() return htmlStr @@ -6719,7 +6722,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str, leftColumnStr = \ getLeftColumnContent(baseDir, nickname, domainFull, httpPrefix, translate, iconsDir, - editor, False, None, rssIconAtTop) + editor, False, None, rssIconAtTop, + True) tlStr += ' ' + \ leftColumnStr + ' \n' # center column containing posts