Line endings to more easily read html source

merge-requests/18/head
Bob Mottram 2021-02-15 12:09:21 +00:00
parent 3303840318
commit 0f95961eae
2 changed files with 7 additions and 7 deletions

View File

@ -438,7 +438,7 @@ def getTextModeBanner(baseDir: str) -> str:
with open(textModeBannerFilename, 'r') as fp:
bannerStr = fp.read()
if bannerStr:
return bannerStr.replace('\n', '<br>')
return bannerStr.replace('\n', '<br>\n')
return None

View File

@ -892,26 +892,26 @@ def htmlKeyboardNavigation(banner: str, links: {},
followApprovals=False) -> str:
"""Given a set of links return the html for keyboard navigation
"""
htmlStr = '<div class="transparent"><ul>'
htmlStr = '<div class="transparent"><ul>\n'
if banner:
htmlStr += '<pre aria-label="">' + banner + '<br><br></pre>'
htmlStr += '<pre aria-label="">' + banner + '\n<br><br></pre>\n'
if subHeading:
htmlStr += '<strong><label class="transparent">' + \
subHeading + '</label></strong><br>'
subHeading + '</label></strong><br>\n'
# show new follower approvals
if usersPath and translate and followApprovals:
htmlStr += '<strong><label class="transparent">' + \
'<a href="' + usersPath + '/followers#timeline">' + \
translate['Approve follow requests'] + '</a>' + \
'</label></strong><br><br>'
'</label></strong><br><br>\n'
# show the list of links
for title, url in links.items():
htmlStr += '<li><label class="transparent">' + \
'<a href="' + str(url) + '">' + \
str(title) + '</a></label></li>'
htmlStr += '</ul></div>'
str(title) + '</a></label></li>\n'
htmlStr += '</ul></div>\n'
return htmlStr