mirror of https://gitlab.com/bashrc2/epicyon
Misleading variable name
parent
64348c5161
commit
98218f8dbb
22
blog.py
22
blog.py
|
@ -391,7 +391,7 @@ def htmlBlogPost(authorized: bool,
|
||||||
None, False)
|
None, False)
|
||||||
|
|
||||||
# show rss links
|
# show rss links
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
blogStr += '<p class="rssfeed">'
|
blogStr += '<p class="rssfeed">'
|
||||||
|
|
||||||
blogStr += '<a href="' + httpPrefix + '://' + \
|
blogStr += '<a href="' + httpPrefix + '://' + \
|
||||||
|
@ -399,14 +399,14 @@ def htmlBlogPost(authorized: bool,
|
||||||
blogStr += '<img style="width:3%;min-width:50px" ' + \
|
blogStr += '<img style="width:3%;min-width:50px" ' + \
|
||||||
'loading="lazy" alt="RSS 2.0" ' + \
|
'loading="lazy" alt="RSS 2.0" ' + \
|
||||||
'title="RSS 2.0" src="/' + \
|
'title="RSS 2.0" src="/' + \
|
||||||
iconsDir + '/logorss.png" /></a>'
|
iconsPath + '/logorss.png" /></a>'
|
||||||
|
|
||||||
# blogStr += '<a href="' + httpPrefix + '://' + \
|
# blogStr += '<a href="' + httpPrefix + '://' + \
|
||||||
# domainFull + '/blog/' + nickname + '/rss.txt">'
|
# domainFull + '/blog/' + nickname + '/rss.txt">'
|
||||||
# blogStr += '<img style="width:3%;min-width:50px" ' + \
|
# blogStr += '<img style="width:3%;min-width:50px" ' + \
|
||||||
# 'loading="lazy" alt="RSS 3.0" ' + \
|
# 'loading="lazy" alt="RSS 3.0" ' + \
|
||||||
# 'title="RSS 3.0" src="/' + \
|
# 'title="RSS 3.0" src="/' + \
|
||||||
# iconsDir + '/rss3.png" /></a>'
|
# iconsPath + '/rss3.png" /></a>'
|
||||||
|
|
||||||
blogStr += '</p>'
|
blogStr += '</p>'
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ def htmlBlogPage(authorized: bool, session,
|
||||||
|
|
||||||
# show previous and next buttons
|
# show previous and next buttons
|
||||||
if pageNumber is not None:
|
if pageNumber is not None:
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
navigateStr = '<p>'
|
navigateStr = '<p>'
|
||||||
if pageNumber > 1:
|
if pageNumber > 1:
|
||||||
# show previous button
|
# show previous button
|
||||||
|
@ -459,7 +459,7 @@ def htmlBlogPage(authorized: bool, session,
|
||||||
domainFull + '/blog/' + \
|
domainFull + '/blog/' + \
|
||||||
nickname + '?page=' + str(pageNumber-1) + '">' + \
|
nickname + '?page=' + str(pageNumber-1) + '">' + \
|
||||||
'<img loading="lazy" alt="<" title="<" ' + \
|
'<img loading="lazy" alt="<" title="<" ' + \
|
||||||
'src="/' + iconsDir + \
|
'src="/' + iconsPath + \
|
||||||
'/prev.png" class="buttonprev"/></a>\n'
|
'/prev.png" class="buttonprev"/></a>\n'
|
||||||
if len(timelineJson['orderedItems']) >= noOfItems:
|
if len(timelineJson['orderedItems']) >= noOfItems:
|
||||||
# show next button
|
# show next button
|
||||||
|
@ -467,7 +467,7 @@ def htmlBlogPage(authorized: bool, session,
|
||||||
domainFull + '/blog/' + nickname + \
|
domainFull + '/blog/' + nickname + \
|
||||||
'?page=' + str(pageNumber + 1) + '">' + \
|
'?page=' + str(pageNumber + 1) + '">' + \
|
||||||
'<img loading="lazy" alt=">" title=">" ' + \
|
'<img loading="lazy" alt=">" title=">" ' + \
|
||||||
'src="/' + iconsDir + \
|
'src="/' + iconsPath + \
|
||||||
'/prev.png" class="buttonnext"/></a>\n'
|
'/prev.png" class="buttonnext"/></a>\n'
|
||||||
navigateStr += '</p>'
|
navigateStr += '</p>'
|
||||||
blogStr += navigateStr
|
blogStr += navigateStr
|
||||||
|
@ -492,13 +492,13 @@ def htmlBlogPage(authorized: bool, session,
|
||||||
domainFull + '/blog/' + nickname + '/rss.xml">'
|
domainFull + '/blog/' + nickname + '/rss.xml">'
|
||||||
blogStr += '<img loading="lazy" alt="RSS 2.0" ' + \
|
blogStr += '<img loading="lazy" alt="RSS 2.0" ' + \
|
||||||
'title="RSS 2.0" src="/' + \
|
'title="RSS 2.0" src="/' + \
|
||||||
iconsDir + '/logorss.png" /></a>'
|
iconsPath + '/logorss.png" /></a>'
|
||||||
|
|
||||||
# blogStr += '<a href="' + httpPrefix + '://' + \
|
# blogStr += '<a href="' + httpPrefix + '://' + \
|
||||||
# domainFull + '/blog/' + nickname + '/rss.txt">'
|
# domainFull + '/blog/' + nickname + '/rss.txt">'
|
||||||
# blogStr += '<img loading="lazy" alt="RSS 3.0" ' + \
|
# blogStr += '<img loading="lazy" alt="RSS 3.0" ' + \
|
||||||
# 'title="RSS 3.0" src="/' + \
|
# 'title="RSS 3.0" src="/' + \
|
||||||
# iconsDir + '/rss3.png" /></a>'
|
# iconsPath + '/rss3.png" /></a>'
|
||||||
|
|
||||||
blogStr += '</p>'
|
blogStr += '</p>'
|
||||||
return blogStr + htmlFooter()
|
return blogStr + htmlFooter()
|
||||||
|
@ -722,7 +722,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
|
||||||
print('Edit blog: json not loaded for ' + postFilename)
|
print('Edit blog: json not loaded for ' + postFilename)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
|
|
||||||
editBlogText = '<p class="new-post-text">' + \
|
editBlogText = '<p class="new-post-text">' + \
|
||||||
translate['Write your post text below.'] + '</p>'
|
translate['Write your post text below.'] + '</p>'
|
||||||
|
@ -767,7 +767,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
|
||||||
dateAndLocation += \
|
dateAndLocation += \
|
||||||
'<p><img loading="lazy" alt="" title="" ' + \
|
'<p><img loading="lazy" alt="" title="" ' + \
|
||||||
'class="emojicalendar" src="/' + \
|
'class="emojicalendar" src="/' + \
|
||||||
iconsDir + '/calendar.png"/>'
|
iconsPath + '/calendar.png"/>'
|
||||||
dateAndLocation += \
|
dateAndLocation += \
|
||||||
'<label class="labels">' + translate['Date'] + ': </label>'
|
'<label class="labels">' + translate['Date'] + ': </label>'
|
||||||
dateAndLocation += '<input type="date" name="eventDate">'
|
dateAndLocation += '<input type="date" name="eventDate">'
|
||||||
|
@ -798,7 +798,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
|
||||||
|
|
||||||
editBlogForm += ' <div class="dropbtn">'
|
editBlogForm += ' <div class="dropbtn">'
|
||||||
editBlogForm += \
|
editBlogForm += \
|
||||||
' <img loading="lazy" alt="" title="" src="/' + iconsDir + \
|
' <img loading="lazy" alt="" title="" src="/' + iconsPath + \
|
||||||
'/' + scopeIcon + '"/><b class="scope-desc">' + \
|
'/' + scopeIcon + '"/><b class="scope-desc">' + \
|
||||||
scopeDescription + '</b>'
|
scopeDescription + '</b>'
|
||||||
editBlogForm += ' </div>'
|
editBlogForm += ' </div>'
|
||||||
|
|
|
@ -146,7 +146,7 @@ def htmlDeletePost(cssCache: {},
|
||||||
"""
|
"""
|
||||||
if '/statuses/' not in messageId:
|
if '/statuses/' not in messageId:
|
||||||
return None
|
return None
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
actor = messageId.split('/statuses/')[0]
|
actor = messageId.split('/statuses/')[0]
|
||||||
nickname = getNicknameFromActor(actor)
|
nickname = getNicknameFromActor(actor)
|
||||||
domain, port = getDomainFromActor(actor)
|
domain, port = getDomainFromActor(actor)
|
||||||
|
@ -176,7 +176,7 @@ def htmlDeletePost(cssCache: {},
|
||||||
deletePostStr = htmlHeaderWithExternalStyle(cssFilename)
|
deletePostStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||||
iconsDir, translate, pageNumber,
|
iconsPath, translate, pageNumber,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
nickname, domain, port, postJsonObject,
|
nickname, domain, port, postJsonObject,
|
||||||
None, True, False,
|
None, True, False,
|
||||||
|
|
|
@ -122,7 +122,7 @@ def htmlCalendarDay(cssCache: {}, translate: {},
|
||||||
calendarStr += '</caption>\n'
|
calendarStr += '</caption>\n'
|
||||||
calendarStr += '<tbody>\n'
|
calendarStr += '<tbody>\n'
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
|
|
||||||
if dayEvents:
|
if dayEvents:
|
||||||
for eventPost in dayEvents:
|
for eventPost in dayEvents:
|
||||||
|
@ -156,7 +156,7 @@ def htmlCalendarDay(cssCache: {}, translate: {},
|
||||||
'">\n<img class="calendardayicon" loading="lazy" alt="' + \
|
'">\n<img class="calendardayicon" loading="lazy" alt="' + \
|
||||||
translate['Delete this event'] + ' |" title="' + \
|
translate['Delete this event'] + ' |" title="' + \
|
||||||
translate['Delete this event'] + '" src="/' + \
|
translate['Delete this event'] + '" src="/' + \
|
||||||
iconsDir + '/delete.png" /></a></td>\n'
|
iconsPath + '/delete.png" /></a></td>\n'
|
||||||
|
|
||||||
if eventTime and eventDescription and eventPlace:
|
if eventTime and eventDescription and eventPlace:
|
||||||
calendarStr += \
|
calendarStr += \
|
||||||
|
@ -201,7 +201,7 @@ def htmlCalendar(cssCache: {}, translate: {},
|
||||||
httpPrefix: str, domainFull: str) -> str:
|
httpPrefix: str, domainFull: str) -> str:
|
||||||
"""Show the calendar for a person
|
"""Show the calendar for a person
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
domain = domainFull
|
domain = domainFull
|
||||||
if ':' in domainFull:
|
if ':' in domainFull:
|
||||||
domain = domainFull.split(':')[0]
|
domain = domainFull.split(':')[0]
|
||||||
|
@ -302,7 +302,7 @@ def htmlCalendar(cssCache: {}, translate: {},
|
||||||
'?month=' + str(prevMonthNumber) + '">'
|
'?month=' + str(prevMonthNumber) + '">'
|
||||||
calendarStr += \
|
calendarStr += \
|
||||||
' <img loading="lazy" alt="' + translate['Previous month'] + \
|
' <img loading="lazy" alt="' + translate['Previous month'] + \
|
||||||
'" title="' + translate['Previous month'] + '" src="/' + iconsDir + \
|
'" title="' + translate['Previous month'] + '" src="/' + iconsPath + \
|
||||||
'/prev.png" class="buttonprev"/></a>\n'
|
'/prev.png" class="buttonprev"/></a>\n'
|
||||||
calendarStr += ' <a href="' + calActor + '/inbox" title="'
|
calendarStr += ' <a href="' + calActor + '/inbox" title="'
|
||||||
calendarStr += translate['Switch to timeline view'] + '">'
|
calendarStr += translate['Switch to timeline view'] + '">'
|
||||||
|
@ -312,7 +312,7 @@ def htmlCalendar(cssCache: {}, translate: {},
|
||||||
'?month=' + str(nextMonthNumber) + '">'
|
'?month=' + str(nextMonthNumber) + '">'
|
||||||
calendarStr += \
|
calendarStr += \
|
||||||
' <img loading="lazy" alt="' + translate['Next month'] + \
|
' <img loading="lazy" alt="' + translate['Next month'] + \
|
||||||
'" title="' + translate['Next month'] + '" src="/' + iconsDir + \
|
'" title="' + translate['Next month'] + '" src="/' + iconsPath + \
|
||||||
'/prev.png" class="buttonnext"/></a>\n'
|
'/prev.png" class="buttonnext"/></a>\n'
|
||||||
calendarStr += '</caption>\n'
|
calendarStr += '</caption>\n'
|
||||||
calendarStr += '<thead>\n'
|
calendarStr += '<thead>\n'
|
||||||
|
|
|
@ -23,7 +23,7 @@ from webapp_utils import getBannerFile
|
||||||
|
|
||||||
def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
httpPrefix: str, translate: {},
|
httpPrefix: str, translate: {},
|
||||||
iconsDir: str, editor: bool,
|
iconsPath: str, editor: bool,
|
||||||
showBackButton: bool, timelinePath: str,
|
showBackButton: bool, timelinePath: str,
|
||||||
rssIconAtTop: bool, showHeaderImage: bool,
|
rssIconAtTop: bool, showHeaderImage: bool,
|
||||||
frontPage: bool) -> str:
|
frontPage: bool) -> str:
|
||||||
|
@ -91,7 +91,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" loading="lazy" alt="' + \
|
'" loading="lazy" alt="' + \
|
||||||
translate['Edit Links'] + '" title="' + \
|
translate['Edit Links'] + '" title="' + \
|
||||||
translate['Edit Links'] + '" src="/' + \
|
translate['Edit Links'] + '" src="/' + \
|
||||||
iconsDir + '/edit.png" /></a>\n'
|
iconsPath + '/edit.png" /></a>\n'
|
||||||
|
|
||||||
# RSS icon
|
# RSS icon
|
||||||
if nickname != 'news':
|
if nickname != 'news':
|
||||||
|
@ -110,7 +110,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
'<img class="' + editImageClass + \
|
'<img class="' + editImageClass + \
|
||||||
'" loading="lazy" alt="' + rssTitle + \
|
'" loading="lazy" alt="' + rssTitle + \
|
||||||
'" title="' + rssTitle + \
|
'" title="' + rssTitle + \
|
||||||
'" src="/' + iconsDir + '/logorss.png" /></a>\n'
|
'" src="/' + iconsPath + '/logorss.png" /></a>\n'
|
||||||
if rssIconAtTop:
|
if rssIconAtTop:
|
||||||
htmlStr += rssIconStr
|
htmlStr += rssIconStr
|
||||||
htmlStr += ' </div>\n'
|
htmlStr += ' </div>\n'
|
||||||
|
@ -200,7 +200,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
|
||||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
|
|
||||||
# is the user a site editor?
|
# is the user a site editor?
|
||||||
if nickname == 'news':
|
if nickname == 'news':
|
||||||
|
@ -222,11 +222,11 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
|
||||||
htmlStr += '<center>' + \
|
htmlStr += '<center>' + \
|
||||||
headerButtonsFrontScreen(translate, nickname,
|
headerButtonsFrontScreen(translate, nickname,
|
||||||
'links', authorized,
|
'links', authorized,
|
||||||
iconsAsButtons, iconsDir) + '</center>'
|
iconsAsButtons, iconsPath) + '</center>'
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
getLeftColumnContent(baseDir, nickname, domainFull,
|
getLeftColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsDir, editor,
|
iconsPath, editor,
|
||||||
False, timelinePath,
|
False, timelinePath,
|
||||||
rssIconAtTop, False, False)
|
rssIconAtTop, False, False)
|
||||||
htmlStr += '</div>\n' + htmlFooter()
|
htmlStr += '</div>\n' + htmlFooter()
|
||||||
|
|
|
@ -43,7 +43,7 @@ def votesIndicator(totalVotes: int, positiveVoting: bool) -> str:
|
||||||
|
|
||||||
def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
httpPrefix: str, translate: {},
|
httpPrefix: str, translate: {},
|
||||||
iconsDir: str, moderator: bool, editor: bool,
|
iconsPath: str, moderator: bool, editor: bool,
|
||||||
newswire: {}, positiveVoting: bool,
|
newswire: {}, positiveVoting: bool,
|
||||||
showBackButton: bool, timelinePath: str,
|
showBackButton: bool, timelinePath: str,
|
||||||
showPublishButton: bool,
|
showPublishButton: bool,
|
||||||
|
@ -142,7 +142,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" loading="lazy" alt="' + \
|
'" loading="lazy" alt="' + \
|
||||||
translate['Edit newswire'] + '" title="' + \
|
translate['Edit newswire'] + '" title="' + \
|
||||||
translate['Edit newswire'] + '" src="/' + \
|
translate['Edit newswire'] + '" src="/' + \
|
||||||
iconsDir + '/edit_notify.png" /></a>\n'
|
iconsPath + '/edit_notify.png" /></a>\n'
|
||||||
else:
|
else:
|
||||||
# show the edit icon
|
# show the edit icon
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
|
@ -152,7 +152,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" loading="lazy" alt="' + \
|
'" loading="lazy" alt="' + \
|
||||||
translate['Edit newswire'] + '" title="' + \
|
translate['Edit newswire'] + '" title="' + \
|
||||||
translate['Edit newswire'] + '" src="/' + \
|
translate['Edit newswire'] + '" src="/' + \
|
||||||
iconsDir + '/edit.png" /></a>\n'
|
iconsPath + '/edit.png" /></a>\n'
|
||||||
|
|
||||||
# show the RSS icon
|
# show the RSS icon
|
||||||
rssIconStr = \
|
rssIconStr = \
|
||||||
|
@ -161,7 +161,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" loading="lazy" alt="' + \
|
'" loading="lazy" alt="' + \
|
||||||
translate['Newswire RSS Feed'] + '" title="' + \
|
translate['Newswire RSS Feed'] + '" title="' + \
|
||||||
translate['Newswire RSS Feed'] + '" src="/' + \
|
translate['Newswire RSS Feed'] + '" src="/' + \
|
||||||
iconsDir + '/logorss.png" /></a>\n'
|
iconsPath + '/logorss.png" /></a>\n'
|
||||||
if rssIconAtTop:
|
if rssIconAtTop:
|
||||||
htmlStr += rssIconStr
|
htmlStr += rssIconStr
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" loading="lazy" alt="' + \
|
'" loading="lazy" alt="' + \
|
||||||
translate['Publish a news article'] + '" title="' + \
|
translate['Publish a news article'] + '" title="' + \
|
||||||
translate['Publish a news article'] + '" src="/' + \
|
translate['Publish a news article'] + '" src="/' + \
|
||||||
iconsDir + '/publish.png" /></a>\n'
|
iconsPath + '/publish.png" /></a>\n'
|
||||||
|
|
||||||
if editImageClass == 'rightColEdit':
|
if editImageClass == 'rightColEdit':
|
||||||
htmlStr += ' </center>\n'
|
htmlStr += ' </center>\n'
|
||||||
|
@ -189,7 +189,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
# show the newswire lines
|
# show the newswire lines
|
||||||
newswireContentStr = \
|
newswireContentStr = \
|
||||||
htmlNewswire(baseDir, newswire, nickname, moderator, translate,
|
htmlNewswire(baseDir, newswire, nickname, moderator, translate,
|
||||||
positiveVoting, iconsDir)
|
positiveVoting, iconsPath)
|
||||||
htmlStr += newswireContentStr
|
htmlStr += newswireContentStr
|
||||||
|
|
||||||
# show the rss icon at the bottom, typically on the right hand side
|
# show the rss icon at the bottom, typically on the right hand side
|
||||||
|
@ -199,7 +199,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
|
|
||||||
|
|
||||||
def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
translate: {}, positiveVoting: bool, iconsDir: str) -> str:
|
translate: {}, positiveVoting: bool, iconsPath: str) -> str:
|
||||||
"""Converts a newswire dict into html
|
"""Converts a newswire dict into html
|
||||||
"""
|
"""
|
||||||
separatorStr = htmlPostSeparator(baseDir, 'right')
|
separatorStr = htmlPostSeparator(baseDir, 'right')
|
||||||
|
@ -232,7 +232,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
'/newswireunvote=' + dateStrLink + '" ' + \
|
'/newswireunvote=' + dateStrLink + '" ' + \
|
||||||
'title="' + translate['Remove Vote'] + '">'
|
'title="' + translate['Remove Vote'] + '">'
|
||||||
htmlStr += '<img loading="lazy" class="voteicon" src="/' + \
|
htmlStr += '<img loading="lazy" class="voteicon" src="/' + \
|
||||||
iconsDir + '/vote.png" /></a></p>\n'
|
iconsPath + '/vote.png" /></a></p>\n'
|
||||||
else:
|
else:
|
||||||
htmlStr += ' <span class="newswireDateVotedOn">'
|
htmlStr += ' <span class="newswireDateVotedOn">'
|
||||||
htmlStr += dateShown + '</span></p>\n'
|
htmlStr += dateShown + '</span></p>\n'
|
||||||
|
@ -257,7 +257,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
|
||||||
'/newswirevote=' + dateStrLink + '" ' + \
|
'/newswirevote=' + dateStrLink + '" ' + \
|
||||||
'title="' + translate['Vote'] + '">'
|
'title="' + translate['Vote'] + '">'
|
||||||
htmlStr += '<img class="voteicon" src="/' + \
|
htmlStr += '<img class="voteicon" src="/' + \
|
||||||
iconsDir + '/vote.png" /></a>'
|
iconsPath + '/vote.png" /></a>'
|
||||||
htmlStr += '</p>\n'
|
htmlStr += '</p>\n'
|
||||||
else:
|
else:
|
||||||
htmlStr += '<p class="newswireItem">' + \
|
htmlStr += '<p class="newswireItem">' + \
|
||||||
|
@ -304,7 +304,7 @@ def htmlCitations(baseDir: str, nickname: str, domain: str,
|
||||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
|
|
||||||
# iconsDir = getIconsWebPath(baseDir)
|
# iconsPath = getIconsWebPath(baseDir)
|
||||||
|
|
||||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
||||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
|
|
||||||
if nickname == 'news':
|
if nickname == 'news':
|
||||||
editor = False
|
editor = False
|
||||||
|
@ -419,11 +419,11 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
||||||
htmlStr += '<center>' + \
|
htmlStr += '<center>' + \
|
||||||
headerButtonsFrontScreen(translate, nickname,
|
headerButtonsFrontScreen(translate, nickname,
|
||||||
'newswire', authorized,
|
'newswire', authorized,
|
||||||
iconsAsButtons, iconsDir) + '</center>'
|
iconsAsButtons, iconsPath) + '</center>'
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
getRightColumnContent(baseDir, nickname, domainFull,
|
getRightColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsDir, moderator, editor,
|
iconsPath, moderator, editor,
|
||||||
newswire, positiveVoting,
|
newswire, positiveVoting,
|
||||||
False, timelinePath, showPublishButton,
|
False, timelinePath, showPublishButton,
|
||||||
showPublishAsIcon, rssIconAtTop, False,
|
showPublishAsIcon, rssIconAtTop, False,
|
||||||
|
|
|
@ -59,7 +59,7 @@ def htmlFollowingDataList(baseDir: str, nickname: str,
|
||||||
def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
|
def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
|
||||||
replyStr: str,
|
replyStr: str,
|
||||||
translate: {},
|
translate: {},
|
||||||
iconsDir: str,
|
iconsPath: str,
|
||||||
showPublicOnDropdown: bool,
|
showPublicOnDropdown: bool,
|
||||||
defaultTimeline: str,
|
defaultTimeline: str,
|
||||||
pathBase: str,
|
pathBase: str,
|
||||||
|
@ -79,7 +79,7 @@ def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
|
||||||
dropDownContent += ' <label for="my-newPostDropdown"\n'
|
dropDownContent += ' <label for="my-newPostDropdown"\n'
|
||||||
dropDownContent += ' data-toggle="newPostDropdown">\n'
|
dropDownContent += ' data-toggle="newPostDropdown">\n'
|
||||||
dropDownContent += ' <img loading="lazy" alt="" title="" src="/' + \
|
dropDownContent += ' <img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/' + scopeIcon + '"/><b>' + \
|
iconsPath + '/' + scopeIcon + '"/><b>' + \
|
||||||
scopeDescription + '</b></label>\n'
|
scopeDescription + '</b></label>\n'
|
||||||
dropDownContent += ' <ul>\n'
|
dropDownContent += ' <ul>\n'
|
||||||
|
|
||||||
|
@ -87,58 +87,58 @@ def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownNewPostSuffix + \
|
'<li><a href="' + pathBase + dropdownNewPostSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_public.png"/><b>' + \
|
iconsPath + '/scope_public.png"/><b>' + \
|
||||||
translate['Public'] + '</b><br>' + \
|
translate['Public'] + '</b><br>' + \
|
||||||
translate['Visible to anyone'] + '</a></li>\n'
|
translate['Visible to anyone'] + '</a></li>\n'
|
||||||
if defaultTimeline == 'tlnews':
|
if defaultTimeline == 'tlnews':
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
|
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_blog.png"/><b>' + \
|
iconsPath + '/scope_blog.png"/><b>' + \
|
||||||
translate['Article'] + '</b><br>' + \
|
translate['Article'] + '</b><br>' + \
|
||||||
translate['Create an article'] + '</a></li>\n'
|
translate['Create an article'] + '</a></li>\n'
|
||||||
else:
|
else:
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
|
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_blog.png"/><b>' + \
|
iconsPath + '/scope_blog.png"/><b>' + \
|
||||||
translate['Blog'] + '</b><br>' + \
|
translate['Blog'] + '</b><br>' + \
|
||||||
translate['Publicly visible post'] + '</a></li>\n'
|
translate['Publicly visible post'] + '</a></li>\n'
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownUnlistedSuffix + \
|
'<li><a href="' + pathBase + dropdownUnlistedSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_unlisted.png"/><b>' + \
|
iconsPath + '/scope_unlisted.png"/><b>' + \
|
||||||
translate['Unlisted'] + '</b><br>' + \
|
translate['Unlisted'] + '</b><br>' + \
|
||||||
translate['Not on public timeline'] + '</a></li>\n'
|
translate['Not on public timeline'] + '</a></li>\n'
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownFollowersSuffix + \
|
'<li><a href="' + pathBase + dropdownFollowersSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_followers.png"/><b>' + \
|
iconsPath + '/scope_followers.png"/><b>' + \
|
||||||
translate['Followers'] + '</b><br>' + \
|
translate['Followers'] + '</b><br>' + \
|
||||||
translate['Only to followers'] + '</a></li>\n'
|
translate['Only to followers'] + '</a></li>\n'
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownDMSuffix + \
|
'<li><a href="' + pathBase + dropdownDMSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_dm.png"/><b>' + \
|
iconsPath + '/scope_dm.png"/><b>' + \
|
||||||
translate['DM'] + '</b><br>' + \
|
translate['DM'] + '</b><br>' + \
|
||||||
translate['Only to mentioned people'] + '</a></li>\n'
|
translate['Only to mentioned people'] + '</a></li>\n'
|
||||||
|
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownReminderSuffix + \
|
'<li><a href="' + pathBase + dropdownReminderSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_reminder.png"/><b>' + \
|
iconsPath + '/scope_reminder.png"/><b>' + \
|
||||||
translate['Reminder'] + '</b><br>' + \
|
translate['Reminder'] + '</b><br>' + \
|
||||||
translate['Scheduled note to yourself'] + '</a></li>\n'
|
translate['Scheduled note to yourself'] + '</a></li>\n'
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownEventSuffix + \
|
'<li><a href="' + pathBase + dropdownEventSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_event.png"/><b>' + \
|
iconsPath + '/scope_event.png"/><b>' + \
|
||||||
translate['Event'] + '</b><br>' + \
|
translate['Event'] + '</b><br>' + \
|
||||||
translate['Create an event'] + '</a></li>\n'
|
translate['Create an event'] + '</a></li>\n'
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownReportSuffix + \
|
'<li><a href="' + pathBase + dropdownReportSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_report.png"/><b>' + \
|
iconsPath + '/scope_report.png"/><b>' + \
|
||||||
translate['Report'] + '</b><br>' + \
|
translate['Report'] + '</b><br>' + \
|
||||||
translate['Send to moderators'] + '</a></li>\n'
|
translate['Send to moderators'] + '</a></li>\n'
|
||||||
|
|
||||||
|
@ -146,13 +146,13 @@ def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + \
|
'<li><a href="' + pathBase + \
|
||||||
'/newshare"><img loading="lazy" alt="" title="" src="/' + \
|
'/newshare"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_share.png"/><b>' + \
|
iconsPath + '/scope_share.png"/><b>' + \
|
||||||
translate['Shares'] + '</b><br>' + \
|
translate['Shares'] + '</b><br>' + \
|
||||||
translate['Describe a shared item'] + '</a></li>\n'
|
translate['Describe a shared item'] + '</a></li>\n'
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + \
|
'<li><a href="' + pathBase + \
|
||||||
'/newquestion"><img loading="lazy" alt="" title="" src="/' + \
|
'/newquestion"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsDir + '/scope_question.png"/><b>' + \
|
iconsPath + '/scope_question.png"/><b>' + \
|
||||||
translate['Question'] + '</b><br>' + \
|
translate['Question'] + '</b><br>' + \
|
||||||
translate['Ask a question'] + '</a></li>\n'
|
translate['Ask a question'] + '</a></li>\n'
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
defaultTimeline: str, newswire: {}) -> str:
|
defaultTimeline: str, newswire: {}) -> str:
|
||||||
"""New post screen
|
"""New post screen
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
replyStr = ''
|
replyStr = ''
|
||||||
|
|
||||||
showPublicOnDropdown = True
|
showPublicOnDropdown = True
|
||||||
|
@ -490,7 +490,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
dateAndLocation += \
|
dateAndLocation += \
|
||||||
'<p><img loading="lazy" alt="" title="" ' + \
|
'<p><img loading="lazy" alt="" title="" ' + \
|
||||||
'class="emojicalendar" src="/' + \
|
'class="emojicalendar" src="/' + \
|
||||||
iconsDir + '/calendar.png"/>\n'
|
iconsPath + '/calendar.png"/>\n'
|
||||||
# select a date and time for this post
|
# select a date and time for this post
|
||||||
dateAndLocation += '<label class="labels">' + \
|
dateAndLocation += '<label class="labels">' + \
|
||||||
translate['Date'] + ': </label>\n'
|
translate['Date'] + ': </label>\n'
|
||||||
|
@ -505,7 +505,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
dateAndLocation += \
|
dateAndLocation += \
|
||||||
'<p><img loading="lazy" alt="" title="" ' + \
|
'<p><img loading="lazy" alt="" title="" ' + \
|
||||||
'class="emojicalendar" src="/' + \
|
'class="emojicalendar" src="/' + \
|
||||||
iconsDir + '/calendar.png"/>\n'
|
iconsPath + '/calendar.png"/>\n'
|
||||||
# select start time for the event
|
# select start time for the event
|
||||||
dateAndLocation += '<label class="labels">' + \
|
dateAndLocation += '<label class="labels">' + \
|
||||||
translate['Start Date'] + ': </label>\n'
|
translate['Start Date'] + ': </label>\n'
|
||||||
|
@ -518,7 +518,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
dateAndLocation += \
|
dateAndLocation += \
|
||||||
'<br><img loading="lazy" alt="" title="" ' + \
|
'<br><img loading="lazy" alt="" title="" ' + \
|
||||||
'class="emojicalendar" src="/' + \
|
'class="emojicalendar" src="/' + \
|
||||||
iconsDir + '/calendar.png"/>\n'
|
iconsPath + '/calendar.png"/>\n'
|
||||||
dateAndLocation += '<label class="labels">' + \
|
dateAndLocation += '<label class="labels">' + \
|
||||||
translate['End Date'] + ': </label>\n'
|
translate['End Date'] + ': </label>\n'
|
||||||
dateAndLocation += '<input type="date" name="endDate">\n'
|
dateAndLocation += '<input type="date" name="endDate">\n'
|
||||||
|
@ -616,7 +616,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
htmlNewPostDropDown(scopeIcon, scopeDescription,
|
htmlNewPostDropDown(scopeIcon, scopeDescription,
|
||||||
replyStr,
|
replyStr,
|
||||||
translate,
|
translate,
|
||||||
iconsDir,
|
iconsPath,
|
||||||
showPublicOnDropdown,
|
showPublicOnDropdown,
|
||||||
defaultTimeline,
|
defaultTimeline,
|
||||||
pathBase,
|
pathBase,
|
||||||
|
|
|
@ -108,7 +108,7 @@ def saveIndividualPostAsHtmlToCache(baseDir: str,
|
||||||
|
|
||||||
def individualPostAsHtml(allowDownloads: bool,
|
def individualPostAsHtml(allowDownloads: bool,
|
||||||
recentPostsCache: {}, maxRecentPosts: int,
|
recentPostsCache: {}, maxRecentPosts: int,
|
||||||
iconsDir: str, translate: {},
|
iconsPath: str, translate: {},
|
||||||
pageNumber: int, baseDir: str,
|
pageNumber: int, baseDir: str,
|
||||||
session, wfRequest: {}, personCache: {},
|
session, wfRequest: {}, personCache: {},
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
|
@ -391,7 +391,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
if showDMicon:
|
if showDMicon:
|
||||||
titleStr = \
|
titleStr = \
|
||||||
titleStr + ' <img loading="lazy" src="/' + \
|
titleStr + ' <img loading="lazy" src="/' + \
|
||||||
iconsDir + '/dm.png" class="DMicon"/>\n'
|
iconsPath + '/dm.png" class="DMicon"/>\n'
|
||||||
|
|
||||||
replyStr = ''
|
replyStr = ''
|
||||||
# check if replying is permitted
|
# check if replying is permitted
|
||||||
|
@ -445,7 +445,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
translate['Reply to this post'] + '" alt="' + \
|
translate['Reply to this post'] + '" alt="' + \
|
||||||
translate['Reply to this post'] + \
|
translate['Reply to this post'] + \
|
||||||
' |" src="/' + iconsDir + '/reply.png"/></a>\n'
|
' |" src="/' + iconsPath + '/reply.png"/></a>\n'
|
||||||
|
|
||||||
# benchmark 10
|
# benchmark 10
|
||||||
if not allowDownloads:
|
if not allowDownloads:
|
||||||
|
@ -480,7 +480,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
translate['Edit blog post'] + '" alt="' + \
|
translate['Edit blog post'] + '" alt="' + \
|
||||||
translate['Edit blog post'] + \
|
translate['Edit blog post'] + \
|
||||||
' |" src="/' + iconsDir + '/edit.png"/></a>\n'
|
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
|
||||||
else:
|
else:
|
||||||
editStr += \
|
editStr += \
|
||||||
' ' + \
|
' ' + \
|
||||||
|
@ -492,7 +492,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
translate['Edit blog post'] + '" alt="' + \
|
translate['Edit blog post'] + '" alt="' + \
|
||||||
translate['Edit blog post'] + \
|
translate['Edit blog post'] + \
|
||||||
' |" src="/' + iconsDir + '/edit.png"/></a>\n'
|
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
|
||||||
elif isEvent:
|
elif isEvent:
|
||||||
eventPostId = postJsonObject['object']['id']
|
eventPostId = postJsonObject['object']['id']
|
||||||
editStr += \
|
editStr += \
|
||||||
|
@ -505,7 +505,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
translate['Edit event'] + '" alt="' + \
|
translate['Edit event'] + '" alt="' + \
|
||||||
translate['Edit event'] + \
|
translate['Edit event'] + \
|
||||||
' |" src="/' + iconsDir + '/edit.png"/></a>\n'
|
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
|
||||||
|
|
||||||
announceStr = ''
|
announceStr = ''
|
||||||
if not isModerationPost and showRepeatIcon:
|
if not isModerationPost and showRepeatIcon:
|
||||||
|
@ -531,7 +531,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" title="' + translate['Repeat this post'] + \
|
'<img loading="lazy" title="' + translate['Repeat this post'] + \
|
||||||
'" alt="' + translate['Repeat this post'] + \
|
'" alt="' + translate['Repeat this post'] + \
|
||||||
' |" src="/' + iconsDir + '/' + announceIcon + '"/></a>\n'
|
' |" src="/' + iconsPath + '/' + announceIcon + '"/></a>\n'
|
||||||
|
|
||||||
# benchmark 12
|
# benchmark 12
|
||||||
if not allowDownloads:
|
if not allowDownloads:
|
||||||
|
@ -597,7 +597,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" title="' + likeTitle + likeCountStr + \
|
'<img loading="lazy" title="' + likeTitle + likeCountStr + \
|
||||||
'" alt="' + likeTitle + \
|
'" alt="' + likeTitle + \
|
||||||
' |" src="/' + iconsDir + '/' + likeIcon + '"/></a>\n'
|
' |" src="/' + iconsPath + '/' + likeIcon + '"/></a>\n'
|
||||||
|
|
||||||
# benchmark 12.5
|
# benchmark 12.5
|
||||||
if not allowDownloads:
|
if not allowDownloads:
|
||||||
|
@ -629,7 +629,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
bookmarkStr += \
|
bookmarkStr += \
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" title="' + bookmarkTitle + '" alt="' + \
|
'<img loading="lazy" title="' + bookmarkTitle + '" alt="' + \
|
||||||
bookmarkTitle + ' |" src="/' + iconsDir + \
|
bookmarkTitle + ' |" src="/' + iconsPath + \
|
||||||
'/' + bookmarkIcon + '"/></a>\n'
|
'/' + bookmarkIcon + '"/></a>\n'
|
||||||
|
|
||||||
# benchmark 12.9
|
# benchmark 12.9
|
||||||
|
@ -663,7 +663,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'<img loading="lazy" alt="' + \
|
'<img loading="lazy" alt="' + \
|
||||||
translate['Delete this post'] + \
|
translate['Delete this post'] + \
|
||||||
' |" title="' + translate['Delete this post'] + \
|
' |" title="' + translate['Delete this post'] + \
|
||||||
'" src="/' + iconsDir + '/delete.png"/></a>\n'
|
'" src="/' + iconsPath + '/delete.png"/></a>\n'
|
||||||
else:
|
else:
|
||||||
if not isMuted:
|
if not isMuted:
|
||||||
muteStr = \
|
muteStr = \
|
||||||
|
@ -676,7 +676,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'<img loading="lazy" alt="' + \
|
'<img loading="lazy" alt="' + \
|
||||||
translate['Mute this post'] + \
|
translate['Mute this post'] + \
|
||||||
' |" title="' + translate['Mute this post'] + \
|
' |" title="' + translate['Mute this post'] + \
|
||||||
'" src="/' + iconsDir + '/mute.png"/></a>\n'
|
'" src="/' + iconsPath + '/mute.png"/></a>\n'
|
||||||
else:
|
else:
|
||||||
muteStr = \
|
muteStr = \
|
||||||
' <a class="imageAnchor" href="/users/' + \
|
' <a class="imageAnchor" href="/users/' + \
|
||||||
|
@ -688,7 +688,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" alt="' + translate['Undo mute'] + \
|
'<img loading="lazy" alt="' + translate['Undo mute'] + \
|
||||||
' |" title="' + translate['Undo mute'] + \
|
' |" title="' + translate['Undo mute'] + \
|
||||||
'" src="/' + iconsDir+'/unmute.png"/></a>\n'
|
'" src="/' + iconsPath+'/unmute.png"/></a>\n'
|
||||||
|
|
||||||
# benchmark 13.1
|
# benchmark 13.1
|
||||||
if not allowDownloads:
|
if not allowDownloads:
|
||||||
|
@ -708,7 +708,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
' <img loading="lazy" title="' + \
|
' <img loading="lazy" title="' + \
|
||||||
translate['announces'] + \
|
translate['announces'] + \
|
||||||
'" alt="' + translate['announces'] + \
|
'" alt="' + translate['announces'] + \
|
||||||
'" src="/' + iconsDir + \
|
'" src="/' + iconsPath + \
|
||||||
'/repeat_inactive.png" class="announceOrReply"/>\n'
|
'/repeat_inactive.png" class="announceOrReply"/>\n'
|
||||||
else:
|
else:
|
||||||
# benchmark 13.2
|
# benchmark 13.2
|
||||||
|
@ -755,7 +755,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
translate['announces'] + '" alt="' + \
|
translate['announces'] + '" alt="' + \
|
||||||
translate['announces'] + '" src="/' + \
|
translate['announces'] + '" src="/' + \
|
||||||
iconsDir + '/repeat_inactive.png" ' + \
|
iconsPath + '/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
postJsonObject['object']['id'] + '">' + \
|
postJsonObject['object']['id'] + '">' + \
|
||||||
|
@ -800,7 +800,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
' <img loading="lazy" title="' + \
|
' <img loading="lazy" title="' + \
|
||||||
translate['announces'] + \
|
translate['announces'] + \
|
||||||
'" alt="' + translate['announces'] + \
|
'" alt="' + translate['announces'] + \
|
||||||
'" src="/' + iconsDir + \
|
'" src="/' + iconsPath + \
|
||||||
'/repeat_inactive.png" ' + \
|
'/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
|
@ -811,7 +811,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
titleStr += \
|
titleStr += \
|
||||||
' <img loading="lazy" title="' + \
|
' <img loading="lazy" title="' + \
|
||||||
translate['announces'] + '" alt="' + \
|
translate['announces'] + '" alt="' + \
|
||||||
translate['announces'] + '" src="/' + iconsDir + \
|
translate['announces'] + '" src="/' + iconsPath + \
|
||||||
'/repeat_inactive.png" ' + \
|
'/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
|
@ -822,7 +822,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" title="' + translate['announces'] + \
|
'<img loading="lazy" title="' + translate['announces'] + \
|
||||||
'" alt="' + translate['announces'] + \
|
'" alt="' + translate['announces'] + \
|
||||||
'" src="/' + iconsDir + \
|
'" src="/' + iconsPath + \
|
||||||
'/repeat_inactive.png" ' + \
|
'/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
|
@ -836,7 +836,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
' <img loading="lazy" title="' + \
|
' <img loading="lazy" title="' + \
|
||||||
translate['replying to themselves'] + \
|
translate['replying to themselves'] + \
|
||||||
'" alt="' + translate['replying to themselves'] + \
|
'" alt="' + translate['replying to themselves'] + \
|
||||||
'" src="/' + iconsDir + \
|
'" src="/' + iconsPath + \
|
||||||
'/reply.png" class="announceOrReply"/>\n'
|
'/reply.png" class="announceOrReply"/>\n'
|
||||||
else:
|
else:
|
||||||
if '/statuses/' in postJsonObject['object']['inReplyTo']:
|
if '/statuses/' in postJsonObject['object']['inReplyTo']:
|
||||||
|
@ -888,7 +888,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'" alt="' + \
|
'" alt="' + \
|
||||||
translate['replying to'] + \
|
translate['replying to'] + \
|
||||||
'" src="/' + \
|
'" src="/' + \
|
||||||
iconsDir + '/reply.png" ' + \
|
iconsPath + '/reply.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' ' + \
|
' ' + \
|
||||||
'<a href="' + inReplyTo + \
|
'<a href="' + inReplyTo + \
|
||||||
|
@ -950,7 +950,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'" alt="' + \
|
'" alt="' + \
|
||||||
translate['replying to'] + \
|
translate['replying to'] + \
|
||||||
'" src="/' + \
|
'" src="/' + \
|
||||||
iconsDir + '/reply.png" ' + \
|
iconsPath + '/reply.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
inReplyTo + '">@' + \
|
inReplyTo + '">@' + \
|
||||||
|
@ -963,7 +963,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
'" alt="' + \
|
'" alt="' + \
|
||||||
translate['replying to'] + \
|
translate['replying to'] + \
|
||||||
'" src="/' + \
|
'" src="/' + \
|
||||||
iconsDir + \
|
iconsPath + \
|
||||||
'/reply.png" class="announceOrReply"/>\n' + \
|
'/reply.png" class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
postJsonObject['object']['inReplyTo'] + \
|
postJsonObject['object']['inReplyTo'] + \
|
||||||
|
@ -982,7 +982,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
translate['replying to'] + \
|
translate['replying to'] + \
|
||||||
'" alt="' + translate['replying to'] + \
|
'" alt="' + translate['replying to'] + \
|
||||||
'" src="/' + \
|
'" src="/' + \
|
||||||
iconsDir + '/reply.png" ' + \
|
iconsPath + '/reply.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
postJsonObject['object']['inReplyTo'] + \
|
postJsonObject['object']['inReplyTo'] + \
|
||||||
|
@ -1235,7 +1235,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool) -> str:
|
||||||
"""Show an individual post as html
|
"""Show an individual post as html
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
postStr = ''
|
postStr = ''
|
||||||
if likedBy:
|
if likedBy:
|
||||||
likedByNickname = getNicknameFromActor(likedBy)
|
likedByNickname = getNicknameFromActor(likedBy)
|
||||||
|
@ -1271,7 +1271,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
|
|
||||||
postStr += \
|
postStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||||
iconsDir, translate, None,
|
iconsPath, translate, None,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
nickname, domain, port, postJsonObject,
|
nickname, domain, port, postJsonObject,
|
||||||
None, True, False,
|
None, True, False,
|
||||||
|
@ -1294,7 +1294,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsDir, translate, None,
|
iconsPath, translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
@ -1323,7 +1323,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
postStr += \
|
postStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsDir, translate, None,
|
iconsPath, translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port, item,
|
nickname, domain, port, item,
|
||||||
|
@ -1350,14 +1350,14 @@ def htmlPostReplies(cssCache: {},
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool) -> str:
|
||||||
"""Show the replies to an individual post as html
|
"""Show the replies to an individual post as html
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
repliesStr = ''
|
repliesStr = ''
|
||||||
if repliesJson.get('orderedItems'):
|
if repliesJson.get('orderedItems'):
|
||||||
for item in repliesJson['orderedItems']:
|
for item in repliesJson['orderedItems']:
|
||||||
repliesStr += \
|
repliesStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsDir, translate, None,
|
iconsPath, translate, None,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
nickname, domain, port, item,
|
nickname, domain, port, item,
|
||||||
None, True, False,
|
None, True, False,
|
||||||
|
|
|
@ -245,7 +245,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
profileStr += ' </form>\n'
|
profileStr += ' </form>\n'
|
||||||
profileStr += '</div>\n'
|
profileStr += '</div>\n'
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
i = 0
|
i = 0
|
||||||
for item in parseUserFeed(session, outboxUrl, asHeader,
|
for item in parseUserFeed(session, outboxUrl, asHeader,
|
||||||
projectVersion, httpPrefix, domain):
|
projectVersion, httpPrefix, domain):
|
||||||
|
@ -257,7 +257,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
continue
|
continue
|
||||||
profileStr += \
|
profileStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||||
iconsDir, translate, None, baseDir,
|
iconsPath, translate, None, baseDir,
|
||||||
session, cachedWebfingers, personCache,
|
session, cachedWebfingers, personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
item, avatarUrl, False, False,
|
item, avatarUrl, False, False,
|
||||||
|
@ -273,7 +273,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
|
|
||||||
|
|
||||||
def getProfileHeader(baseDir: str, nickname: str, domain: str,
|
def getProfileHeader(baseDir: str, nickname: str, domain: str,
|
||||||
domainFull: str, translate: {}, iconsDir: str,
|
domainFull: str, translate: {}, iconsPath: str,
|
||||||
defaultTimeline: str,
|
defaultTimeline: str,
|
||||||
displayName: str,
|
displayName: str,
|
||||||
avatarDescription: str,
|
avatarDescription: str,
|
||||||
|
@ -302,7 +302,7 @@ def getProfileHeader(baseDir: str, nickname: str, domain: str,
|
||||||
' <a href="/users/' + nickname + \
|
' <a href="/users/' + nickname + \
|
||||||
'/qrcode.png" alt="' + translate['QR Code'] + '" title="' + \
|
'/qrcode.png" alt="' + translate['QR Code'] + '" title="' + \
|
||||||
translate['QR Code'] + '">' + \
|
translate['QR Code'] + '">' + \
|
||||||
'<img class="qrcode" src="/' + iconsDir + \
|
'<img class="qrcode" src="/' + iconsPath + \
|
||||||
'/qrcode.png" /></a></p>\n'
|
'/qrcode.png" /></a></p>\n'
|
||||||
htmlStr += ' <p>' + profileDescriptionShort + '</p>\n'
|
htmlStr += ' <p>' + profileDescriptionShort + '</p>\n'
|
||||||
htmlStr += loginButton
|
htmlStr += loginButton
|
||||||
|
@ -451,21 +451,21 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
donateSection += ' </center>\n'
|
donateSection += ' </center>\n'
|
||||||
donateSection += '</div>\n'
|
donateSection += '</div>\n'
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
if not authorized:
|
if not authorized:
|
||||||
loginButton = headerButtonsFrontScreen(translate, nickname,
|
loginButton = headerButtonsFrontScreen(translate, nickname,
|
||||||
'features', authorized,
|
'features', authorized,
|
||||||
iconsAsButtons, iconsDir)
|
iconsAsButtons, iconsPath)
|
||||||
else:
|
else:
|
||||||
editProfileStr = \
|
editProfileStr = \
|
||||||
'<a class="imageAnchor" href="' + usersPath + '/editprofile">' + \
|
'<a class="imageAnchor" href="' + usersPath + '/editprofile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsPath + \
|
||||||
'/edit.png" title="' + translate['Edit'] + \
|
'/edit.png" title="' + translate['Edit'] + \
|
||||||
'" alt="| ' + translate['Edit'] + '" class="timelineicon"/></a>\n'
|
'" alt="| ' + translate['Edit'] + '" class="timelineicon"/></a>\n'
|
||||||
|
|
||||||
logoutStr = \
|
logoutStr = \
|
||||||
'<a class="imageAnchor" href="/logout">' + \
|
'<a class="imageAnchor" href="/logout">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsPath + \
|
||||||
'/logout.png" title="' + translate['Logout'] + \
|
'/logout.png" title="' + translate['Logout'] + \
|
||||||
'" alt="| ' + translate['Logout'] + \
|
'" alt="| ' + translate['Logout'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -553,11 +553,11 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
profileHeaderStr += ' <tbody>\n'
|
profileHeaderStr += ' <tbody>\n'
|
||||||
profileHeaderStr += ' <tr>\n'
|
profileHeaderStr += ' <tr>\n'
|
||||||
profileHeaderStr += ' <td valign="top" class="col-left">\n'
|
profileHeaderStr += ' <td valign="top" class="col-left">\n'
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
profileHeaderStr += \
|
profileHeaderStr += \
|
||||||
getLeftColumnContent(baseDir, 'news', domainFull,
|
getLeftColumnContent(baseDir, 'news', domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsDir, False,
|
iconsPath, False,
|
||||||
False, None, rssIconAtTop, True,
|
False, None, rssIconAtTop, True,
|
||||||
True)
|
True)
|
||||||
profileHeaderStr += ' </td>\n'
|
profileHeaderStr += ' </td>\n'
|
||||||
|
@ -566,7 +566,7 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
avatarUrl = profileJson['icon']['url']
|
avatarUrl = profileJson['icon']['url']
|
||||||
profileHeaderStr = \
|
profileHeaderStr = \
|
||||||
getProfileHeader(baseDir, nickname, domain,
|
getProfileHeader(baseDir, nickname, domain,
|
||||||
domainFull, translate, iconsDir,
|
domainFull, translate, iconsPath,
|
||||||
defaultTimeline, displayName,
|
defaultTimeline, displayName,
|
||||||
avatarDescription,
|
avatarDescription,
|
||||||
profileDescriptionShort,
|
profileDescriptionShort,
|
||||||
|
@ -668,11 +668,11 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
if isSystemAccount(nickname):
|
if isSystemAccount(nickname):
|
||||||
profileFooterStr = ' </td>\n'
|
profileFooterStr = ' </td>\n'
|
||||||
profileFooterStr += ' <td valign="top" class="col-right">\n'
|
profileFooterStr += ' <td valign="top" class="col-right">\n'
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
profileFooterStr += \
|
profileFooterStr += \
|
||||||
getRightColumnContent(baseDir, 'news', domainFull,
|
getRightColumnContent(baseDir, 'news', domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsDir, False, False,
|
iconsPath, False, False,
|
||||||
newswire, False,
|
newswire, False,
|
||||||
False, None, False, False,
|
False, None, False, False,
|
||||||
False, True, authorized, True)
|
False, True, authorized, True)
|
||||||
|
@ -699,7 +699,7 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
"""Shows posts on the profile screen
|
"""Shows posts on the profile screen
|
||||||
These should only be public posts
|
These should only be public posts
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
separatorStr = htmlPostSeparator(baseDir, None)
|
separatorStr = htmlPostSeparator(baseDir, None)
|
||||||
profileStr = ''
|
profileStr = ''
|
||||||
maxItems = 4
|
maxItems = 4
|
||||||
|
@ -723,7 +723,7 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsDir, translate, None,
|
iconsPath, translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port, item,
|
nickname, domain, port, item,
|
||||||
|
@ -754,7 +754,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
|
||||||
"""
|
"""
|
||||||
profileStr = ''
|
profileStr = ''
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
if authorized and pageNumber:
|
if authorized and pageNumber:
|
||||||
if authorized and pageNumber > 1:
|
if authorized and pageNumber > 1:
|
||||||
# page up arrow
|
# page up arrow
|
||||||
|
@ -763,7 +763,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
|
||||||
' <a href="' + actor + '/' + feedName + \
|
' <a href="' + actor + '/' + feedName + \
|
||||||
'?page=' + str(pageNumber - 1) + \
|
'?page=' + str(pageNumber - 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsDir + '/pageup.png" title="' + \
|
iconsPath + '/pageup.png" title="' + \
|
||||||
translate['Page up'] + '" alt="' + \
|
translate['Page up'] + '" alt="' + \
|
||||||
translate['Page up'] + '"></a>\n' + \
|
translate['Page up'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
@ -783,7 +783,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
|
||||||
' <a href="' + actor + '/' + feedName + \
|
' <a href="' + actor + '/' + feedName + \
|
||||||
'?page=' + str(pageNumber + 1) + \
|
'?page=' + str(pageNumber + 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsDir + '/pagedown.png" title="' + \
|
iconsPath + '/pagedown.png" title="' + \
|
||||||
translate['Page down'] + '" alt="' + \
|
translate['Page down'] + '" alt="' + \
|
||||||
translate['Page down'] + '"></a>\n' + \
|
translate['Page down'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
|
|
@ -100,7 +100,7 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
||||||
callingDomain: str) -> str:
|
callingDomain: str) -> str:
|
||||||
"""Search results for shared items
|
"""Search results for shared items
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
currPage = 1
|
currPage = 1
|
||||||
ctr = 0
|
ctr = 0
|
||||||
sharedItemsForm = ''
|
sharedItemsForm = ''
|
||||||
|
@ -211,7 +211,7 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
||||||
'" type="submit" name="submitSearch">\n'
|
'" type="submit" name="submitSearch">\n'
|
||||||
sharedItemsForm += \
|
sharedItemsForm += \
|
||||||
' <img loading="lazy" ' + \
|
' <img loading="lazy" ' + \
|
||||||
'class="pageicon" src="/' + iconsDir + \
|
'class="pageicon" src="/' + iconsPath + \
|
||||||
'/pageup.png" title="' + \
|
'/pageup.png" title="' + \
|
||||||
translate['Page up'] + \
|
translate['Page up'] + \
|
||||||
'" alt="' + translate['Page up'] + \
|
'" alt="' + translate['Page up'] + \
|
||||||
|
@ -245,7 +245,7 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
||||||
'" type="submit" name="submitSearch">\n'
|
'" type="submit" name="submitSearch">\n'
|
||||||
sharedItemsForm += \
|
sharedItemsForm += \
|
||||||
' <img loading="lazy" ' + \
|
' <img loading="lazy" ' + \
|
||||||
'class="pageicon" src="/' + iconsDir + \
|
'class="pageicon" src="/' + iconsPath + \
|
||||||
'/pagedown.png" title="' + \
|
'/pagedown.png" title="' + \
|
||||||
translate['Page down'] + \
|
translate['Page down'] + \
|
||||||
'" alt="' + translate['Page down'] + \
|
'" alt="' + translate['Page down'] + \
|
||||||
|
@ -479,7 +479,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
print('WARN: hashtag file not found ' + hashtagIndexFile)
|
print('WARN: hashtag file not found ' + hashtagIndexFile)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
separatorStr = htmlPostSeparator(baseDir, None)
|
separatorStr = htmlPostSeparator(baseDir, None)
|
||||||
|
|
||||||
# check that the directory for the nickname exists
|
# check that the directory for the nickname exists
|
||||||
|
@ -527,7 +527,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
'<img style="width:3%;min-width:50px" ' + \
|
'<img style="width:3%;min-width:50px" ' + \
|
||||||
'loading="lazy" alt="RSS 2.0" ' + \
|
'loading="lazy" alt="RSS 2.0" ' + \
|
||||||
'title="RSS 2.0" src="/' + \
|
'title="RSS 2.0" src="/' + \
|
||||||
iconsDir + '/logorss.png" /></a></center>'
|
iconsPath + '/logorss.png" /></a></center>'
|
||||||
|
|
||||||
if startIndex > 0:
|
if startIndex > 0:
|
||||||
# previous page link
|
# previous page link
|
||||||
|
@ -536,7 +536,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
' <a href="/tags/' + hashtag + '?page=' + \
|
' <a href="/tags/' + hashtag + '?page=' + \
|
||||||
str(pageNumber - 1) + \
|
str(pageNumber - 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsDir + '/pageup.png" title="' + \
|
iconsPath + '/pageup.png" title="' + \
|
||||||
translate['Page up'] + \
|
translate['Page up'] + \
|
||||||
'" alt="' + translate['Page up'] + \
|
'" alt="' + translate['Page up'] + \
|
||||||
'"></a>\n </center>\n'
|
'"></a>\n </center>\n'
|
||||||
|
@ -571,7 +571,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsDir, translate, None,
|
iconsPath, translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
@ -594,7 +594,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
' <center>\n' + \
|
' <center>\n' + \
|
||||||
' <a href="/tags/' + hashtag + \
|
' <a href="/tags/' + hashtag + \
|
||||||
'?page=' + str(pageNumber + 1) + \
|
'?page=' + str(pageNumber + 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + iconsDir + \
|
'"><img loading="lazy" class="pageicon" src="/' + iconsPath + \
|
||||||
'/pagedown.png" title="' + translate['Page down'] + \
|
'/pagedown.png" title="' + translate['Page down'] + \
|
||||||
'" alt="' + translate['Page down'] + '"></a>' + \
|
'" alt="' + translate['Page down'] + '"></a>' + \
|
||||||
' </center>'
|
' </center>'
|
||||||
|
@ -878,7 +878,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
'</h5></center>'
|
'</h5></center>'
|
||||||
return historySearchForm
|
return historySearchForm
|
||||||
|
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
separatorStr = htmlPostSeparator(baseDir, None)
|
separatorStr = htmlPostSeparator(baseDir, None)
|
||||||
|
|
||||||
# ensure that the page number is in bounds
|
# ensure that the page number is in bounds
|
||||||
|
@ -909,7 +909,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsDir, translate, None,
|
iconsPath, translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
|
|
@ -101,7 +101,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
|
|
||||||
# directory where icons are found
|
# directory where icons are found
|
||||||
# This changes depending upon theme
|
# This changes depending upon theme
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
|
|
||||||
separatorStr = ''
|
separatorStr = ''
|
||||||
if boxName != 'tlmedia':
|
if boxName != 'tlmedia':
|
||||||
|
@ -212,7 +212,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
'class="timelineicon" alt="' + \
|
'class="timelineicon" alt="' + \
|
||||||
translate['Approve follow requests'] + \
|
translate['Approve follow requests'] + \
|
||||||
'" title="' + translate['Approve follow requests'] + \
|
'" title="' + translate['Approve follow requests'] + \
|
||||||
'" src="/' + iconsDir + '/person.png"/></a>\n'
|
'" src="/' + iconsPath + '/person.png"/></a>\n'
|
||||||
break
|
break
|
||||||
|
|
||||||
# benchmark 3
|
# benchmark 3
|
||||||
|
@ -275,7 +275,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
newPostButtonStr += \
|
newPostButtonStr += \
|
||||||
'<a class="imageAnchor" href="' + usersPath + \
|
'<a class="imageAnchor" href="' + usersPath + \
|
||||||
'/newdm"><img loading="lazy" src="/' + \
|
'/newdm"><img loading="lazy" src="/' + \
|
||||||
iconsDir + '/newpost.png" title="' + \
|
iconsPath + '/newpost.png" title="' + \
|
||||||
translate['Create a new DM'] + \
|
translate['Create a new DM'] + \
|
||||||
'" alt="| ' + translate['Create a new DM'] + \
|
'" alt="| ' + translate['Create a new DM'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -289,7 +289,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
newPostButtonStr += \
|
newPostButtonStr += \
|
||||||
'<a class="imageAnchor" href="' + usersPath + \
|
'<a class="imageAnchor" href="' + usersPath + \
|
||||||
'/newblog"><img loading="lazy" src="/' + \
|
'/newblog"><img loading="lazy" src="/' + \
|
||||||
iconsDir + '/newpost.png" title="' + \
|
iconsPath + '/newpost.png" title="' + \
|
||||||
translate['Create a new post'] + '" alt="| ' + \
|
translate['Create a new post'] + '" alt="| ' + \
|
||||||
translate['Create a new post'] + \
|
translate['Create a new post'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -303,7 +303,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
newPostButtonStr += \
|
newPostButtonStr += \
|
||||||
'<a class="imageAnchor" href="' + usersPath + \
|
'<a class="imageAnchor" href="' + usersPath + \
|
||||||
'/newevent"><img loading="lazy" src="/' + \
|
'/newevent"><img loading="lazy" src="/' + \
|
||||||
iconsDir + '/newpost.png" title="' + \
|
iconsPath + '/newpost.png" title="' + \
|
||||||
translate['Create a new event'] + '" alt="| ' + \
|
translate['Create a new event'] + '" alt="| ' + \
|
||||||
translate['Create a new event'] + \
|
translate['Create a new event'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -318,7 +318,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
newPostButtonStr += \
|
newPostButtonStr += \
|
||||||
'<a class="imageAnchor" href="' + usersPath + \
|
'<a class="imageAnchor" href="' + usersPath + \
|
||||||
'/newpost"><img loading="lazy" src="/' + \
|
'/newpost"><img loading="lazy" src="/' + \
|
||||||
iconsDir + '/newpost.png" title="' + \
|
iconsPath + '/newpost.png" title="' + \
|
||||||
translate['Create a new post'] + '" alt="| ' + \
|
translate['Create a new post'] + '" alt="| ' + \
|
||||||
translate['Create a new post'] + \
|
translate['Create a new post'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -332,7 +332,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
newPostButtonStr += \
|
newPostButtonStr += \
|
||||||
'<a class="imageAnchor" href="' + usersPath + \
|
'<a class="imageAnchor" href="' + usersPath + \
|
||||||
'/newfollowers"><img loading="lazy" src="/' + \
|
'/newfollowers"><img loading="lazy" src="/' + \
|
||||||
iconsDir + '/newpost.png" title="' + \
|
iconsPath + '/newpost.png" title="' + \
|
||||||
translate['Create a new post'] + \
|
translate['Create a new post'] + \
|
||||||
'" alt="| ' + translate['Create a new post'] + \
|
'" alt="| ' + translate['Create a new post'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -367,7 +367,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
sharesButtonStr, bookmarksButtonStr,
|
sharesButtonStr, bookmarksButtonStr,
|
||||||
eventsButtonStr, moderationButtonStr,
|
eventsButtonStr, moderationButtonStr,
|
||||||
newPostButtonStr, baseDir, nickname,
|
newPostButtonStr, baseDir, nickname,
|
||||||
domain, iconsDir, timelineStartTime,
|
domain, iconsPath, timelineStartTime,
|
||||||
newCalendarEvent, calendarPath,
|
newCalendarEvent, calendarPath,
|
||||||
calendarImage, followApprovals,
|
calendarImage, followApprovals,
|
||||||
iconsAsButtons)
|
iconsAsButtons)
|
||||||
|
@ -390,7 +390,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
# left column
|
# left column
|
||||||
leftColumnStr = \
|
leftColumnStr = \
|
||||||
getLeftColumnContent(baseDir, nickname, domainFull,
|
getLeftColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate, iconsDir,
|
httpPrefix, translate, iconsPath,
|
||||||
editor, False, None, rssIconAtTop,
|
editor, False, None, rssIconAtTop,
|
||||||
True, False)
|
True, False)
|
||||||
tlStr += ' <td valign="top" class="col-left">' + \
|
tlStr += ' <td valign="top" class="col-left">' + \
|
||||||
|
@ -408,7 +408,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
sharesButtonStr, bookmarksButtonStr,
|
sharesButtonStr, bookmarksButtonStr,
|
||||||
eventsButtonStr, moderationButtonStr,
|
eventsButtonStr, moderationButtonStr,
|
||||||
newPostButtonStr, baseDir, nickname,
|
newPostButtonStr, baseDir, nickname,
|
||||||
domain, iconsDir, timelineStartTime,
|
domain, iconsPath, timelineStartTime,
|
||||||
newCalendarEvent, calendarPath,
|
newCalendarEvent, calendarPath,
|
||||||
calendarImage, followApprovals,
|
calendarImage, followApprovals,
|
||||||
iconsAsButtons)
|
iconsAsButtons)
|
||||||
|
@ -482,7 +482,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
' <a href="' + usersPath + '/' + boxName + \
|
' <a href="' + usersPath + '/' + boxName + \
|
||||||
'?page=' + str(pageNumber - 1) + \
|
'?page=' + str(pageNumber - 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsDir + '/pageup.png" title="' + \
|
iconsPath + '/pageup.png" title="' + \
|
||||||
translate['Page up'] + '" alt="' + \
|
translate['Page up'] + '" alt="' + \
|
||||||
translate['Page up'] + '"></a>\n' + \
|
translate['Page up'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
@ -542,7 +542,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
currTlStr = \
|
currTlStr = \
|
||||||
individualPostAsHtml(False, recentPostsCache,
|
individualPostAsHtml(False, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsDir, translate, pageNumber,
|
iconsPath, translate, pageNumber,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
@ -579,7 +579,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
' <a href="' + usersPath + '/' + boxName + '?page=' + \
|
' <a href="' + usersPath + '/' + boxName + '?page=' + \
|
||||||
str(pageNumber + 1) + \
|
str(pageNumber + 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsDir + '/pagedown.png" title="' + \
|
iconsPath + '/pagedown.png" title="' + \
|
||||||
translate['Page down'] + '" alt="' + \
|
translate['Page down'] + '" alt="' + \
|
||||||
translate['Page down'] + '"></a>\n' + \
|
translate['Page down'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
@ -589,7 +589,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
|
|
||||||
# right column
|
# right column
|
||||||
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
|
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate, iconsDir,
|
httpPrefix, translate, iconsPath,
|
||||||
moderator, editor,
|
moderator, editor,
|
||||||
newswire, positiveVoting,
|
newswire, positiveVoting,
|
||||||
False, None, True,
|
False, None, True,
|
||||||
|
@ -662,13 +662,13 @@ def htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
|
||||||
timelineStr = ''
|
timelineStr = ''
|
||||||
|
|
||||||
if pageNumber > 1:
|
if pageNumber > 1:
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
timelineStr += \
|
timelineStr += \
|
||||||
' <center>\n' + \
|
' <center>\n' + \
|
||||||
' <a href="' + actor + '/tlshares?page=' + \
|
' <a href="' + actor + '/tlshares?page=' + \
|
||||||
str(pageNumber - 1) + \
|
str(pageNumber - 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsDir + '/pageup.png" title="' + translate['Page up'] + \
|
iconsPath + '/pageup.png" title="' + translate['Page up'] + \
|
||||||
'" alt="' + translate['Page up'] + '"></a>\n' + \
|
'" alt="' + translate['Page up'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
|
||||||
|
@ -685,13 +685,13 @@ def htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
|
||||||
showContactButton, showRemoveButton)
|
showContactButton, showRemoveButton)
|
||||||
|
|
||||||
if not lastPage:
|
if not lastPage:
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
timelineStr += \
|
timelineStr += \
|
||||||
' <center>\n' + \
|
' <center>\n' + \
|
||||||
' <a href="' + actor + '/tlshares?page=' + \
|
' <a href="' + actor + '/tlshares?page=' + \
|
||||||
str(pageNumber + 1) + \
|
str(pageNumber + 1) + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsDir + '/pagedown.png" title="' + translate['Page down'] + \
|
iconsPath + '/pagedown.png" title="' + translate['Page down'] + \
|
||||||
'" alt="' + translate['Page down'] + '"></a>\n' + \
|
'" alt="' + translate['Page down'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
|
||||||
|
@ -731,7 +731,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
newPostButtonStr: str,
|
newPostButtonStr: str,
|
||||||
baseDir: str,
|
baseDir: str,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
iconsDir: str,
|
iconsPath: str,
|
||||||
timelineStartTime,
|
timelineStartTime,
|
||||||
newCalendarEvent: bool,
|
newCalendarEvent: bool,
|
||||||
calendarPath: str,
|
calendarPath: str,
|
||||||
|
@ -910,7 +910,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
'<a class="imageAnchor" href="' + usersPath + \
|
'<a class="imageAnchor" href="' + usersPath + \
|
||||||
'/search"><img loading="lazy" src="/' + \
|
'/search"><img loading="lazy" src="/' + \
|
||||||
iconsDir + '/search.png" title="' + \
|
iconsPath + '/search.png" title="' + \
|
||||||
translate['Search and follow'] + '" alt="| ' + \
|
translate['Search and follow'] + '" alt="| ' + \
|
||||||
translate['Search and follow'] + \
|
translate['Search and follow'] + \
|
||||||
'" class="timelineicon"/></a>'
|
'" class="timelineicon"/></a>'
|
||||||
|
@ -937,7 +937,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
' <a class="imageAnchor" href="' + \
|
' <a class="imageAnchor" href="' + \
|
||||||
usersPath + calendarPath + \
|
usersPath + calendarPath + \
|
||||||
'"><img loading="lazy" src="/' + iconsDir + '/' + \
|
'"><img loading="lazy" src="/' + iconsPath + '/' + \
|
||||||
calendarImage + '" title="' + translate['Calendar'] + \
|
calendarImage + '" title="' + translate['Calendar'] + \
|
||||||
'" alt="| ' + calendarAltText + \
|
'" alt="| ' + calendarAltText + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -954,7 +954,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
' <a class="imageAnchor" href="' + \
|
' <a class="imageAnchor" href="' + \
|
||||||
usersPath + '/minimal' + \
|
usersPath + '/minimal' + \
|
||||||
'"><img loading="lazy" src="/' + iconsDir + \
|
'"><img loading="lazy" src="/' + iconsPath + \
|
||||||
'/showhide.png" title="' + translate['Show/Hide Buttons'] + \
|
'/showhide.png" title="' + translate['Show/Hide Buttons'] + \
|
||||||
'" alt="| ' + translate['Show/Hide Buttons'] + \
|
'" alt="| ' + translate['Show/Hide Buttons'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -976,7 +976,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
'<a class="imageAnchorMobile" href="' + \
|
'<a class="imageAnchorMobile" href="' + \
|
||||||
usersPath + '/newswiremobile">' + \
|
usersPath + '/newswiremobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsPath + \
|
||||||
'/newswire.png" title="' + translate['News'] + \
|
'/newswire.png" title="' + translate['News'] + \
|
||||||
'" alt="| ' + translate['News'] + \
|
'" alt="| ' + translate['News'] + \
|
||||||
'" class="timelineicon"/></a>'
|
'" class="timelineicon"/></a>'
|
||||||
|
@ -994,7 +994,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
'<a class="imageAnchorMobile" href="' + \
|
'<a class="imageAnchorMobile" href="' + \
|
||||||
usersPath + '/linksmobile">' + \
|
usersPath + '/linksmobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsPath + \
|
||||||
'/links.png" title="' + translate['Edit Links'] + \
|
'/links.png" title="' + translate['Edit Links'] + \
|
||||||
'" alt="| ' + translate['Edit Links'] + \
|
'" alt="| ' + translate['Edit Links'] + \
|
||||||
'" class="timelineicon"/></a>'
|
'" class="timelineicon"/></a>'
|
||||||
|
|
|
@ -283,12 +283,12 @@ def getPersonAvatarUrl(baseDir: str, personUrl: str, personCache: {},
|
||||||
def getIconsWebPath(baseDir: str) -> str:
|
def getIconsWebPath(baseDir: str) -> str:
|
||||||
"""Returns the web path where icons exist
|
"""Returns the web path where icons exist
|
||||||
"""
|
"""
|
||||||
iconsDir = 'icons'
|
iconsPath = 'icons'
|
||||||
theme = getConfigParam(baseDir, 'theme')
|
theme = getConfigParam(baseDir, 'theme')
|
||||||
if theme:
|
if theme:
|
||||||
if os.path.isdir(baseDir + '/theme/' + theme + '/icons'):
|
if os.path.isdir(baseDir + '/theme/' + theme + '/icons'):
|
||||||
iconsDir = 'icons/' + theme
|
iconsPath = 'icons/' + theme
|
||||||
return iconsDir
|
return iconsPath
|
||||||
|
|
||||||
|
|
||||||
def scheduledPostsExist(baseDir: str, nickname: str, domain: str) -> bool:
|
def scheduledPostsExist(baseDir: str, nickname: str, domain: str) -> bool:
|
||||||
|
@ -725,7 +725,7 @@ def getPostAttachmentsAsHtml(postJsonObject: {}, boxName: str, translate: {},
|
||||||
def htmlPostSeparator(baseDir: str, column: str) -> str:
|
def htmlPostSeparator(baseDir: str, column: str) -> str:
|
||||||
"""Returns the html for a timeline post separator image
|
"""Returns the html for a timeline post separator image
|
||||||
"""
|
"""
|
||||||
iconsDir = getIconsWebPath(baseDir)
|
iconsPath = getIconsWebPath(baseDir)
|
||||||
theme = getConfigParam(baseDir, 'theme')
|
theme = getConfigParam(baseDir, 'theme')
|
||||||
filename = 'separator.png'
|
filename = 'separator.png'
|
||||||
if column:
|
if column:
|
||||||
|
@ -735,7 +735,7 @@ def htmlPostSeparator(baseDir: str, column: str) -> str:
|
||||||
if os.path.isfile(separatorImageFilename):
|
if os.path.isfile(separatorImageFilename):
|
||||||
separatorStr = \
|
separatorStr = \
|
||||||
'<div class="postSeparatorImage"><center>' + \
|
'<div class="postSeparatorImage"><center>' + \
|
||||||
'<img src="/' + iconsDir + '/' + filename + '"/>' + \
|
'<img src="/' + iconsPath + '/' + filename + '"/>' + \
|
||||||
'</center></div>\n'
|
'</center></div>\n'
|
||||||
return separatorStr
|
return separatorStr
|
||||||
|
|
||||||
|
@ -744,7 +744,7 @@ def headerButtonsFrontScreen(translate: {},
|
||||||
nickname: str, boxName: str,
|
nickname: str, boxName: str,
|
||||||
authorized: bool,
|
authorized: bool,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
iconsDir: bool) -> str:
|
iconsPath: bool) -> str:
|
||||||
"""Returns the header buttons for the front page of a news instance
|
"""Returns the header buttons for the front page of a news instance
|
||||||
"""
|
"""
|
||||||
headerStr = ''
|
headerStr = ''
|
||||||
|
@ -785,13 +785,13 @@ def headerButtonsFrontScreen(translate: {},
|
||||||
headerStr += \
|
headerStr += \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
'/users/news/newswiremobile">' + \
|
'/users/news/newswiremobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsPath + \
|
||||||
'/newswire.png" title="' + translate['Newswire'] + \
|
'/newswire.png" title="' + translate['Newswire'] + \
|
||||||
'" alt="| ' + translate['Newswire'] + '"/></a>\n'
|
'" alt="| ' + translate['Newswire'] + '"/></a>\n'
|
||||||
headerStr += \
|
headerStr += \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
'/users/news/linksmobile">' + \
|
'/users/news/linksmobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsDir + \
|
'<img loading="lazy" src="/' + iconsPath + \
|
||||||
'/links.png" title="' + translate['Links'] + \
|
'/links.png" title="' + translate['Links'] + \
|
||||||
'" alt="| ' + translate['Links'] + '"/></a>\n'
|
'" alt="| ' + translate['Links'] + '"/></a>\n'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue