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