forked from indymedia/epicyon
Simplify left/right column html
parent
13b57ff16a
commit
3c86807116
|
@ -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 <center>\n' + \
|
||||
' <img class="leftColImg" ' + \
|
||||
'loading="lazy" src="/users/' + \
|
||||
nickname + '/' + leftImageFile + '" />\n' + \
|
||||
' </center>\n'
|
||||
# show a column header, eg. title of the theme or newswire banner
|
||||
htmlStr += '<h1>Links</h1>\n'
|
||||
|
||||
if showBackButton:
|
||||
htmlStr += \
|
||||
|
@ -221,11 +210,14 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
if firstSeparatorAdded:
|
||||
htmlStr += separatorStr
|
||||
htmlStr += \
|
||||
'<p class="login-text"><a href="/about">' + \
|
||||
translate['About this Instance'] + '</a></p>'
|
||||
htmlStr += \
|
||||
'<p class="login-text"><a href="/terms">' + \
|
||||
translate['Terms of Service'] + '</a></p>'
|
||||
'<div class="login-text">\n' + \
|
||||
'<a href="/about">' + \
|
||||
translate['About this Instance'] + \
|
||||
'</a>\n' + \
|
||||
'<a href="/terms">' + \
|
||||
translate['Terms of Service'] + \
|
||||
'</a>\n' + \
|
||||
'</div>\n'
|
||||
|
||||
if linksFileContainsEntries and not rssIconAtTop:
|
||||
htmlStr += '<br><div class="columnIcons">' + rssIconStr + '</div>'
|
||||
|
|
|
@ -78,24 +78,12 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
if publishButtonAtTop:
|
||||
htmlStr += '<center>' + publishButtonStr + '</center>'
|
||||
|
||||
# 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 <center>\n' + \
|
||||
' <img class="rightColImg" ' + \
|
||||
'loading="lazy" src="/users/' + \
|
||||
nickname + '/' + rightImageFile + '" />\n' + \
|
||||
' </center>\n'
|
||||
# show a column header, eg. title of the theme or newswire banner
|
||||
htmlStr += '<h1>Newswire</h1>\n'
|
||||
|
||||
if (showPublishButton or editor or rssIconAtTop) and not showHeaderImage:
|
||||
if (showPublishButton or editor or rssIconAtTop):
|
||||
htmlStr += '<div class="columnIcons">'
|
||||
|
||||
if editImageClass == 'rightColEdit':
|
||||
|
@ -168,11 +156,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
|||
|
||||
if editImageClass == 'rightColEdit':
|
||||
htmlStr += ' </center>\n'
|
||||
else:
|
||||
if showHeaderImage:
|
||||
htmlStr += ' <br>\n'
|
||||
|
||||
if (showPublishButton or editor or rssIconAtTop) and not showHeaderImage:
|
||||
if (showPublishButton or editor or rssIconAtTop):
|
||||
htmlStr += '</div><br>'
|
||||
|
||||
# show the newswire lines
|
||||
|
|
Loading…
Reference in New Issue