diff --git a/blog.py b/blog.py index 720db020..203d3ed2 100644 --- a/blog.py +++ b/blog.py @@ -10,7 +10,7 @@ import os from datetime import datetime from content import replaceEmojiFromTags -from webapp import getIconsDir +from webapp import getIconsWebPath from webapp import htmlHeaderWithExternalStyle from webapp import htmlFooter from webapp_media import addEmbeddedElements @@ -391,7 +391,7 @@ def htmlBlogPost(authorized: bool, None, False) # show rss links - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) blogStr += '
' blogStr += '' + \ translate['Write your post text below.'] + '
' diff --git a/inbox.py b/inbox.py index 5deb64b2..42616d80 100644 --- a/inbox.py +++ b/inbox.py @@ -57,7 +57,7 @@ from posts import isImageMedia from posts import sendSignedJson from posts import sendToFollowersThread from webapp import individualPostAsHtml -from webapp import getIconsDir +from webapp import getIconsWebPath from question import questionUpdateVotes from media import replaceYouTube from git import isGitPatch @@ -139,7 +139,7 @@ def inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int, if boxname != 'tlevents' and boxname != 'outbox': boxname = 'inbox' individualPostAsHtml(True, recentPostsCache, maxRecentPosts, - getIconsDir(baseDir), translate, pageNumber, + getIconsWebPath(baseDir), translate, pageNumber, baseDir, session, cachedWebfingers, personCache, nickname, domain, port, postJsonObject, avatarUrl, True, allowDeletion, diff --git a/webapp.py b/webapp.py index 47d23f1d..68b50ac9 100644 --- a/webapp.py +++ b/webapp.py @@ -14,7 +14,7 @@ from utils import locatePost from utils import loadJson from shares import getValidSharedItemID from webapp_utils import getAltPath -from webapp_utils import getIconsDir +from webapp_utils import getIconsWebPath from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_post import individualPostAsHtml @@ -146,7 +146,7 @@ def htmlDeletePost(cssCache: {}, """ if '/statuses/' not in messageId: return None - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) actor = messageId.split('/statuses/')[0] nickname = getNicknameFromActor(actor) domain, port = getDomainFromActor(actor) diff --git a/webapp_calendar.py b/webapp_calendar.py index 510b7761..76e6382f 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -20,7 +20,7 @@ from happening import getCalendarEvents from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_utils import getAltPath -from webapp_utils import getIconsDir +from webapp_utils import getIconsWebPath def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, baseDir: str, @@ -122,7 +122,7 @@ def htmlCalendarDay(cssCache: {}, translate: {}, calendarStr += '\n' calendarStr += '\n' - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) if dayEvents: for eventPost in dayEvents: @@ -201,7 +201,7 @@ def htmlCalendar(cssCache: {}, translate: {}, httpPrefix: str, domainFull: str) -> str: """Show the calendar for a person """ - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) domain = domainFull if ':' in domainFull: domain = domainFull.split(':')[0] diff --git a/webapp_column_left.py b/webapp_column_left.py index 5f9aa19c..9a578d2c 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -15,7 +15,7 @@ from webapp_utils import htmlPostSeparator from webapp_utils import getLeftImageFile from webapp_utils import getImageFile from webapp_utils import headerButtonsFrontScreen -from webapp_utils import getIconsDir +from webapp_utils import getIconsWebPath from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_utils import getBannerFile @@ -200,7 +200,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) # is the user a site editor? if nickname == 'news': diff --git a/webapp_column_right.py b/webapp_column_right.py index b2ab6af1..6783c7de 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -24,7 +24,7 @@ from webapp_utils import htmlFooter from webapp_utils import getBannerFile from webapp_utils import htmlPostSeparator from webapp_utils import headerButtonsFrontScreen -from webapp_utils import getIconsDir +from webapp_utils import getIconsWebPath def votesIndicator(totalVotes: int, positiveVoting: bool) -> str: @@ -304,7 +304,7 @@ def htmlCitations(baseDir: str, nickname: str, domain: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - # iconsDir = getIconsDir(baseDir) + # iconsDir = 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 = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) if nickname == 'news': editor = False diff --git a/webapp_create_post.py b/webapp_create_post.py index 2e4f1633..91d5f628 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -10,7 +10,7 @@ import os from utils import isPublicPostFromUrl from utils import getNicknameFromActor from utils import getDomainFromActor -from webapp_utils import getIconsDir +from webapp_utils import getIconsWebPath from webapp_utils import getBannerFile from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter @@ -171,7 +171,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, defaultTimeline: str, newswire: {}) -> str: """New post screen """ - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) replyStr = '' showPublicOnDropdown = True diff --git a/webapp_post.py b/webapp_post.py index 419ad79d..686333e4 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -53,7 +53,7 @@ from webapp_utils import addEmojiToDisplayName from webapp_utils import postContainsPublic from webapp_utils import getContentWarningButton from webapp_utils import getPostAttachmentsAsHtml -from webapp_utils import getIconsDir +from webapp_utils import getIconsWebPath from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_media import addEmbeddedElements @@ -1235,7 +1235,7 @@ def htmlIndividualPost(cssCache: {}, showPublishedDateOnly: bool) -> str: """Show an individual post as html """ - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) postStr = '' if likedBy: likedByNickname = getNicknameFromActor(likedBy) @@ -1350,7 +1350,7 @@ def htmlPostReplies(cssCache: {}, showPublishedDateOnly: bool) -> str: """Show the replies to an individual post as html """ - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) repliesStr = '' if repliesJson.get('orderedItems'): for item in repliesJson['orderedItems']: diff --git a/webapp_profile.py b/webapp_profile.py index ee0c8144..c03ed4e7 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -32,7 +32,7 @@ from pgp import getPGPpubKey from tox import getToxAddress from webapp_utils import scheduledPostsExist from webapp_utils import getPersonAvatarUrl -from webapp_utils import getIconsDir +from webapp_utils import getIconsWebPath from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_utils import addEmojiToDisplayName @@ -245,7 +245,7 @@ def htmlProfileAfterSearch(cssCache: {}, profileStr += ' \n' profileStr += '\n' - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) i = 0 for item in parseUserFeed(session, outboxUrl, asHeader, projectVersion, httpPrefix, domain): @@ -451,7 +451,7 @@ def htmlProfile(rssIconAtTop: bool, donateSection += ' \n' donateSection += '\n' - iconsDir = getIconsDir(baseDir) + iconsDir = getIconsWebPath(baseDir) if not authorized: loginButton = headerButtonsFrontScreen(translate, nickname, 'features', authorized, @@ -553,7 +553,7 @@ def htmlProfile(rssIconAtTop: bool, profileHeaderStr += ' \n' profileHeaderStr += '