forked from indymedia/epicyon
Remove icons path variable
parent
8ad67ad425
commit
ffdc49a56c
22
blog.py
22
blog.py
|
@ -10,7 +10,6 @@ import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from content import replaceEmojiFromTags
|
from content import replaceEmojiFromTags
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_utils import getPostAttachmentsAsHtml
|
from webapp_utils import getPostAttachmentsAsHtml
|
||||||
|
@ -392,7 +391,6 @@ def htmlBlogPost(authorized: bool,
|
||||||
None, False)
|
None, False)
|
||||||
|
|
||||||
# show rss links
|
# show rss links
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
blogStr += '<p class="rssfeed">'
|
blogStr += '<p class="rssfeed">'
|
||||||
|
|
||||||
blogStr += '<a href="' + httpPrefix + '://' + \
|
blogStr += '<a href="' + httpPrefix + '://' + \
|
||||||
|
@ -400,14 +398,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="/' + \
|
||||||
iconsPath + '/logorss.png" /></a>'
|
'icons/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="/' + \
|
||||||
# iconsPath + '/rss3.png" /></a>'
|
# 'icons/rss3.png" /></a>'
|
||||||
|
|
||||||
blogStr += '</p>'
|
blogStr += '</p>'
|
||||||
|
|
||||||
|
@ -452,7 +450,6 @@ 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:
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
navigateStr = '<p>'
|
navigateStr = '<p>'
|
||||||
if pageNumber > 1:
|
if pageNumber > 1:
|
||||||
# show previous button
|
# show previous button
|
||||||
|
@ -460,7 +457,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="/' + iconsPath + \
|
'src="/icons' + \
|
||||||
'/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
|
||||||
|
@ -468,7 +465,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="/' + iconsPath + \
|
'src="/icons' + \
|
||||||
'/prev.png" class="buttonnext"/></a>\n'
|
'/prev.png" class="buttonnext"/></a>\n'
|
||||||
navigateStr += '</p>'
|
navigateStr += '</p>'
|
||||||
blogStr += navigateStr
|
blogStr += navigateStr
|
||||||
|
@ -493,13 +490,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="/' + \
|
||||||
iconsPath + '/logorss.png" /></a>'
|
'icons/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="/' + \
|
||||||
# iconsPath + '/rss3.png" /></a>'
|
# 'icons/rss3.png" /></a>'
|
||||||
|
|
||||||
blogStr += '</p>'
|
blogStr += '</p>'
|
||||||
return blogStr + htmlFooter()
|
return blogStr + htmlFooter()
|
||||||
|
@ -723,8 +720,6 @@ 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
|
||||||
|
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
|
|
||||||
editBlogText = '<h1">' + translate['Write your post text below.'] + '</h1>'
|
editBlogText = '<h1">' + translate['Write your post text below.'] + '</h1>'
|
||||||
|
|
||||||
if os.path.isfile(baseDir + '/accounts/newpost.txt'):
|
if os.path.isfile(baseDir + '/accounts/newpost.txt'):
|
||||||
|
@ -765,8 +760,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="/icons/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">'
|
||||||
|
@ -797,7 +791,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
|
||||||
|
|
||||||
editBlogForm += ' <div class="dropbtn">'
|
editBlogForm += ' <div class="dropbtn">'
|
||||||
editBlogForm += \
|
editBlogForm += \
|
||||||
' <img loading="lazy" alt="" title="" src="/' + iconsPath + \
|
' <img loading="lazy" alt="" title="" src="/icons' + \
|
||||||
'/' + scopeIcon + '"/><b class="scope-desc">' + \
|
'/' + scopeIcon + '"/><b class="scope-desc">' + \
|
||||||
scopeDescription + '</b>'
|
scopeDescription + '</b>'
|
||||||
editBlogForm += ' </div>'
|
editBlogForm += ' </div>'
|
||||||
|
|
3
inbox.py
3
inbox.py
|
@ -58,7 +58,6 @@ from posts import isMuted
|
||||||
from posts import isImageMedia
|
from posts import isImageMedia
|
||||||
from posts import sendSignedJson
|
from posts import sendSignedJson
|
||||||
from posts import sendToFollowersThread
|
from posts import sendToFollowersThread
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_post import individualPostAsHtml
|
from webapp_post import individualPostAsHtml
|
||||||
from question import questionUpdateVotes
|
from question import questionUpdateVotes
|
||||||
from media import replaceYouTube
|
from media import replaceYouTube
|
||||||
|
@ -173,7 +172,7 @@ def inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
if boxname != 'tlevents' and boxname != 'outbox':
|
if boxname != 'tlevents' and boxname != 'outbox':
|
||||||
boxname = 'inbox'
|
boxname = 'inbox'
|
||||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||||
getIconsWebPath(baseDir), translate, pageNumber,
|
'icons', translate, pageNumber,
|
||||||
baseDir, session, cachedWebfingers, personCache,
|
baseDir, session, cachedWebfingers, personCache,
|
||||||
nickname, domain, port, postJsonObject,
|
nickname, domain, port, postJsonObject,
|
||||||
avatarUrl, True, allowDeletion,
|
avatarUrl, True, allowDeletion,
|
||||||
|
|
|
@ -20,7 +20,6 @@ from happening import getCalendarEvents
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_utils import getAltPath
|
from webapp_utils import getAltPath
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
|
|
||||||
|
|
||||||
def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, baseDir: str,
|
def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, baseDir: str,
|
||||||
|
@ -122,8 +121,6 @@ def htmlCalendarDay(cssCache: {}, translate: {},
|
||||||
calendarStr += '</caption>\n'
|
calendarStr += '</caption>\n'
|
||||||
calendarStr += '<tbody>\n'
|
calendarStr += '<tbody>\n'
|
||||||
|
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
|
|
||||||
if dayEvents:
|
if dayEvents:
|
||||||
for eventPost in dayEvents:
|
for eventPost in dayEvents:
|
||||||
eventTime = None
|
eventTime = None
|
||||||
|
@ -156,7 +153,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="/' + \
|
||||||
iconsPath + '/delete.png" /></a></td>\n'
|
'icons/delete.png" /></a></td>\n'
|
||||||
|
|
||||||
if eventTime and eventDescription and eventPlace:
|
if eventTime and eventDescription and eventPlace:
|
||||||
calendarStr += \
|
calendarStr += \
|
||||||
|
@ -201,7 +198,6 @@ 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
|
||||||
"""
|
"""
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
domain = domainFull
|
domain = domainFull
|
||||||
if ':' in domainFull:
|
if ':' in domainFull:
|
||||||
domain = domainFull.split(':')[0]
|
domain = domainFull.split(':')[0]
|
||||||
|
@ -302,7 +298,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="/' + iconsPath + \
|
'" title="' + translate['Previous month'] + '" src="/icons' + \
|
||||||
'/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 +308,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="/' + iconsPath + \
|
'" title="' + translate['Next month'] + '" src="/icons' + \
|
||||||
'/prev.png" class="buttonnext"/></a>\n'
|
'/prev.png" class="buttonnext"/></a>\n'
|
||||||
calendarStr += '</caption>\n'
|
calendarStr += '</caption>\n'
|
||||||
calendarStr += '<thead>\n'
|
calendarStr += '<thead>\n'
|
||||||
|
|
|
@ -16,7 +16,6 @@ from webapp_utils import htmlPostSeparator
|
||||||
from webapp_utils import getLeftImageFile
|
from webapp_utils import getLeftImageFile
|
||||||
from webapp_utils import getImageFile
|
from webapp_utils import getImageFile
|
||||||
from webapp_utils import headerButtonsFrontScreen
|
from webapp_utils import headerButtonsFrontScreen
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_utils import getBannerFile
|
from webapp_utils import getBannerFile
|
||||||
|
@ -136,7 +135,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="/' + \
|
||||||
iconsPath + '/edit.png" /></a>\n'
|
'icons/edit.png" /></a>\n'
|
||||||
|
|
||||||
# RSS icon
|
# RSS icon
|
||||||
if nickname != 'news':
|
if nickname != 'news':
|
||||||
|
@ -155,7 +154,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="/' + iconsPath + '/logorss.png" /></a>\n'
|
'" src="/icons/logorss.png" /></a>\n'
|
||||||
if rssIconAtTop:
|
if rssIconAtTop:
|
||||||
htmlStr += rssIconStr
|
htmlStr += rssIconStr
|
||||||
htmlStr += ' </div>\n'
|
htmlStr += ' </div>\n'
|
||||||
|
@ -264,8 +263,6 @@ 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'
|
||||||
|
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
|
|
||||||
# is the user a site editor?
|
# is the user a site editor?
|
||||||
if nickname == 'news':
|
if nickname == 'news':
|
||||||
editor = False
|
editor = False
|
||||||
|
@ -287,12 +284,12 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
|
||||||
htmlStr += '<center>' + \
|
htmlStr += '<center>' + \
|
||||||
headerButtonsFrontScreen(translate, nickname,
|
headerButtonsFrontScreen(translate, nickname,
|
||||||
'links', authorized,
|
'links', authorized,
|
||||||
iconsAsButtons, iconsPath) + '</center>'
|
iconsAsButtons, 'icons') + '</center>'
|
||||||
if linksExist(baseDir):
|
if linksExist(baseDir):
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
getLeftColumnContent(baseDir, nickname, domainFull,
|
getLeftColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsPath, editor,
|
'icons', editor,
|
||||||
False, timelinePath,
|
False, timelinePath,
|
||||||
rssIconAtTop, False, False)
|
rssIconAtTop, False, False)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -25,7 +25,6 @@ from webapp_utils import htmlFooter
|
||||||
from webapp_utils import getBannerFile
|
from webapp_utils import getBannerFile
|
||||||
from webapp_utils import htmlPostSeparator
|
from webapp_utils import htmlPostSeparator
|
||||||
from webapp_utils import headerButtonsFrontScreen
|
from webapp_utils import headerButtonsFrontScreen
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
|
|
||||||
|
|
||||||
def votesIndicator(totalVotes: int, positiveVoting: bool) -> str:
|
def votesIndicator(totalVotes: int, positiveVoting: bool) -> str:
|
||||||
|
@ -143,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="/' + \
|
||||||
iconsPath + '/edit_notify.png" /></a>\n'
|
'icons/edit_notify.png" /></a>\n'
|
||||||
else:
|
else:
|
||||||
# show the edit icon
|
# show the edit icon
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
|
@ -153,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="/' + \
|
||||||
iconsPath + '/edit.png" /></a>\n'
|
'icons/edit.png" /></a>\n'
|
||||||
|
|
||||||
# show the RSS icons
|
# show the RSS icons
|
||||||
rssIconStr = \
|
rssIconStr = \
|
||||||
|
@ -162,14 +161,14 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" loading="lazy" alt="' + \
|
'" loading="lazy" alt="' + \
|
||||||
translate['Hashtag Categories RSS Feed'] + '" title="' + \
|
translate['Hashtag Categories RSS Feed'] + '" title="' + \
|
||||||
translate['Hashtag Categories RSS Feed'] + '" src="/' + \
|
translate['Hashtag Categories RSS Feed'] + '" src="/' + \
|
||||||
iconsPath + '/categoriesrss.png" /></a>\n'
|
'icons/categoriesrss.png" /></a>\n'
|
||||||
rssIconStr += \
|
rssIconStr += \
|
||||||
' <a href="/newswire.xml">' + \
|
' <a href="/newswire.xml">' + \
|
||||||
'<img class="' + editImageClass + \
|
'<img class="' + editImageClass + \
|
||||||
'" 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="/' + \
|
||||||
iconsPath + '/logorss.png" /></a>\n'
|
'icons/logorss.png" /></a>\n'
|
||||||
if rssIconAtTop:
|
if rssIconAtTop:
|
||||||
htmlStr += rssIconStr
|
htmlStr += rssIconStr
|
||||||
|
|
||||||
|
@ -183,7 +182,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="/' + \
|
||||||
iconsPath + '/publish.png" /></a>\n'
|
'icons/publish.png" /></a>\n'
|
||||||
|
|
||||||
if editImageClass == 'rightColEdit':
|
if editImageClass == 'rightColEdit':
|
||||||
htmlStr += ' </center>\n'
|
htmlStr += ' </center>\n'
|
||||||
|
@ -197,7 +196,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, iconsPath)
|
positiveVoting, 'icons')
|
||||||
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
|
||||||
|
@ -252,7 +251,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="/' + \
|
||||||
iconsPath + '/vote.png" /></a></p>\n'
|
'icons/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'
|
||||||
|
@ -277,7 +276,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="/' + \
|
||||||
iconsPath + '/vote.png" /></a>'
|
'icons/vote.png" /></a>'
|
||||||
htmlStr += '</p>\n'
|
htmlStr += '</p>\n'
|
||||||
else:
|
else:
|
||||||
htmlStr += '<p class="newswireItem">' + \
|
htmlStr += '<p class="newswireItem">' + \
|
||||||
|
@ -324,8 +323,6 @@ 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'
|
||||||
|
|
||||||
# iconsPath = getIconsWebPath(baseDir)
|
|
||||||
|
|
||||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||||
|
|
||||||
# top banner
|
# top banner
|
||||||
|
@ -422,8 +419,6 @@ 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'
|
||||||
|
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
|
|
||||||
if nickname == 'news':
|
if nickname == 'news':
|
||||||
editor = False
|
editor = False
|
||||||
moderator = False
|
moderator = False
|
||||||
|
@ -449,12 +444,12 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
||||||
htmlStr += '<center>' + \
|
htmlStr += '<center>' + \
|
||||||
headerButtonsFrontScreen(translate, nickname,
|
headerButtonsFrontScreen(translate, nickname,
|
||||||
'newswire', authorized,
|
'newswire', authorized,
|
||||||
iconsAsButtons, iconsPath) + '</center>'
|
iconsAsButtons, 'icons') + '</center>'
|
||||||
if newswire:
|
if newswire:
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
getRightColumnContent(baseDir, nickname, domainFull,
|
getRightColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsPath, moderator, editor,
|
'icons', moderator, editor,
|
||||||
newswire, positiveVoting,
|
newswire, positiveVoting,
|
||||||
False, timelinePath, showPublishButton,
|
False, timelinePath, showPublishButton,
|
||||||
showPublishAsIcon, rssIconAtTop, False,
|
showPublishAsIcon, rssIconAtTop, False,
|
||||||
|
|
|
@ -13,7 +13,6 @@ from utils import getDomainFromActor
|
||||||
from utils import locatePost
|
from utils import locatePost
|
||||||
from utils import loadJson
|
from utils import loadJson
|
||||||
from webapp_utils import getAltPath
|
from webapp_utils import getAltPath
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_post import individualPostAsHtml
|
from webapp_post import individualPostAsHtml
|
||||||
|
@ -33,7 +32,6 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
"""
|
"""
|
||||||
if '/statuses/' not in messageId:
|
if '/statuses/' not in messageId:
|
||||||
return None
|
return None
|
||||||
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)
|
||||||
|
@ -63,7 +61,7 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
deletePostStr = htmlHeaderWithExternalStyle(cssFilename)
|
deletePostStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||||
iconsPath, translate, pageNumber,
|
'icons', translate, pageNumber,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
nickname, domain, port, postJsonObject,
|
nickname, domain, port, postJsonObject,
|
||||||
None, True, False,
|
None, True, False,
|
||||||
|
|
|
@ -12,7 +12,6 @@ from utils import getNicknameFromActor
|
||||||
from utils import getDomainFromActor
|
from utils import getDomainFromActor
|
||||||
from utils import getImageFormats
|
from utils import getImageFormats
|
||||||
from utils import getMediaFormats
|
from utils import getMediaFormats
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import getBannerFile
|
from webapp_utils import getBannerFile
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
|
@ -81,7 +80,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="/' + \
|
||||||
iconsPath + '/' + scopeIcon + '"/><b>' + \
|
'icons/' + scopeIcon + '"/><b>' + \
|
||||||
scopeDescription + '</b></label>\n'
|
scopeDescription + '</b></label>\n'
|
||||||
dropDownContent += ' <ul>\n'
|
dropDownContent += ' <ul>\n'
|
||||||
|
|
||||||
|
@ -89,58 +88,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="/' + \
|
||||||
iconsPath + '/scope_public.png"/><b>' + \
|
'icons/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 == 'tlfeatures':
|
if defaultTimeline == 'tlfeatures':
|
||||||
dropDownContent += \
|
dropDownContent += \
|
||||||
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
|
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
|
||||||
'"><img loading="lazy" alt="" title="" src="/' + \
|
'"><img loading="lazy" alt="" title="" src="/' + \
|
||||||
iconsPath + '/scope_blog.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_blog.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_unlisted.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_followers.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_dm.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_reminder.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_event.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_report.png"/><b>' + \
|
'icons/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'
|
||||||
|
|
||||||
|
@ -148,13 +147,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="/' + \
|
||||||
iconsPath + '/scope_share.png"/><b>' + \
|
'icons/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="/' + \
|
||||||
iconsPath + '/scope_question.png"/><b>' + \
|
'icons/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'
|
||||||
|
|
||||||
|
@ -174,7 +173,6 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
defaultTimeline: str, newswire: {}) -> str:
|
defaultTimeline: str, newswire: {}) -> str:
|
||||||
"""New post screen
|
"""New post screen
|
||||||
"""
|
"""
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
replyStr = ''
|
replyStr = ''
|
||||||
|
|
||||||
showPublicOnDropdown = True
|
showPublicOnDropdown = True
|
||||||
|
@ -495,7 +493,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="/' + \
|
||||||
iconsPath + '/calendar.png"/>\n'
|
'icons/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'
|
||||||
|
@ -510,7 +508,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="/' + \
|
||||||
iconsPath + '/calendar.png"/>\n'
|
'icons/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'
|
||||||
|
@ -523,7 +521,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="/' + \
|
||||||
iconsPath + '/calendar.png"/>\n'
|
'icons/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'
|
||||||
|
@ -621,7 +619,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
htmlNewPostDropDown(scopeIcon, scopeDescription,
|
htmlNewPostDropDown(scopeIcon, scopeDescription,
|
||||||
replyStr,
|
replyStr,
|
||||||
translate,
|
translate,
|
||||||
iconsPath,
|
'icons',
|
||||||
showPublicOnDropdown,
|
showPublicOnDropdown,
|
||||||
defaultTimeline,
|
defaultTimeline,
|
||||||
pathBase,
|
pathBase,
|
||||||
|
|
|
@ -12,7 +12,6 @@ from utils import getDomainFromActor
|
||||||
from person import personBoxJson
|
from person import personBoxJson
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import getBannerFile
|
from webapp_utils import getBannerFile
|
||||||
from webapp_utils import htmlPostSeparator
|
from webapp_utils import htmlPostSeparator
|
||||||
from webapp_utils import headerButtonsFrontScreen
|
from webapp_utils import headerButtonsFrontScreen
|
||||||
|
@ -33,7 +32,6 @@ def htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
These should only be public blog posts from the features timeline
|
These should only be public blog posts from the features timeline
|
||||||
which is the blog timeline of the news actor
|
which is the blog timeline of the news actor
|
||||||
"""
|
"""
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
separatorStr = htmlPostSeparator(baseDir, None)
|
separatorStr = htmlPostSeparator(baseDir, None)
|
||||||
profileStr = ''
|
profileStr = ''
|
||||||
maxItems = 4
|
maxItems = 4
|
||||||
|
@ -57,7 +55,7 @@ def htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port, item,
|
nickname, domain, port, item,
|
||||||
|
@ -101,10 +99,9 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
||||||
if port:
|
if port:
|
||||||
domainFull = domain + ':' + str(port)
|
domainFull = domain + ':' + str(port)
|
||||||
|
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
loginButton = headerButtonsFrontScreen(translate, nickname,
|
loginButton = headerButtonsFrontScreen(translate, nickname,
|
||||||
'features', authorized,
|
'features', authorized,
|
||||||
iconsAsButtons, iconsPath)
|
iconsAsButtons, 'icons')
|
||||||
|
|
||||||
# If this is the news account then show a different banner
|
# If this is the news account then show a different banner
|
||||||
bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain)
|
bannerFile, bannerFilename = getBannerFile(baseDir, nickname, domain)
|
||||||
|
@ -123,11 +120,10 @@ def htmlFrontScreen(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'
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
profileHeaderStr += \
|
profileHeaderStr += \
|
||||||
getLeftColumnContent(baseDir, 'news', domainFull,
|
getLeftColumnContent(baseDir, 'news', domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsPath, False,
|
'icons', False,
|
||||||
False, None, rssIconAtTop, True,
|
False, None, rssIconAtTop, True,
|
||||||
True)
|
True)
|
||||||
profileHeaderStr += ' </td>\n'
|
profileHeaderStr += ' </td>\n'
|
||||||
|
@ -155,11 +151,10 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
||||||
# Footer which is only used for system accounts
|
# Footer which is only used for system accounts
|
||||||
profileFooterStr = ' </td>\n'
|
profileFooterStr = ' </td>\n'
|
||||||
profileFooterStr += ' <td valign="top" class="col-right">\n'
|
profileFooterStr += ' <td valign="top" class="col-right">\n'
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
profileFooterStr += \
|
profileFooterStr += \
|
||||||
getRightColumnContent(baseDir, 'news', domainFull,
|
getRightColumnContent(baseDir, 'news', domainFull,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
iconsPath, False, False,
|
'icons', False, False,
|
||||||
newswire, False,
|
newswire, False,
|
||||||
False, None, False, False,
|
False, None, False, False,
|
||||||
False, True, authorized, True)
|
False, True, authorized, True)
|
||||||
|
|
|
@ -212,7 +212,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="/' + \
|
||||||
iconsPath + '/search.png" title="' + \
|
'icons/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>'
|
||||||
|
@ -239,7 +239,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
' <a class="imageAnchor" href="' + \
|
' <a class="imageAnchor" href="' + \
|
||||||
usersPath + calendarPath + \
|
usersPath + calendarPath + \
|
||||||
'"><img loading="lazy" src="/' + iconsPath + '/' + \
|
'"><img loading="lazy" src="/icons/' + \
|
||||||
calendarImage + '" title="' + translate['Calendar'] + \
|
calendarImage + '" title="' + translate['Calendar'] + \
|
||||||
'" alt="| ' + calendarAltText + \
|
'" alt="| ' + calendarAltText + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -256,7 +256,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
' <a class="imageAnchor" href="' + \
|
' <a class="imageAnchor" href="' + \
|
||||||
usersPath + '/minimal' + \
|
usersPath + '/minimal' + \
|
||||||
'"><img loading="lazy" src="/' + iconsPath + \
|
'"><img loading="lazy" src="/icons' + \
|
||||||
'/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'
|
||||||
|
@ -278,7 +278,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
'<a class="imageAnchorMobile" href="' + \
|
'<a class="imageAnchorMobile" href="' + \
|
||||||
usersPath + '/newswiremobile">' + \
|
usersPath + '/newswiremobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsPath + \
|
'<img loading="lazy" src="/icons' + \
|
||||||
'/newswire.png" title="' + translate['News'] + \
|
'/newswire.png" title="' + translate['News'] + \
|
||||||
'" alt="| ' + translate['News'] + \
|
'" alt="| ' + translate['News'] + \
|
||||||
'" class="timelineicon"/></a>'
|
'" class="timelineicon"/></a>'
|
||||||
|
@ -296,7 +296,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
tlStr += \
|
tlStr += \
|
||||||
'<a class="imageAnchorMobile" href="' + \
|
'<a class="imageAnchorMobile" href="' + \
|
||||||
usersPath + '/linksmobile">' + \
|
usersPath + '/linksmobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsPath + \
|
'<img loading="lazy" src="/icons' + \
|
||||||
'/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>'
|
||||||
|
|
107
webapp_post.py
107
webapp_post.py
|
@ -53,7 +53,6 @@ from webapp_utils import addEmojiToDisplayName
|
||||||
from webapp_utils import postContainsPublic
|
from webapp_utils import postContainsPublic
|
||||||
from webapp_utils import getContentWarningButton
|
from webapp_utils import getContentWarningButton
|
||||||
from webapp_utils import getPostAttachmentsAsHtml
|
from webapp_utils import getPostAttachmentsAsHtml
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_media import addEmbeddedElements
|
from webapp_media import addEmbeddedElements
|
||||||
|
@ -207,7 +206,7 @@ def getBrokenLinkSubstitute(iconsPath: str) -> str:
|
||||||
an image is broken
|
an image is broken
|
||||||
"""
|
"""
|
||||||
return " onerror=\"this.onerror=null; this.src='" + \
|
return " onerror=\"this.onerror=null; this.src='" + \
|
||||||
iconsPath + "/avatar_default.png'\""
|
"icons/avatar_default.png'\""
|
||||||
|
|
||||||
|
|
||||||
def getAvatarImageHtml(showAvatarOptions: bool,
|
def getAvatarImageHtml(showAvatarOptions: bool,
|
||||||
|
@ -224,7 +223,7 @@ def getAvatarImageHtml(showAvatarOptions: bool,
|
||||||
avatarLink += \
|
avatarLink += \
|
||||||
' <img loading="lazy" src="' + avatarUrl + '" title="' + \
|
' <img loading="lazy" src="' + avatarUrl + '" title="' + \
|
||||||
translate['Show profile'] + '" alt=" "' + avatarPosition + \
|
translate['Show profile'] + '" alt=" "' + avatarPosition + \
|
||||||
getBrokenLinkSubstitute(iconsPath) + '/></a>\n'
|
getBrokenLinkSubstitute('icons') + '/></a>\n'
|
||||||
|
|
||||||
if showAvatarOptions and \
|
if showAvatarOptions and \
|
||||||
domainFull + '/users/' + nickname not in postActor:
|
domainFull + '/users/' + nickname not in postActor:
|
||||||
|
@ -237,14 +236,14 @@ def getAvatarImageHtml(showAvatarOptions: bool,
|
||||||
' <img loading="lazy" title="' + \
|
' <img loading="lazy" title="' + \
|
||||||
translate['Show options for this person'] + \
|
translate['Show options for this person'] + \
|
||||||
'" src="' + avatarUrl + '" ' + avatarPosition + \
|
'" src="' + avatarUrl + '" ' + avatarPosition + \
|
||||||
getBrokenLinkSubstitute(iconsPath) + '/></a>\n'
|
getBrokenLinkSubstitute('icons') + '/></a>\n'
|
||||||
else:
|
else:
|
||||||
# don't link to the person options for the news account
|
# don't link to the person options for the news account
|
||||||
avatarLink += \
|
avatarLink += \
|
||||||
' <img loading="lazy" title="' + \
|
' <img loading="lazy" title="' + \
|
||||||
translate['Show options for this person'] + \
|
translate['Show options for this person'] + \
|
||||||
'" src="' + avatarUrl + '" ' + avatarPosition + \
|
'" src="' + avatarUrl + '" ' + avatarPosition + \
|
||||||
getBrokenLinkSubstitute(iconsPath) + '/>\n'
|
getBrokenLinkSubstitute('icons') + '/>\n'
|
||||||
return avatarLink.strip()
|
return avatarLink.strip()
|
||||||
|
|
||||||
|
|
||||||
|
@ -303,7 +302,7 @@ def getReplyIconHtml(nickname: str, isPublicRepeat: bool,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
replyToThisPostStr + '" alt="' + replyToThisPostStr + \
|
replyToThisPostStr + '" alt="' + replyToThisPostStr + \
|
||||||
' |" src="/' + iconsPath + '/reply.png"/></a>\n'
|
' |" src="/icons/reply.png"/></a>\n'
|
||||||
return replyStr
|
return replyStr
|
||||||
|
|
||||||
|
|
||||||
|
@ -336,7 +335,7 @@ def getEditIconHtml(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" title="' + editBlogPostStr + '">' + \
|
'" title="' + editBlogPostStr + '">' + \
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
editBlogPostStr + '" alt="' + editBlogPostStr + \
|
editBlogPostStr + '" alt="' + editBlogPostStr + \
|
||||||
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
|
' |" src="/icons/edit.png"/></a>\n'
|
||||||
else:
|
else:
|
||||||
editStr += \
|
editStr += \
|
||||||
' ' + \
|
' ' + \
|
||||||
|
@ -347,7 +346,7 @@ def getEditIconHtml(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" title="' + editBlogPostStr + '">' + \
|
'" title="' + editBlogPostStr + '">' + \
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
editBlogPostStr + '" alt="' + editBlogPostStr + \
|
editBlogPostStr + '" alt="' + editBlogPostStr + \
|
||||||
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
|
' |" src="/icons/edit.png"/></a>\n'
|
||||||
elif isEvent:
|
elif isEvent:
|
||||||
editEventStr = translate['Edit event']
|
editEventStr = translate['Edit event']
|
||||||
editStr += \
|
editStr += \
|
||||||
|
@ -359,7 +358,7 @@ def getEditIconHtml(baseDir: str, nickname: str, domainFull: str,
|
||||||
'" title="' + editEventStr + '">' + \
|
'" title="' + editEventStr + '">' + \
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
editEventStr + '" alt="' + editEventStr + \
|
editEventStr + '" alt="' + editEventStr + \
|
||||||
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
|
' |" src="/icons/edit.png"/></a>\n'
|
||||||
return editStr
|
return editStr
|
||||||
|
|
||||||
|
|
||||||
|
@ -401,7 +400,7 @@ def getAnnounceIconHtml(nickname: str, domainFull: str,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<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="/' + iconsPath + '/' + announceIcon + '"/></a>\n'
|
' |" src="/icons/' + announceIcon + '"/></a>\n'
|
||||||
return announceStr
|
return announceStr
|
||||||
|
|
||||||
|
|
||||||
|
@ -459,7 +458,7 @@ def getLikeIconHtml(nickname: str, domainFull: str,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" title="' + likeTitle + likeCountStr + \
|
'<img loading="lazy" title="' + likeTitle + likeCountStr + \
|
||||||
'" alt="' + likeTitle + \
|
'" alt="' + likeTitle + \
|
||||||
' |" src="/' + iconsPath + '/' + likeIcon + '"/></a>\n'
|
' |" src="/icons/' + likeIcon + '"/></a>\n'
|
||||||
return likeStr
|
return likeStr
|
||||||
|
|
||||||
|
|
||||||
|
@ -497,7 +496,7 @@ def getBookmarkIconHtml(nickname: str, domainFull: str,
|
||||||
bookmarkStr += \
|
bookmarkStr += \
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" title="' + bookmarkTitle + '" alt="' + \
|
'<img loading="lazy" title="' + bookmarkTitle + '" alt="' + \
|
||||||
bookmarkTitle + ' |" src="/' + iconsPath + \
|
bookmarkTitle + ' |" src="/icons' + \
|
||||||
'/' + bookmarkIcon + '"/></a>\n'
|
'/' + bookmarkIcon + '"/></a>\n'
|
||||||
return bookmarkStr
|
return bookmarkStr
|
||||||
|
|
||||||
|
@ -531,7 +530,7 @@ def getMuteIconHtml(isMuted: 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="/' + iconsPath + '/mute.png"/></a>\n'
|
'" src="/icons/mute.png"/></a>\n'
|
||||||
else:
|
else:
|
||||||
muteStr = \
|
muteStr = \
|
||||||
' <a class="imageAnchor" href="/users/' + \
|
' <a class="imageAnchor" href="/users/' + \
|
||||||
|
@ -543,7 +542,7 @@ def getMuteIconHtml(isMuted: bool,
|
||||||
' ' + \
|
' ' + \
|
||||||
'<img loading="lazy" alt="' + translate['Undo mute'] + \
|
'<img loading="lazy" alt="' + translate['Undo mute'] + \
|
||||||
' |" title="' + translate['Undo mute'] + \
|
' |" title="' + translate['Undo mute'] + \
|
||||||
'" src="/' + iconsPath + '/unmute.png"/></a>\n'
|
'" src="/icons/unmute.png"/></a>\n'
|
||||||
return muteStr
|
return muteStr
|
||||||
|
|
||||||
|
|
||||||
|
@ -573,7 +572,7 @@ def getDeleteIconHtml(nickname: str, domainFull: str,
|
||||||
'<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="/' + iconsPath + '/delete.png"/></a>\n'
|
'" src="/icons/delete.png"/></a>\n'
|
||||||
return deleteStr
|
return deleteStr
|
||||||
|
|
||||||
|
|
||||||
|
@ -651,7 +650,7 @@ def boostOwnTootHtml(translate: {}, iconsPath) -> str:
|
||||||
return ' <img loading="lazy" title="' + \
|
return ' <img loading="lazy" title="' + \
|
||||||
translate['announces'] + \
|
translate['announces'] + \
|
||||||
'" alt="' + translate['announces'] + \
|
'" alt="' + translate['announces'] + \
|
||||||
'" src="/' + iconsPath + \
|
'" src="/icons' + \
|
||||||
'/repeat_inactive.png" class="announceOrReply"/>\n'
|
'/repeat_inactive.png" class="announceOrReply"/>\n'
|
||||||
|
|
||||||
|
|
||||||
|
@ -662,7 +661,7 @@ def announceUnattributedHtml(translate: {}, iconsPath: str,
|
||||||
"""
|
"""
|
||||||
return ' <img loading="lazy" title="' + \
|
return ' <img loading="lazy" title="' + \
|
||||||
translate['announces'] + '" alt="' + \
|
translate['announces'] + '" alt="' + \
|
||||||
translate['announces'] + '" src="/' + iconsPath + \
|
translate['announces'] + '" src="/icons' + \
|
||||||
'/repeat_inactive.png" ' + \
|
'/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
|
@ -679,7 +678,7 @@ def announceWithoutDisplayNameHtml(translate: {}, iconsPath: str,
|
||||||
"""
|
"""
|
||||||
return ' <img loading="lazy" title="' + \
|
return ' <img loading="lazy" title="' + \
|
||||||
translate['announces'] + '" alt="' + translate['announces'] + \
|
translate['announces'] + '" alt="' + translate['announces'] + \
|
||||||
'" src="/' + iconsPath + '/repeat_inactive.png" ' + \
|
'" src="/icons/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + postJsonObject['object']['id'] + '" ' + \
|
' <a href="' + postJsonObject['object']['id'] + '" ' + \
|
||||||
'class="announceOrReply">@' + \
|
'class="announceOrReply">@' + \
|
||||||
|
@ -695,7 +694,7 @@ def announceWithDisplayNameHtml(translate: {},
|
||||||
return ' <img loading="lazy" title="' + \
|
return ' <img loading="lazy" title="' + \
|
||||||
translate['announces'] + '" alt="' + \
|
translate['announces'] + '" alt="' + \
|
||||||
translate['announces'] + '" src="/' + \
|
translate['announces'] + '" src="/' + \
|
||||||
iconsPath + '/repeat_inactive.png" ' + \
|
'icons/repeat_inactive.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
postJsonObject['object']['id'] + '" ' + \
|
postJsonObject['object']['id'] + '" ' + \
|
||||||
|
@ -733,7 +732,7 @@ def getPostTitleAnnounceHtml(baseDir: str,
|
||||||
attributedTo = postJsonObject['object']['attributedTo']
|
attributedTo = postJsonObject['object']['attributedTo']
|
||||||
|
|
||||||
if attributedTo.startswith(postActor):
|
if attributedTo.startswith(postActor):
|
||||||
titleStr += boostOwnTootHtml(translate, iconsPath)
|
titleStr += boostOwnTootHtml(translate, 'icons')
|
||||||
else:
|
else:
|
||||||
# boosting another person's post
|
# boosting another person's post
|
||||||
logPostTiming(enableTimingLog, postStartTime, '13.2')
|
logPostTiming(enableTimingLog, postStartTime, '13.2')
|
||||||
|
@ -760,7 +759,7 @@ def getPostTitleAnnounceHtml(baseDir: str,
|
||||||
logPostTiming(enableTimingLog, postStartTime, '13.3.1')
|
logPostTiming(enableTimingLog, postStartTime, '13.3.1')
|
||||||
titleStr += \
|
titleStr += \
|
||||||
announceWithDisplayNameHtml(translate,
|
announceWithDisplayNameHtml(translate,
|
||||||
iconsPath,
|
'icons',
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
announceDisplayName)
|
announceDisplayName)
|
||||||
# show avatar of person replied to
|
# show avatar of person replied to
|
||||||
|
@ -791,21 +790,21 @@ def getPostTitleAnnounceHtml(baseDir: str,
|
||||||
announceAvatarUrl + '" ' + \
|
announceAvatarUrl + '" ' + \
|
||||||
'title="' + translate[idx] + \
|
'title="' + translate[idx] + \
|
||||||
'" alt=" "' + avatarPosition + \
|
'" alt=" "' + avatarPosition + \
|
||||||
getBrokenLinkSubstitute(iconsPath) + \
|
getBrokenLinkSubstitute('icons') + \
|
||||||
'/></a>\n </div>\n'
|
'/></a>\n </div>\n'
|
||||||
else:
|
else:
|
||||||
titleStr += \
|
titleStr += \
|
||||||
announceWithoutDisplayNameHtml(translate, iconsPath,
|
announceWithoutDisplayNameHtml(translate, 'icons',
|
||||||
announceNickname,
|
announceNickname,
|
||||||
announceDomain,
|
announceDomain,
|
||||||
postJsonObject)
|
postJsonObject)
|
||||||
else:
|
else:
|
||||||
titleStr += \
|
titleStr += \
|
||||||
announceUnattributedHtml(translate, iconsPath,
|
announceUnattributedHtml(translate, 'icons',
|
||||||
postJsonObject)
|
postJsonObject)
|
||||||
else:
|
else:
|
||||||
titleStr += \
|
titleStr += \
|
||||||
announceUnattributedHtml(translate, iconsPath, postJsonObject)
|
announceUnattributedHtml(translate, 'icons', postJsonObject)
|
||||||
|
|
||||||
return (titleStr, replyAvatarImageInPost,
|
return (titleStr, replyAvatarImageInPost,
|
||||||
containerClassIcons, containerClass)
|
containerClassIcons, containerClass)
|
||||||
|
@ -817,7 +816,7 @@ def replyToYourselfHtml(translate: {}, iconsPath: str) -> str:
|
||||||
return ' <img loading="lazy" title="' + \
|
return ' <img loading="lazy" title="' + \
|
||||||
translate['replying to themselves'] + \
|
translate['replying to themselves'] + \
|
||||||
'" alt="' + translate['replying to themselves'] + \
|
'" alt="' + translate['replying to themselves'] + \
|
||||||
'" src="/' + iconsPath + \
|
'" src="/icons' + \
|
||||||
'/reply.png" class="announceOrReply"/>\n'
|
'/reply.png" class="announceOrReply"/>\n'
|
||||||
|
|
||||||
|
|
||||||
|
@ -827,8 +826,7 @@ def replyToUnknownHtml(translate: {}, iconsPath: str,
|
||||||
"""
|
"""
|
||||||
return ' <img loading="lazy" title="' + \
|
return ' <img loading="lazy" title="' + \
|
||||||
translate['replying to'] + '" alt="' + \
|
translate['replying to'] + '" alt="' + \
|
||||||
translate['replying to'] + '" src="/' + \
|
translate['replying to'] + '" src="/icons' + \
|
||||||
iconsPath + \
|
|
||||||
'/reply.png" class="announceOrReply"/>\n' + \
|
'/reply.png" class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
postJsonObject['object']['inReplyTo'] + \
|
postJsonObject['object']['inReplyTo'] + \
|
||||||
|
@ -844,8 +842,7 @@ def replyWithUnknownPathHtml(translate: {}, iconsPath: str,
|
||||||
return ' <img loading="lazy" title="' + \
|
return ' <img loading="lazy" title="' + \
|
||||||
translate['replying to'] + \
|
translate['replying to'] + \
|
||||||
'" alt="' + translate['replying to'] + \
|
'" alt="' + translate['replying to'] + \
|
||||||
'" src="/' + \
|
'" src="/icons/reply.png" ' + \
|
||||||
iconsPath + '/reply.png" ' + \
|
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
postJsonObject['object']['inReplyTo'] + \
|
postJsonObject['object']['inReplyTo'] + \
|
||||||
|
@ -861,7 +858,7 @@ def getReplyHtml(translate: {}, iconsPath: str,
|
||||||
'<img loading="lazy" title="' + \
|
'<img loading="lazy" title="' + \
|
||||||
translate['replying to'] + '" alt="' + \
|
translate['replying to'] + '" alt="' + \
|
||||||
translate['replying to'] + '" src="/' + \
|
translate['replying to'] + '" src="/' + \
|
||||||
iconsPath + '/reply.png" ' + \
|
'icons/reply.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + \
|
'class="announceOrReply"/>\n' + \
|
||||||
' <a href="' + inReplyTo + \
|
' <a href="' + inReplyTo + \
|
||||||
'" class="announceOrReply">' + \
|
'" class="announceOrReply">' + \
|
||||||
|
@ -877,7 +874,7 @@ def getReplyWithoutDisplayName(translate: {}, iconsPath: str,
|
||||||
return ' ' + \
|
return ' ' + \
|
||||||
'<img loading="lazy" title="' + translate['replying to'] + \
|
'<img loading="lazy" title="' + translate['replying to'] + \
|
||||||
'" alt="' + translate['replying to'] + \
|
'" alt="' + translate['replying to'] + \
|
||||||
'" src="/' + iconsPath + '/reply.png" ' + \
|
'" src="/icons/reply.png" ' + \
|
||||||
'class="announceOrReply"/>\n' + ' <a href="' + \
|
'class="announceOrReply"/>\n' + ' <a href="' + \
|
||||||
inReplyTo + '" class="announceOrReply">@' + \
|
inReplyTo + '" class="announceOrReply">@' + \
|
||||||
replyNickname + '@' + replyDomain + '</a>\n'
|
replyNickname + '@' + replyDomain + '</a>\n'
|
||||||
|
@ -915,7 +912,7 @@ def getPostTitleReplyHtml(baseDir: str,
|
||||||
containerClassIcons = 'containericons darker'
|
containerClassIcons = 'containericons darker'
|
||||||
containerClass = 'container darker'
|
containerClass = 'container darker'
|
||||||
if postJsonObject['object']['inReplyTo'].startswith(postActor):
|
if postJsonObject['object']['inReplyTo'].startswith(postActor):
|
||||||
titleStr += replyToYourselfHtml(translate, iconsPath)
|
titleStr += replyToYourselfHtml(translate, 'icons')
|
||||||
return (titleStr, replyAvatarImageInPost,
|
return (titleStr, replyAvatarImageInPost,
|
||||||
containerClassIcons, containerClass)
|
containerClassIcons, containerClass)
|
||||||
|
|
||||||
|
@ -948,7 +945,7 @@ def getPostTitleReplyHtml(baseDir: str,
|
||||||
logPostTiming(enableTimingLog, postStartTime, '13.6')
|
logPostTiming(enableTimingLog, postStartTime, '13.6')
|
||||||
|
|
||||||
titleStr += \
|
titleStr += \
|
||||||
getReplyHtml(translate, iconsPath,
|
getReplyHtml(translate, 'icons',
|
||||||
inReplyTo, replyDisplayName)
|
inReplyTo, replyDisplayName)
|
||||||
|
|
||||||
logPostTiming(enableTimingLog, postStartTime, '13.7')
|
logPostTiming(enableTimingLog, postStartTime, '13.7')
|
||||||
|
@ -984,18 +981,18 @@ def getPostTitleReplyHtml(baseDir: str,
|
||||||
replyAvatarImageInPost += \
|
replyAvatarImageInPost += \
|
||||||
'" alt=" "' + \
|
'" alt=" "' + \
|
||||||
avatarPosition + \
|
avatarPosition + \
|
||||||
getBrokenLinkSubstitute(iconsPath) + \
|
getBrokenLinkSubstitute('icons') + \
|
||||||
'/></a>\n </div>\n'
|
'/></a>\n </div>\n'
|
||||||
else:
|
else:
|
||||||
inReplyTo = \
|
inReplyTo = \
|
||||||
postJsonObject['object']['inReplyTo']
|
postJsonObject['object']['inReplyTo']
|
||||||
titleStr += \
|
titleStr += \
|
||||||
getReplyWithoutDisplayName(translate, iconsPath,
|
getReplyWithoutDisplayName(translate, 'icons',
|
||||||
inReplyTo,
|
inReplyTo,
|
||||||
replyNickname, replyDomain)
|
replyNickname, replyDomain)
|
||||||
else:
|
else:
|
||||||
titleStr += \
|
titleStr += \
|
||||||
replyToUnknownHtml(translate, iconsPath, postJsonObject)
|
replyToUnknownHtml(translate, 'icons', postJsonObject)
|
||||||
else:
|
else:
|
||||||
postDomain = \
|
postDomain = \
|
||||||
postJsonObject['object']['inReplyTo']
|
postJsonObject['object']['inReplyTo']
|
||||||
|
@ -1006,7 +1003,7 @@ def getPostTitleReplyHtml(baseDir: str,
|
||||||
postDomain = postDomain.split('/', 1)[0]
|
postDomain = postDomain.split('/', 1)[0]
|
||||||
if postDomain:
|
if postDomain:
|
||||||
titleStr += \
|
titleStr += \
|
||||||
replyWithUnknownPathHtml(translate, iconsPath,
|
replyWithUnknownPathHtml(translate, 'icons',
|
||||||
postJsonObject, postDomain)
|
postJsonObject, postDomain)
|
||||||
|
|
||||||
return (titleStr, replyAvatarImageInPost,
|
return (titleStr, replyAvatarImageInPost,
|
||||||
|
@ -1050,7 +1047,7 @@ def getPostTitleHtml(baseDir: str,
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
postActor,
|
postActor,
|
||||||
translate,
|
translate,
|
||||||
iconsPath,
|
'icons',
|
||||||
enableTimingLog,
|
enableTimingLog,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
boxName,
|
boxName,
|
||||||
|
@ -1070,7 +1067,7 @@ def getPostTitleHtml(baseDir: str,
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
postActor,
|
postActor,
|
||||||
translate,
|
translate,
|
||||||
iconsPath,
|
'icons',
|
||||||
enableTimingLog,
|
enableTimingLog,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
boxName,
|
boxName,
|
||||||
|
@ -1225,7 +1222,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
avatarUrl, postActor,
|
avatarUrl, postActor,
|
||||||
translate, avatarPosition,
|
translate, avatarPosition,
|
||||||
pageNumber, messageIdStr,
|
pageNumber, messageIdStr,
|
||||||
iconsPath)
|
'icons')
|
||||||
|
|
||||||
avatarImageInPost = \
|
avatarImageInPost = \
|
||||||
' <div class="timeline-avatar">' + avatarLink + '</div>\n'
|
' <div class="timeline-avatar">' + avatarLink + '</div>\n'
|
||||||
|
@ -1322,7 +1319,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
if showDMicon:
|
if showDMicon:
|
||||||
titleStr = \
|
titleStr = \
|
||||||
titleStr + ' <img loading="lazy" src="/' + \
|
titleStr + ' <img loading="lazy" src="/' + \
|
||||||
iconsPath + '/dm.png" class="DMicon"/>\n'
|
'icons/dm.png" class="DMicon"/>\n'
|
||||||
|
|
||||||
# check if replying is permitted
|
# check if replying is permitted
|
||||||
commentsEnabled = True
|
commentsEnabled = True
|
||||||
|
@ -1333,7 +1330,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
replyStr = getReplyIconHtml(nickname, isPublicRepeat,
|
replyStr = getReplyIconHtml(nickname, isPublicRepeat,
|
||||||
showIcons, commentsEnabled,
|
showIcons, commentsEnabled,
|
||||||
postJsonObject, pageNumberParam,
|
postJsonObject, pageNumberParam,
|
||||||
iconsPath, translate)
|
'icons', translate)
|
||||||
|
|
||||||
logPostTiming(enableTimingLog, postStartTime, '10')
|
logPostTiming(enableTimingLog, postStartTime, '10')
|
||||||
|
|
||||||
|
@ -1343,7 +1340,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
|
|
||||||
editStr = getEditIconHtml(baseDir, nickname, domainFull,
|
editStr = getEditIconHtml(baseDir, nickname, domainFull,
|
||||||
postJsonObject, actorNickname,
|
postJsonObject, actorNickname,
|
||||||
translate, iconsPath, isEvent)
|
translate, 'icons', isEvent)
|
||||||
|
|
||||||
announceStr = \
|
announceStr = \
|
||||||
getAnnounceIconHtml(nickname, domainFull,
|
getAnnounceIconHtml(nickname, domainFull,
|
||||||
|
@ -1354,7 +1351,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
translate,
|
translate,
|
||||||
pageNumberParam,
|
pageNumberParam,
|
||||||
timelinePostBookmark,
|
timelinePostBookmark,
|
||||||
boxName, iconsPath)
|
boxName, 'icons')
|
||||||
|
|
||||||
logPostTiming(enableTimingLog, postStartTime, '12')
|
logPostTiming(enableTimingLog, postStartTime, '12')
|
||||||
|
|
||||||
|
@ -1373,7 +1370,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
translate, pageNumberParam,
|
translate, pageNumberParam,
|
||||||
timelinePostBookmark,
|
timelinePostBookmark,
|
||||||
boxName, iconsPath)
|
boxName, 'icons')
|
||||||
|
|
||||||
logPostTiming(enableTimingLog, postStartTime, '12.5')
|
logPostTiming(enableTimingLog, postStartTime, '12.5')
|
||||||
|
|
||||||
|
@ -1386,7 +1383,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
postStartTime, boxName,
|
postStartTime, boxName,
|
||||||
pageNumberParam,
|
pageNumberParam,
|
||||||
timelinePostBookmark,
|
timelinePostBookmark,
|
||||||
iconsPath)
|
'icons')
|
||||||
|
|
||||||
logPostTiming(enableTimingLog, postStartTime, '12.9')
|
logPostTiming(enableTimingLog, postStartTime, '12.9')
|
||||||
|
|
||||||
|
@ -1401,7 +1398,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
nickname, domainFull,
|
nickname, domainFull,
|
||||||
allowDeletion,
|
allowDeletion,
|
||||||
pageNumberParam,
|
pageNumberParam,
|
||||||
iconsPath,
|
'icons',
|
||||||
boxName,
|
boxName,
|
||||||
timelinePostBookmark,
|
timelinePostBookmark,
|
||||||
translate)
|
translate)
|
||||||
|
@ -1413,7 +1410,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
messageId,
|
messageId,
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
pageNumberParam,
|
pageNumberParam,
|
||||||
iconsPath,
|
'icons',
|
||||||
translate)
|
translate)
|
||||||
|
|
||||||
logPostTiming(enableTimingLog, postStartTime, '13.1')
|
logPostTiming(enableTimingLog, postStartTime, '13.1')
|
||||||
|
@ -1430,7 +1427,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
postActor,
|
postActor,
|
||||||
translate,
|
translate,
|
||||||
iconsPath,
|
'icons',
|
||||||
enableTimingLog,
|
enableTimingLog,
|
||||||
postStartTime,
|
postStartTime,
|
||||||
boxName,
|
boxName,
|
||||||
|
@ -1627,7 +1624,6 @@ def htmlIndividualPost(cssCache: {},
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool) -> str:
|
||||||
"""Show an individual post as html
|
"""Show an individual post as html
|
||||||
"""
|
"""
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
postStr = ''
|
postStr = ''
|
||||||
if likedBy:
|
if likedBy:
|
||||||
likedByNickname = getNicknameFromActor(likedBy)
|
likedByNickname = getNicknameFromActor(likedBy)
|
||||||
|
@ -1663,7 +1659,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
|
|
||||||
postStr += \
|
postStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
nickname, domain, port, postJsonObject,
|
nickname, domain, port, postJsonObject,
|
||||||
None, True, False,
|
None, True, False,
|
||||||
|
@ -1686,7 +1682,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
@ -1715,7 +1711,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
postStr += \
|
postStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port, item,
|
nickname, domain, port, item,
|
||||||
|
@ -1742,14 +1738,13 @@ 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
|
||||||
"""
|
"""
|
||||||
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,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest, personCache,
|
baseDir, session, wfRequest, personCache,
|
||||||
nickname, domain, port, item,
|
nickname, domain, port, item,
|
||||||
None, True, False,
|
None, True, False,
|
||||||
|
|
|
@ -35,7 +35,6 @@ from jami import getJamiAddress
|
||||||
from webapp_frontscreen import htmlFrontScreen
|
from webapp_frontscreen import htmlFrontScreen
|
||||||
from webapp_utils import scheduledPostsExist
|
from webapp_utils import scheduledPostsExist
|
||||||
from webapp_utils import getPersonAvatarUrl
|
from webapp_utils import getPersonAvatarUrl
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_utils import addEmojiToDisplayName
|
from webapp_utils import addEmojiToDisplayName
|
||||||
|
@ -256,7 +255,6 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
profileStr += ' </form>\n'
|
profileStr += ' </form>\n'
|
||||||
profileStr += '</div>\n'
|
profileStr += '</div>\n'
|
||||||
|
|
||||||
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):
|
||||||
|
@ -268,7 +266,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
continue
|
continue
|
||||||
profileStr += \
|
profileStr += \
|
||||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||||
iconsPath, translate, None, baseDir,
|
'icons', translate, None, baseDir,
|
||||||
session, cachedWebfingers, personCache,
|
session, cachedWebfingers, personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
item, avatarUrl, False, False,
|
item, avatarUrl, False, False,
|
||||||
|
@ -313,7 +311,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="/' + iconsPath + \
|
'<img class="qrcode" src="/icons' + \
|
||||||
'/qrcode.png" /></a></p>\n'
|
'/qrcode.png" /></a></p>\n'
|
||||||
htmlStr += ' <p>' + profileDescriptionShort + '</p>\n'
|
htmlStr += ' <p>' + profileDescriptionShort + '</p>\n'
|
||||||
htmlStr += loginButton
|
htmlStr += loginButton
|
||||||
|
@ -481,17 +479,16 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
donateSection += ' </center>\n'
|
donateSection += ' </center>\n'
|
||||||
donateSection += '</div>\n'
|
donateSection += '</div>\n'
|
||||||
|
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
if authorized:
|
if authorized:
|
||||||
editProfileStr = \
|
editProfileStr = \
|
||||||
'<a class="imageAnchor" href="' + usersPath + '/editprofile">' + \
|
'<a class="imageAnchor" href="' + usersPath + '/editprofile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsPath + \
|
'<img loading="lazy" src="/icons' + \
|
||||||
'/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="/' + iconsPath + \
|
'<img loading="lazy" src="/icons' + \
|
||||||
'/logout.png" title="' + translate['Logout'] + \
|
'/logout.png" title="' + translate['Logout'] + \
|
||||||
'" alt="| ' + translate['Logout'] + \
|
'" alt="| ' + translate['Logout'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -564,7 +561,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, iconsPath,
|
domainFull, translate, 'icons',
|
||||||
defaultTimeline, displayName,
|
defaultTimeline, displayName,
|
||||||
avatarDescription,
|
avatarDescription,
|
||||||
profileDescriptionShort,
|
profileDescriptionShort,
|
||||||
|
@ -672,7 +669,6 @@ 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
|
||||||
"""
|
"""
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
separatorStr = htmlPostSeparator(baseDir, None)
|
separatorStr = htmlPostSeparator(baseDir, None)
|
||||||
profileStr = ''
|
profileStr = ''
|
||||||
maxItems = 4
|
maxItems = 4
|
||||||
|
@ -697,7 +693,7 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port, item,
|
nickname, domain, port, item,
|
||||||
|
@ -728,7 +724,6 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
|
||||||
"""
|
"""
|
||||||
profileStr = ''
|
profileStr = ''
|
||||||
|
|
||||||
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
|
||||||
|
@ -737,7 +732,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
|
||||||
' <a href="' + actor + '/' + feedName + \
|
' <a href="' + actor + '/' + feedName + \
|
||||||
'?page=' + str(pageNumber - 1) + '#buttonheader' + \
|
'?page=' + str(pageNumber - 1) + '#buttonheader' + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsPath + '/pageup.png" title="' + \
|
'icons/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'
|
||||||
|
@ -757,7 +752,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
|
||||||
' <a href="' + actor + '/' + feedName + \
|
' <a href="' + actor + '/' + feedName + \
|
||||||
'?page=' + str(pageNumber + 1) + '#buttonheader' + \
|
'?page=' + str(pageNumber + 1) + '#buttonheader' + \
|
||||||
'"><img loading="lazy" class="pageicon" src="/' + \
|
'"><img loading="lazy" class="pageicon" src="/' + \
|
||||||
iconsPath + '/pagedown.png" title="' + \
|
'icons/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'
|
||||||
|
|
|
@ -23,7 +23,6 @@ from utils import getHashtagCategory
|
||||||
from feeds import rss2TagHeader
|
from feeds import rss2TagHeader
|
||||||
from feeds import rss2TagFooter
|
from feeds import rss2TagFooter
|
||||||
from webapp_utils import getAltPath
|
from webapp_utils import getAltPath
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import getImageFile
|
from webapp_utils import getImageFile
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
|
@ -102,7 +101,6 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
||||||
callingDomain: str) -> str:
|
callingDomain: str) -> str:
|
||||||
"""Search results for shared items
|
"""Search results for shared items
|
||||||
"""
|
"""
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
currPage = 1
|
currPage = 1
|
||||||
ctr = 0
|
ctr = 0
|
||||||
sharedItemsForm = ''
|
sharedItemsForm = ''
|
||||||
|
@ -215,7 +213,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="/' + iconsPath + \
|
'class="pageicon" src="/icons' + \
|
||||||
'/pageup.png" title="' + \
|
'/pageup.png" title="' + \
|
||||||
translate['Page up'] + \
|
translate['Page up'] + \
|
||||||
'" alt="' + translate['Page up'] + \
|
'" alt="' + translate['Page up'] + \
|
||||||
|
@ -249,7 +247,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="/' + iconsPath + \
|
'class="pageicon" src="/icons' + \
|
||||||
'/pagedown.png" title="' + \
|
'/pagedown.png" title="' + \
|
||||||
translate['Page down'] + \
|
translate['Page down'] + \
|
||||||
'" alt="' + translate['Page down'] + \
|
'" alt="' + translate['Page down'] + \
|
||||||
|
@ -559,7 +557,6 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
'</h5></center>'
|
'</h5></center>'
|
||||||
return historySearchForm
|
return historySearchForm
|
||||||
|
|
||||||
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
|
||||||
|
@ -590,7 +587,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(True, recentPostsCache,
|
individualPostAsHtml(True, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
@ -635,7 +632,6 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
print('WARN: hashtag file not found ' + hashtagIndexFile)
|
print('WARN: hashtag file not found ' + hashtagIndexFile)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
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
|
||||||
|
@ -682,7 +678,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
hashtagSearchForm += \
|
hashtagSearchForm += \
|
||||||
'<img style="width:3%;min-width:50px" ' + \
|
'<img style="width:3%;min-width:50px" ' + \
|
||||||
'loading="lazy" alt="RSS 2.0" title="RSS 2.0" src="/' + \
|
'loading="lazy" alt="RSS 2.0" title="RSS 2.0" src="/' + \
|
||||||
iconsPath + '/logorss.png" /></a></center>\n'
|
'icons/logorss.png" /></a></center>\n'
|
||||||
|
|
||||||
# edit the category for this hashtag
|
# edit the category for this hashtag
|
||||||
if isEditor(baseDir, nickname):
|
if isEditor(baseDir, nickname):
|
||||||
|
@ -711,7 +707,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="/' + \
|
||||||
iconsPath + '/pageup.png" title="' + \
|
'icons/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'
|
||||||
|
@ -756,7 +752,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
postStr = \
|
postStr = \
|
||||||
individualPostAsHtml(allowDownloads, recentPostsCache,
|
individualPostAsHtml(allowDownloads, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsPath, translate, None,
|
'icons', translate, None,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
@ -781,7 +777,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="/' + iconsPath + \
|
'"><img loading="lazy" class="pageicon" src="/icons' + \
|
||||||
'/pagedown.png" title="' + translate['Page down'] + \
|
'/pagedown.png" title="' + translate['Page down'] + \
|
||||||
'" alt="' + translate['Page down'] + '"></a>' + \
|
'" alt="' + translate['Page down'] + '"></a>' + \
|
||||||
' </center>'
|
' </center>'
|
||||||
|
|
|
@ -12,7 +12,6 @@ from utils import isEditor
|
||||||
from utils import removeIdEnding
|
from utils import removeIdEnding
|
||||||
from follow import followerApprovalActive
|
from follow import followerApprovalActive
|
||||||
from person import isPersonSnoozed
|
from person import isPersonSnoozed
|
||||||
from webapp_utils import getIconsWebPath
|
|
||||||
from webapp_utils import htmlPostSeparator
|
from webapp_utils import htmlPostSeparator
|
||||||
from webapp_utils import getBannerFile
|
from webapp_utils import getBannerFile
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
|
@ -112,10 +111,6 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
if boxName == 'moderation':
|
if boxName == 'moderation':
|
||||||
os.remove(newReportFile)
|
os.remove(newReportFile)
|
||||||
|
|
||||||
# directory where icons are found
|
|
||||||
# This changes depending upon theme
|
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
|
|
||||||
separatorStr = ''
|
separatorStr = ''
|
||||||
if boxName != 'tlmedia':
|
if boxName != 'tlmedia':
|
||||||
separatorStr = htmlPostSeparator(baseDir, None)
|
separatorStr = htmlPostSeparator(baseDir, None)
|
||||||
|
@ -222,7 +217,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="/' + iconsPath + '/person.png"/></a>\n'
|
'" src="/icons/person.png"/></a>\n'
|
||||||
break
|
break
|
||||||
|
|
||||||
logTimelineTiming(enableTimingLog, timelineStartTime, boxName, '3')
|
logTimelineTiming(enableTimingLog, timelineStartTime, boxName, '3')
|
||||||
|
@ -279,7 +274,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="/' + \
|
||||||
iconsPath + '/newpost.png" title="' + \
|
'icons/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'
|
||||||
|
@ -295,7 +290,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="/' + \
|
||||||
iconsPath + '/newpost.png" title="' + \
|
'icons/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'
|
||||||
|
@ -309,7 +304,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="/' + \
|
||||||
iconsPath + '/newpost.png" title="' + \
|
'icons/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'
|
||||||
|
@ -323,7 +318,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
newPostButtonStr += \
|
newPostButtonStr += \
|
||||||
'<a class="imageAnchor" href="' + usersPath + \
|
'<a class="imageAnchor" href="' + usersPath + \
|
||||||
'/newshare"><img loading="lazy" src="/' + \
|
'/newshare"><img loading="lazy" src="/' + \
|
||||||
iconsPath + '/newpost.png" title="' + \
|
'icons/newpost.png" title="' + \
|
||||||
translate['Create a new shared item'] + '" alt="| ' + \
|
translate['Create a new shared item'] + '" alt="| ' + \
|
||||||
translate['Create a new shared item'] + \
|
translate['Create a new shared item'] + \
|
||||||
'" class="timelineicon"/></a>\n'
|
'" class="timelineicon"/></a>\n'
|
||||||
|
@ -338,7 +333,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="/' + \
|
||||||
iconsPath + '/newpost.png" title="' + \
|
'icons/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'
|
||||||
|
@ -352,7 +347,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="/' + \
|
||||||
iconsPath + '/newpost.png" title="' + \
|
'icons/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'
|
||||||
|
@ -388,7 +383,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
sharesButtonStr, bookmarksButtonStr,
|
sharesButtonStr, bookmarksButtonStr,
|
||||||
eventsButtonStr, moderationButtonStr,
|
eventsButtonStr, moderationButtonStr,
|
||||||
newPostButtonStr, baseDir, nickname,
|
newPostButtonStr, baseDir, nickname,
|
||||||
domain, iconsPath, timelineStartTime,
|
domain, 'icons', timelineStartTime,
|
||||||
newCalendarEvent, calendarPath,
|
newCalendarEvent, calendarPath,
|
||||||
calendarImage, followApprovals,
|
calendarImage, followApprovals,
|
||||||
iconsAsButtons)
|
iconsAsButtons)
|
||||||
|
@ -411,7 +406,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
# left column
|
# left column
|
||||||
leftColumnStr = \
|
leftColumnStr = \
|
||||||
getLeftColumnContent(baseDir, nickname, domainFull,
|
getLeftColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate, iconsPath,
|
httpPrefix, translate, 'icons',
|
||||||
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">' + \
|
||||||
|
@ -430,7 +425,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
sharesButtonStr, bookmarksButtonStr,
|
sharesButtonStr, bookmarksButtonStr,
|
||||||
eventsButtonStr, moderationButtonStr,
|
eventsButtonStr, moderationButtonStr,
|
||||||
newPostButtonStr, baseDir, nickname,
|
newPostButtonStr, baseDir, nickname,
|
||||||
domain, iconsPath, timelineStartTime,
|
domain, 'icons', timelineStartTime,
|
||||||
newCalendarEvent, calendarPath,
|
newCalendarEvent, calendarPath,
|
||||||
calendarImage, followApprovals,
|
calendarImage, followApprovals,
|
||||||
iconsAsButtons)
|
iconsAsButtons)
|
||||||
|
@ -495,7 +490,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="/' + \
|
||||||
iconsPath + '/pageup.png" title="' + \
|
'icons/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'
|
||||||
|
@ -545,7 +540,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
currTlStr = \
|
currTlStr = \
|
||||||
individualPostAsHtml(False, recentPostsCache,
|
individualPostAsHtml(False, recentPostsCache,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
iconsPath, translate, pageNumber,
|
'icons', translate, pageNumber,
|
||||||
baseDir, session, wfRequest,
|
baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
|
@ -577,7 +572,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="/' + \
|
||||||
iconsPath + '/pagedown.png" title="' + \
|
'icons/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'
|
||||||
|
@ -590,7 +585,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
|
|
||||||
# right column
|
# right column
|
||||||
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
|
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
|
||||||
httpPrefix, translate, iconsPath,
|
httpPrefix, translate, 'icons',
|
||||||
moderator, editor,
|
moderator, editor,
|
||||||
newswire, positiveVoting,
|
newswire, positiveVoting,
|
||||||
False, None, True,
|
False, None, True,
|
||||||
|
@ -662,13 +657,12 @@ def htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
|
||||||
timelineStr = ''
|
timelineStr = ''
|
||||||
|
|
||||||
if pageNumber > 1:
|
if pageNumber > 1:
|
||||||
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="/' + \
|
||||||
iconsPath + '/pageup.png" title="' + translate['Page up'] + \
|
'icons/pageup.png" title="' + translate['Page up'] + \
|
||||||
'" alt="' + translate['Page up'] + '"></a>\n' + \
|
'" alt="' + translate['Page up'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
|
||||||
|
@ -686,13 +680,12 @@ def htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
|
||||||
timelineStr += separatorStr
|
timelineStr += separatorStr
|
||||||
|
|
||||||
if not lastPage:
|
if not lastPage:
|
||||||
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="/' + \
|
||||||
iconsPath + '/pagedown.png" title="' + translate['Page down'] + \
|
'icons/pagedown.png" title="' + translate['Page down'] + \
|
||||||
'" alt="' + translate['Page down'] + '"></a>\n' + \
|
'" alt="' + translate['Page down'] + '"></a>\n' + \
|
||||||
' </center>\n'
|
' </center>\n'
|
||||||
|
|
||||||
|
|
|
@ -110,13 +110,13 @@ def headerButtonsFrontScreen(translate: {},
|
||||||
headerStr += \
|
headerStr += \
|
||||||
' <a href="' + \
|
' <a href="' + \
|
||||||
'/users/news/newswiremobile">' + \
|
'/users/news/newswiremobile">' + \
|
||||||
'<img loading="lazy" src="/' + iconsPath + \
|
'<img loading="lazy" src="/icons' + \
|
||||||
'/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="/' + iconsPath + \
|
'<img loading="lazy" src="/icons' + \
|
||||||
'/links.png" title="' + translate['Links'] + \
|
'/links.png" title="' + translate['Links'] + \
|
||||||
'" alt="| ' + translate['Links'] + '"/></a>\n'
|
'" alt="| ' + translate['Links'] + '"/></a>\n'
|
||||||
else:
|
else:
|
||||||
|
@ -390,12 +390,6 @@ def getPersonAvatarUrl(baseDir: str, personUrl: str, personCache: {},
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def getIconsWebPath(baseDir: str) -> str:
|
|
||||||
"""Returns the web path where icons exist
|
|
||||||
"""
|
|
||||||
return 'icons'
|
|
||||||
|
|
||||||
|
|
||||||
def scheduledPostsExist(baseDir: str, nickname: str, domain: str) -> bool:
|
def scheduledPostsExist(baseDir: str, nickname: str, domain: str) -> bool:
|
||||||
"""Returns true if there are posts scheduled to be delivered
|
"""Returns true if there are posts scheduled to be delivered
|
||||||
"""
|
"""
|
||||||
|
@ -832,7 +826,6 @@ 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
|
||||||
"""
|
"""
|
||||||
iconsPath = getIconsWebPath(baseDir)
|
|
||||||
theme = getConfigParam(baseDir, 'theme')
|
theme = getConfigParam(baseDir, 'theme')
|
||||||
filename = 'separator.png'
|
filename = 'separator.png'
|
||||||
separatorClass = "postSeparatorImage"
|
separatorClass = "postSeparatorImage"
|
||||||
|
@ -844,7 +837,7 @@ def htmlPostSeparator(baseDir: str, column: str) -> str:
|
||||||
if os.path.isfile(separatorImageFilename):
|
if os.path.isfile(separatorImageFilename):
|
||||||
separatorStr = \
|
separatorStr = \
|
||||||
'<div class="' + separatorClass + '"><center>' + \
|
'<div class="' + separatorClass + '"><center>' + \
|
||||||
'<img src="/' + iconsPath + '/' + filename + '"/>' + \
|
'<img src="/icons/' + filename + '"/>' + \
|
||||||
'</center></div>\n'
|
'</center></div>\n'
|
||||||
return separatorStr
|
return separatorStr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue