mirror of https://gitlab.com/bashrc2/epicyon
Don't show rss icons if there is no content
parent
39874ad5ab
commit
7942abf11a
|
@ -5572,6 +5572,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
htmlStr += ' <br>\n'
|
htmlStr += ' <br>\n'
|
||||||
|
|
||||||
linksFilename = baseDir + '/accounts/links.txt'
|
linksFilename = baseDir + '/accounts/links.txt'
|
||||||
|
linksFileContainsEntries = False
|
||||||
if os.path.isfile(linksFilename):
|
if os.path.isfile(linksFilename):
|
||||||
linksList = None
|
linksList = None
|
||||||
with open(linksFilename, "r") as f:
|
with open(linksFilename, "r") as f:
|
||||||
|
@ -5605,6 +5606,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
' <p><a href="' + linkStr + '">' + \
|
' <p><a href="' + linkStr + '">' + \
|
||||||
lineStr + '</a></p>\n'
|
lineStr + '</a></p>\n'
|
||||||
|
linksFileContainsEntries = True
|
||||||
else:
|
else:
|
||||||
if lineStr.startswith('#') or lineStr.startswith('*'):
|
if lineStr.startswith('#') or lineStr.startswith('*'):
|
||||||
lineStr = lineStr[1:].strip()
|
lineStr = lineStr[1:].strip()
|
||||||
|
@ -5614,8 +5616,9 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
else:
|
else:
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
' <p>' + lineStr + '</p>\n'
|
' <p>' + lineStr + '</p>\n'
|
||||||
|
linksFileContainsEntries = True
|
||||||
|
|
||||||
if not rssIconAtTop:
|
if linksFileContainsEntries and not rssIconAtTop:
|
||||||
htmlStr += '<br>' + rssIconStr
|
htmlStr += '<br>' + rssIconStr
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
||||||
|
@ -5808,10 +5811,12 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
else:
|
else:
|
||||||
htmlStr += ' <br>\n'
|
htmlStr += ' <br>\n'
|
||||||
|
|
||||||
htmlStr += htmlNewswire(newswire, nickname, moderator, translate,
|
newswireContentStr = \
|
||||||
positiveVoting, iconsDir)
|
htmlNewswire(newswire, nickname, moderator, translate,
|
||||||
|
positiveVoting, iconsDir)
|
||||||
|
htmlStr += newswireContentStr
|
||||||
|
|
||||||
if not rssIconAtTop:
|
if newswireContentStr and not rssIconAtTop:
|
||||||
htmlStr += '<br>' + rssIconStr
|
htmlStr += '<br>' + rssIconStr
|
||||||
return htmlStr
|
return htmlStr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue