From 3c86807116aa9a516192f3ab9e50722cd8954f83 Mon Sep 17 00:00:00 2001 From: OMN Date: Tue, 24 Nov 2020 14:08:55 +0000 Subject: [PATCH] Simplify left/right column html --- webapp_column_left.py | 28 ++++++++++------------------ webapp_column_right.py | 23 ++++------------------- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/webapp_column_left.py b/webapp_column_left.py index 3157d985..95bef6e1 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -79,20 +79,9 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, domain = domain.split(':') editImageClass = '' - if showHeaderImage: - leftImageFile, leftColumnImageFilename = \ - getLeftImageFile(baseDir, nickname, domain, theme) - # show the image at the top of the column - editImageClass = 'leftColEdit' - if os.path.isfile(leftColumnImageFilename): - editImageClass = 'leftColEditImage' - htmlStr += \ - '\n
\n' + \ - ' \n' + \ - '
\n' + # show a column header, eg. title of the theme or newswire banner + htmlStr += '

Links

\n' if showBackButton: htmlStr += \ @@ -221,11 +210,14 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, if firstSeparatorAdded: htmlStr += separatorStr htmlStr += \ - '

' + \ - translate['About this Instance'] + '

' - htmlStr += \ - '

' + \ - translate['Terms of Service'] + '

' + '
\n' + \ + '' + \ + translate['About this Instance'] + \ + '\n' + \ + '' + \ + translate['Terms of Service'] + \ + '\n' + \ + '
\n' if linksFileContainsEntries and not rssIconAtTop: htmlStr += '
' + rssIconStr + '
' diff --git a/webapp_column_right.py b/webapp_column_right.py index 88f0513e..fb214aae 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -78,24 +78,12 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, if publishButtonAtTop: htmlStr += '
' + publishButtonStr + '
' - # show a column header image, eg. title of the theme or newswire banner editImageClass = '' - if showHeaderImage: - rightImageFile, rightColumnImageFilename = \ - getRightImageFile(baseDir, nickname, domain, theme) - # show the image at the top of the column - editImageClass = 'rightColEdit' - if os.path.isfile(rightColumnImageFilename): - editImageClass = 'rightColEditImage' - htmlStr += \ - '\n
\n' + \ - ' \n' + \ - '
\n' + # show a column header, eg. title of the theme or newswire banner + htmlStr += '

Newswire

\n' - if (showPublishButton or editor or rssIconAtTop) and not showHeaderImage: + if (showPublishButton or editor or rssIconAtTop): htmlStr += '
' if editImageClass == 'rightColEdit': @@ -168,11 +156,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, if editImageClass == 'rightColEdit': htmlStr += ' \n' - else: - if showHeaderImage: - htmlStr += '
\n' - if (showPublishButton or editor or rssIconAtTop) and not showHeaderImage: + if (showPublishButton or editor or rssIconAtTop): htmlStr += '

' # show the newswire lines