mirror of https://gitlab.com/bashrc2/epicyon
Text mode banner on search screen
parent
8673cbe315
commit
4c9e5d8544
|
|
@ -11043,7 +11043,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.baseDir, self.path,
|
self.server.baseDir, self.path,
|
||||||
self.server.domain,
|
self.server.domain,
|
||||||
self.server.defaultTimeline,
|
self.server.defaultTimeline,
|
||||||
self.server.themeName).encode('utf-8')
|
self.server.themeName,
|
||||||
|
self.server.textModeBanner).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen, cookie, callingDomain)
|
self._set_headers('text/html', msglen, cookie, callingDomain)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,14 @@ a:focus {
|
||||||
border: 2px solid var(--focus-color);
|
border: 2px solid var(--focus-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.transparent {
|
||||||
|
color: transparent;
|
||||||
|
background: transparent;
|
||||||
|
font-size: 0px;
|
||||||
|
line-height: 0px;
|
||||||
|
height: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.cw {
|
.cw {
|
||||||
font-style: var(--cw-style);
|
font-style: var(--cw-style);
|
||||||
color: var(--cw-color);
|
color: var(--cw-color);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ from utils import searchBoxPosts
|
||||||
from categories import getHashtagCategory
|
from categories import getHashtagCategory
|
||||||
from feeds import rss2TagHeader
|
from feeds import rss2TagHeader
|
||||||
from feeds import rss2TagFooter
|
from feeds import rss2TagFooter
|
||||||
|
from webapp_utils import htmlKeyboardNavigation
|
||||||
from webapp_utils import getAltPath
|
from webapp_utils import getAltPath
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
|
|
@ -317,7 +318,8 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {},
|
||||||
|
|
||||||
def htmlSearch(cssCache: {}, translate: {},
|
def htmlSearch(cssCache: {}, translate: {},
|
||||||
baseDir: str, path: str, domain: str,
|
baseDir: str, path: str, domain: str,
|
||||||
defaultTimeline: str, theme: str) -> str:
|
defaultTimeline: str, theme: str,
|
||||||
|
textModeBanner: str) -> str:
|
||||||
"""Search called from the timeline icon
|
"""Search called from the timeline icon
|
||||||
"""
|
"""
|
||||||
actor = path.replace('/search', '')
|
actor = path.replace('/search', '')
|
||||||
|
|
@ -340,10 +342,14 @@ def htmlSearch(cssCache: {}, translate: {},
|
||||||
searchBannerFile, searchBannerFilename = \
|
searchBannerFile, searchBannerFilename = \
|
||||||
getSearchBannerFile(baseDir, searchNickname, domain, theme)
|
getSearchBannerFile(baseDir, searchNickname, domain, theme)
|
||||||
|
|
||||||
|
textModeBannerStr = htmlKeyboardNavigation(textModeBanner, {})
|
||||||
|
if textModeBannerStr is None:
|
||||||
|
textModeBannerStr = ''
|
||||||
|
|
||||||
if os.path.isfile(searchBannerFilename):
|
if os.path.isfile(searchBannerFilename):
|
||||||
usersPath = '/users/' + searchNickname
|
usersPath = '/users/' + searchNickname
|
||||||
followStr += \
|
followStr += \
|
||||||
'<header>\n' + \
|
'<header>\n' + textModeBannerStr + \
|
||||||
'<a href="' + usersPath + '/' + defaultTimeline + '" title="' + \
|
'<a href="' + usersPath + '/' + defaultTimeline + '" title="' + \
|
||||||
translate['Switch to timeline view'] + '" alt="' + \
|
translate['Switch to timeline view'] + '" alt="' + \
|
||||||
translate['Switch to timeline view'] + '">\n'
|
translate['Switch to timeline view'] + '">\n'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue