Don't show first separator in left column

main
Bob Mottram 2020-11-15 18:42:37 +00:00
parent 468489a504
commit dca56e99ec
1 changed files with 8 additions and 2 deletions

View File

@ -124,6 +124,9 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
# if showHeaderImage:
# htmlStr += '<br>'
# flag used not to show the first separator
firstSeparatorAdded = False
linksFilename = baseDir + '/accounts/links.txt'
linksFileContainsEntries = False
if os.path.isfile(linksFilename):
@ -163,7 +166,9 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
else:
if lineStr.startswith('#') or lineStr.startswith('*'):
lineStr = lineStr[1:].strip()
htmlStr += separatorStr
if firstSeparatorAdded:
htmlStr += separatorStr
firstSeparatorAdded = True
htmlStr += \
' <h3 class="linksHeader">' + \
lineStr + '</h3>\n'
@ -172,7 +177,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
' <p>' + lineStr + '</p>\n'
linksFileContainsEntries = True
htmlStr += separatorStr
if firstSeparatorAdded:
htmlStr += separatorStr
htmlStr += \
'<p class="login-text"><a href="/about">' + \
translate['About this Instance'] + '</a></p>'