From a77794468ae45993c9900451836eb895b27d9d63 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 28 Jul 2021 20:37:51 +0100 Subject: [PATCH] Banner above shared item selected from left column --- daemon.py | 4 +++- webapp_utils.py | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index e72e4f264..d9737f2b9 100644 --- a/daemon.py +++ b/daemon.py @@ -11266,7 +11266,9 @@ class PubServer(BaseHTTPRequestHandler): self.server.domain, nickname, self.server.httpPrefix, self.server.domainFull, itemID, self.server.translate, - self.server.sharedItemsFederatedDomains) + self.server.sharedItemsFederatedDomains, + self.server.defaultTimeline, + self.server.themeName) if not msg: if callingDomain.endswith('.onion') and \ self.server.onionDomain: diff --git a/webapp_utils.py b/webapp_utils.py index b3457de1f..eaf30c146 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -1310,7 +1310,8 @@ def htmlSearchResultShare(sharedItem: {}, translate: {}, def htmlShowShare(baseDir: str, domain: str, nickname: str, httpPrefix: str, domainFull: str, itemID: str, translate: {}, - sharedItemsFederatedDomains: []) -> str: + sharedItemsFederatedDomains: [], + defaultTimeline: str, theme: str) -> str: """Shows an individual shared item after selecting it from the left column """ sharesJson = None @@ -1355,10 +1356,23 @@ def htmlShowShare(baseDir: str, domain: str, nickname: str, return None sharedItem = sharesJson[itemID] actor = httpPrefix + '://' + domainFull + '/users/' + nickname + + # filename of the banner shown at the top + bannerFile, bannerFilename = \ + getBannerFile(baseDir, nickname, domain, theme) + shareStr = \ + '
\n' + \ + '\n' + shareStr += '\n' + \ + '

\n' + shareStr += '
' + \ htmlSearchResultShare(sharedItem, translate, httpPrefix, domainFull, contactNickname, itemID, - actor) + actor) + '
' cssFilename = baseDir + '/epicyon-profile.css' if os.path.isfile(baseDir + '/epicyon.css'):