From 4c9e5d85446b267877a8c2ebfa809a523d8ce501 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 Feb 2021 13:33:30 +0000 Subject: [PATCH] Text mode banner on search screen --- daemon.py | 3 ++- epicyon-search.css | 8 ++++++++ webapp_search.py | 10 ++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index 275a65ddf..675a205de 100644 --- a/daemon.py +++ b/daemon.py @@ -11043,7 +11043,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.baseDir, self.path, self.server.domain, self.server.defaultTimeline, - self.server.themeName).encode('utf-8') + self.server.themeName, + self.server.textModeBanner).encode('utf-8') msglen = len(msg) self._set_headers('text/html', msglen, cookie, callingDomain) self._write(msg) diff --git a/epicyon-search.css b/epicyon-search.css index 9f61bcd1f..c2078c108 100644 --- a/epicyon-search.css +++ b/epicyon-search.css @@ -102,6 +102,14 @@ a:focus { border: 2px solid var(--focus-color); } +.transparent { + color: transparent; + background: transparent; + font-size: 0px; + line-height: 0px; + height: 0px; +} + .cw { font-style: var(--cw-style); color: var(--cw-color); diff --git a/webapp_search.py b/webapp_search.py index af512fe38..0912beb90 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -23,6 +23,7 @@ from utils import searchBoxPosts from categories import getHashtagCategory from feeds import rss2TagHeader from feeds import rss2TagFooter +from webapp_utils import htmlKeyboardNavigation from webapp_utils import getAltPath from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter @@ -317,7 +318,8 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {}, def htmlSearch(cssCache: {}, translate: {}, baseDir: str, path: str, domain: str, - defaultTimeline: str, theme: str) -> str: + defaultTimeline: str, theme: str, + textModeBanner: str) -> str: """Search called from the timeline icon """ actor = path.replace('/search', '') @@ -340,10 +342,14 @@ def htmlSearch(cssCache: {}, translate: {}, searchBannerFile, searchBannerFilename = \ getSearchBannerFile(baseDir, searchNickname, domain, theme) + textModeBannerStr = htmlKeyboardNavigation(textModeBanner, {}) + if textModeBannerStr is None: + textModeBannerStr = '' + if os.path.isfile(searchBannerFilename): usersPath = '/users/' + searchNickname followStr += \ - '
\n' + \ + '
\n' + textModeBannerStr + \ '\n'