diff --git a/blog.py b/blog.py index 203d3ed2..ca6d5a6a 100644 --- a/blog.py +++ b/blog.py @@ -391,7 +391,7 @@ def htmlBlogPost(authorized: bool, None, False) # show rss links - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) blogStr += '

' blogStr += '' + iconsPath + '/logorss.png" />' # blogStr += '' # blogStr += 'RSS 3.0' + # iconsPath + '/rss3.png" />' blogStr += '

' @@ -451,7 +451,7 @@ def htmlBlogPage(authorized: bool, session, # show previous and next buttons if pageNumber is not None: - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) navigateStr = '

' if pageNumber > 1: # show previous button @@ -459,7 +459,7 @@ def htmlBlogPage(authorized: bool, session, domainFull + '/blog/' + \ nickname + '?page=' + str(pageNumber-1) + '">' + \ '<\n' if len(timelineJson['orderedItems']) >= noOfItems: # show next button @@ -467,7 +467,7 @@ def htmlBlogPage(authorized: bool, session, domainFull + '/blog/' + nickname + \ '?page=' + str(pageNumber + 1) + '">' + \ '>\n' navigateStr += '

' blogStr += navigateStr @@ -492,13 +492,13 @@ def htmlBlogPage(authorized: bool, session, domainFull + '/blog/' + nickname + '/rss.xml">' blogStr += 'RSS 2.0' + iconsPath + '/logorss.png" />' # blogStr += '' # blogStr += 'RSS 3.0' + # iconsPath + '/rss3.png" />' blogStr += '

' return blogStr + htmlFooter() @@ -722,7 +722,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {}, print('Edit blog: json not loaded for ' + postFilename) return None - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) editBlogText = '

' + \ translate['Write your post text below.'] + '

' @@ -767,7 +767,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {}, dateAndLocation += \ '

' + iconsPath + '/calendar.png"/>' dateAndLocation += \ '' dateAndLocation += '' @@ -798,7 +798,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {}, editBlogForm += '

' editBlogForm += \ - ' ' + \ scopeDescription + '' editBlogForm += '
' diff --git a/webapp.py b/webapp.py index 68b50ac9..821816d4 100644 --- a/webapp.py +++ b/webapp.py @@ -146,7 +146,7 @@ def htmlDeletePost(cssCache: {}, """ if '/statuses/' not in messageId: return None - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) actor = messageId.split('/statuses/')[0] nickname = getNicknameFromActor(actor) domain, port = getDomainFromActor(actor) @@ -176,7 +176,7 @@ def htmlDeletePost(cssCache: {}, deletePostStr = htmlHeaderWithExternalStyle(cssFilename) deletePostStr += \ individualPostAsHtml(True, recentPostsCache, maxRecentPosts, - iconsDir, translate, pageNumber, + iconsPath, translate, pageNumber, baseDir, session, wfRequest, personCache, nickname, domain, port, postJsonObject, None, True, False, diff --git a/webapp_calendar.py b/webapp_calendar.py index 76e6382f..f0a90d67 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -122,7 +122,7 @@ def htmlCalendarDay(cssCache: {}, translate: {}, calendarStr += '\n' calendarStr += '\n' - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) if dayEvents: for eventPost in dayEvents: @@ -156,7 +156,7 @@ def htmlCalendarDay(cssCache: {}, translate: {}, '">\n' + \
                     translate['Delete this event'] + ' |\n' + iconsPath + '/delete.png" />\n' if eventTime and eventDescription and eventPlace: calendarStr += \ @@ -201,7 +201,7 @@ def htmlCalendar(cssCache: {}, translate: {}, httpPrefix: str, domainFull: str) -> str: """Show the calendar for a person """ - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) domain = domainFull if ':' in domainFull: domain = domainFull.split(':')[0] @@ -302,7 +302,7 @@ def htmlCalendar(cssCache: {}, translate: {}, '?month=' + str(prevMonthNumber) + '">' calendarStr += \ ' ' + translate['Previous month'] + \
-        '\n' calendarStr += ' ' @@ -312,7 +312,7 @@ def htmlCalendar(cssCache: {}, translate: {}, '?month=' + str(nextMonthNumber) + '">' calendarStr += \ ' ' + translate['Next month'] + \
-        '\n' calendarStr += '\n' calendarStr += '\n' diff --git a/webapp_column_left.py b/webapp_column_left.py index 9a578d2c..471f243c 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -23,7 +23,7 @@ from webapp_utils import getBannerFile def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, httpPrefix: str, translate: {}, - iconsDir: str, editor: bool, + iconsPath: str, editor: bool, showBackButton: bool, timelinePath: str, rssIconAtTop: bool, showHeaderImage: bool, frontPage: bool) -> str: @@ -91,7 +91,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, '" loading="lazy" alt="' + \ translate['Edit Links'] + '" title="' + \ translate['Edit Links'] + '" src="/' + \ - iconsDir + '/edit.png" />\n' + iconsPath + '/edit.png" />\n' # RSS icon if nickname != 'news': @@ -110,7 +110,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str, '' + rssTitle + \
         '\n' + '" src="/' + iconsPath + '/logorss.png" />\n' if rssIconAtTop: htmlStr += rssIconStr htmlStr += ' \n' @@ -200,7 +200,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) # is the user a site editor? if nickname == 'news': @@ -222,11 +222,11 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, htmlStr += '
' + \ headerButtonsFrontScreen(translate, nickname, 'links', authorized, - iconsAsButtons, iconsDir) + '
' + iconsAsButtons, iconsPath) + '' htmlStr += \ getLeftColumnContent(baseDir, nickname, domainFull, httpPrefix, translate, - iconsDir, editor, + iconsPath, editor, False, timelinePath, rssIconAtTop, False, False) htmlStr += '\n' + htmlFooter() diff --git a/webapp_column_right.py b/webapp_column_right.py index 6783c7de..1095b3b7 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -43,7 +43,7 @@ def votesIndicator(totalVotes: int, positiveVoting: bool) -> str: def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, httpPrefix: str, translate: {}, - iconsDir: str, moderator: bool, editor: bool, + iconsPath: str, moderator: bool, editor: bool, newswire: {}, positiveVoting: bool, showBackButton: bool, timelinePath: str, showPublishButton: bool, @@ -142,7 +142,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, '" loading="lazy" alt="' + \ translate['Edit newswire'] + '" title="' + \ translate['Edit newswire'] + '" src="/' + \ - iconsDir + '/edit_notify.png" />\n' + iconsPath + '/edit_notify.png" />\n' else: # show the edit icon htmlStr += \ @@ -152,7 +152,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, '" loading="lazy" alt="' + \ translate['Edit newswire'] + '" title="' + \ translate['Edit newswire'] + '" src="/' + \ - iconsDir + '/edit.png" />\n' + iconsPath + '/edit.png" />\n' # show the RSS icon rssIconStr = \ @@ -161,7 +161,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, '" loading="lazy" alt="' + \ translate['Newswire RSS Feed'] + '" title="' + \ translate['Newswire RSS Feed'] + '" src="/' + \ - iconsDir + '/logorss.png" />\n' + iconsPath + '/logorss.png" />\n' if rssIconAtTop: htmlStr += rssIconStr @@ -175,7 +175,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, '" loading="lazy" alt="' + \ translate['Publish a news article'] + '" title="' + \ translate['Publish a news article'] + '" src="/' + \ - iconsDir + '/publish.png" />\n' + iconsPath + '/publish.png" />\n' if editImageClass == 'rightColEdit': htmlStr += ' \n' @@ -189,7 +189,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, # show the newswire lines newswireContentStr = \ htmlNewswire(baseDir, newswire, nickname, moderator, translate, - positiveVoting, iconsDir) + positiveVoting, iconsPath) htmlStr += newswireContentStr # show the rss icon at the bottom, typically on the right hand side @@ -199,7 +199,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool, - translate: {}, positiveVoting: bool, iconsDir: str) -> str: + translate: {}, positiveVoting: bool, iconsPath: str) -> str: """Converts a newswire dict into html """ separatorStr = htmlPostSeparator(baseDir, 'right') @@ -232,7 +232,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool, '/newswireunvote=' + dateStrLink + '" ' + \ 'title="' + translate['Remove Vote'] + '">' htmlStr += '

\n' + iconsPath + '/vote.png" />

\n' else: htmlStr += ' ' htmlStr += dateShown + '

\n' @@ -257,7 +257,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool, '/newswirevote=' + dateStrLink + '" ' + \ 'title="' + translate['Vote'] + '">' htmlStr += '' + iconsPath + '/vote.png" />' htmlStr += '

\n' else: htmlStr += '

' + \ @@ -304,7 +304,7 @@ def htmlCitations(baseDir: str, nickname: str, domain: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - # iconsDir = getIconsWebPath(baseDir) + # iconsPath = getIconsWebPath(baseDir) htmlStr = htmlHeaderWithExternalStyle(cssFilename) @@ -394,7 +394,7 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - iconsDir = getIconsWebPath(baseDir) + iconsPath = getIconsWebPath(baseDir) if nickname == 'news': editor = False @@ -419,11 +419,11 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str, htmlStr += '

' + \ headerButtonsFrontScreen(translate, nickname, 'newswire', authorized, - iconsAsButtons, iconsDir) + '
' + iconsAsButtons, iconsPath) + '' htmlStr += \ getRightColumnContent(baseDir, nickname, domainFull, httpPrefix, translate, - iconsDir, moderator, editor, + iconsPath, moderator, editor, newswire, positiveVoting, False, timelinePath, showPublishButton, showPublishAsIcon, rssIconAtTop, False, diff --git a/webapp_create_post.py b/webapp_create_post.py index 91d5f628..49ee03a5 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -59,7 +59,7 @@ def htmlFollowingDataList(baseDir: str, nickname: str, def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str, replyStr: str, translate: {}, - iconsDir: str, + iconsPath: str, showPublicOnDropdown: bool, defaultTimeline: str, pathBase: str, @@ -79,7 +79,7 @@ def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str, dropDownContent += ' \n' dropDownContent += '