merge-requests/30/head
Bob Mottram 2021-07-05 20:46:55 +01:00
parent 4facd77906
commit f6cbb6c340
1 changed files with 13 additions and 23 deletions

View File

@ -51,10 +51,8 @@ def _getLeftColumnShares(baseDir: str,
if '<' in sharedesc or '?' in sharedesc: if '<' in sharedesc or '?' in sharedesc:
continue continue
contactActor = item['actor'] contactActor = item['actor']
shareLink = actor + \ shareLink = actor + '?replydm=sharedesc:' + \
'?replydm=sharedesc:' + \ sharedesc.replace(' ', '_') + '?mention=' + contactActor
sharedesc.replace(' ', '_') + \
'?mention=' + contactActor
linksList.append(sharedesc + ' ' + shareLink) linksList.append(sharedesc + ' ' + shareLink)
ctr += 1 ctr += 1
if ctr >= maxSharesInLeftColumn: if ctr >= maxSharesInLeftColumn:
@ -89,16 +87,14 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
if os.path.isfile(leftColumnImageFilename): if os.path.isfile(leftColumnImageFilename):
editImageClass = 'leftColEditImage' editImageClass = 'leftColEditImage'
htmlStr += \ htmlStr += \
'\n <center>\n' + \ '\n <center>\n <img class="leftColImg" ' + \
' <img class="leftColImg" ' + \
'alt="" loading="lazy" src="/users/' + \ 'alt="" loading="lazy" src="/users/' + \
nickname + '/' + leftImageFile + '" />\n' + \ nickname + '/' + leftImageFile + '" />\n' + \
' </center>\n' ' </center>\n'
if showBackButton: if showBackButton:
htmlStr += \ htmlStr += \
' <div>' + \ ' <div> <a href="' + timelinePath + '">' + \
' <a href="' + timelinePath + '">' + \
'<button class="cancelbtn">' + \ '<button class="cancelbtn">' + \
translate['Go Back'] + '</button></a>\n' translate['Go Back'] + '</button></a>\n'
@ -112,14 +108,11 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
if editor: if editor:
# show the edit icon # show the edit icon
htmlStr += \ htmlStr += \
' <a href="' + \ ' <a href="/users/' + nickname + '/editlinks" ' + \
'/users/' + nickname + '/editlinks" ' + \
'accesskey="' + accessKeys['menuEdit'] + '">' + \ 'accesskey="' + accessKeys['menuEdit'] + '">' + \
'<img class="' + editImageClass + \ '<img class="' + editImageClass + '" loading="lazy" alt="' + \
'" loading="lazy" alt="' + \
translate['Edit Links'] + ' | " title="' + \ translate['Edit Links'] + ' | " title="' + \
translate['Edit Links'] + '" src="/' + \ translate['Edit Links'] + '" src="/icons/edit.png" /></a>\n'
'icons/edit.png" /></a>\n'
# RSS icon # RSS icon
if nickname != 'news': if nickname != 'news':
@ -134,10 +127,8 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
else: else:
rssTitle = translate['RSS feed for this site'] rssTitle = translate['RSS feed for this site']
rssIconStr = \ rssIconStr = \
' <a href="' + rssUrl + '">' + \ ' <a href="' + rssUrl + '"><img class="' + editImageClass + \
'<img class="' + editImageClass + \ '" loading="lazy" alt="' + rssTitle + '" title="' + rssTitle + \
'" loading="lazy" alt="' + rssTitle + \
'" title="' + rssTitle + \
'" src="/icons/logorss.png" /></a>\n' '" src="/icons/logorss.png" /></a>\n'
if rssIconAtTop: if rssIconAtTop:
htmlStr += rssIconStr htmlStr += rssIconStr
@ -326,8 +317,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
theme, accessKeys) theme, accessKeys)
else: else:
if editor: if editor:
htmlStr += '<br><br><br>\n' htmlStr += '<br><br><br>\n<center>\n '
htmlStr += '<center>\n '
htmlStr += translate['Select the edit icon to add web links'] htmlStr += translate['Select the edit icon to add web links']
htmlStr += '\n</center>\n' htmlStr += '\n</center>\n'
@ -376,7 +366,8 @@ def htmlEditLinks(cssCache: {}, translate: {}, baseDir: str, path: str,
translate['Switch to timeline view'] + '" alt="' + \ translate['Switch to timeline view'] + '" alt="' + \
translate['Switch to timeline view'] + '" ' + \ translate['Switch to timeline view'] + '" ' + \
'accesskey="' + accessKeys['menuTimeline'] + '">\n' 'accesskey="' + accessKeys['menuTimeline'] + '">\n'
editLinksForm += '<img loading="lazy" class="timeline-banner" ' + \ editLinksForm += \
'<img loading="lazy" class="timeline-banner" ' + \
'alt = "" src="' + \ 'alt = "" src="' + \
'/users/' + nickname + '/' + bannerFile + '" /></a>\n' + \ '/users/' + nickname + '/' + bannerFile + '" /></a>\n' + \
'</header>\n' '</header>\n'
@ -411,8 +402,7 @@ def htmlEditLinks(cssCache: {}, translate: {}, baseDir: str, path: str,
'<br>' '<br>'
editLinksForm += \ editLinksForm += \
' <textarea id="message" name="editedLinks" ' + \ ' <textarea id="message" name="editedLinks" ' + \
'style="height:80vh" spellcheck="false">' + \ 'style="height:80vh" spellcheck="false">' + linksStr + '</textarea>'
linksStr + '</textarea>'
editLinksForm += \ editLinksForm += \
'</div>' '</div>'