mirror of https://gitlab.com/bashrc2/epicyon
Banner on hashtag search
parent
153f446b6f
commit
7d8cfbb19e
|
@ -3902,7 +3902,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.lists_enabled,
|
self.server.lists_enabled,
|
||||||
timezone, bold_reading,
|
timezone, bold_reading,
|
||||||
self.server.dogwhistles,
|
self.server.dogwhistles,
|
||||||
self.server.map_format)
|
self.server.map_format,
|
||||||
|
self.server.access_keys,
|
||||||
|
'search')
|
||||||
if hashtag_str:
|
if hashtag_str:
|
||||||
msg = hashtag_str.encode('utf-8')
|
msg = hashtag_str.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -8606,7 +8608,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.lists_enabled,
|
self.server.lists_enabled,
|
||||||
timezone, bold_reading,
|
timezone, bold_reading,
|
||||||
self.server.dogwhistles,
|
self.server.dogwhistles,
|
||||||
self.server.map_format)
|
self.server.map_format,
|
||||||
|
self.server.access_keys,
|
||||||
|
self.server.default_timeline)
|
||||||
if hashtag_str:
|
if hashtag_str:
|
||||||
msg = hashtag_str.encode('utf-8')
|
msg = hashtag_str.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
|
|
@ -30,6 +30,7 @@ from skills import get_skills_from_list
|
||||||
from categories import get_hashtag_category
|
from categories import get_hashtag_category
|
||||||
from feeds import rss2tag_header
|
from feeds import rss2tag_header
|
||||||
from feeds import rss2tag_footer
|
from feeds import rss2tag_footer
|
||||||
|
from webapp_utils import get_banner_file
|
||||||
from webapp_utils import html_common_emoji
|
from webapp_utils import html_common_emoji
|
||||||
from webapp_utils import set_custom_background
|
from webapp_utils import set_custom_background
|
||||||
from webapp_utils import html_keyboard_navigation
|
from webapp_utils import html_keyboard_navigation
|
||||||
|
@ -738,7 +739,8 @@ def html_hashtag_search(nickname: str, domain: str, port: int,
|
||||||
signing_priv_key_pem: str,
|
signing_priv_key_pem: str,
|
||||||
cw_lists: {}, lists_enabled: str,
|
cw_lists: {}, lists_enabled: str,
|
||||||
timezone: str, bold_reading: bool,
|
timezone: str, bold_reading: bool,
|
||||||
dogwhistles: {}, map_format: str) -> str:
|
dogwhistles: {}, map_format: str,
|
||||||
|
access_keys: {}, box_name: str) -> str:
|
||||||
"""Show a page containing search results for a hashtag
|
"""Show a page containing search results for a hashtag
|
||||||
or after selecting a hashtag from the swarm
|
or after selecting a hashtag from the swarm
|
||||||
"""
|
"""
|
||||||
|
@ -784,16 +786,33 @@ def html_hashtag_search(nickname: str, domain: str, port: int,
|
||||||
if end_index >= no_of_lines and no_of_lines > 0:
|
if end_index >= no_of_lines and no_of_lines > 0:
|
||||||
end_index = no_of_lines - 1
|
end_index = no_of_lines - 1
|
||||||
|
|
||||||
# add the page title
|
|
||||||
instance_title = \
|
instance_title = \
|
||||||
get_config_param(base_dir, 'instanceTitle')
|
get_config_param(base_dir, 'instanceTitle')
|
||||||
hashtag_search_form = \
|
hashtag_search_form = \
|
||||||
html_header_with_external_style(css_filename, instance_title, None)
|
html_header_with_external_style(css_filename, instance_title, None)
|
||||||
|
|
||||||
if nickname:
|
if nickname:
|
||||||
|
# banner at top
|
||||||
|
banner_file, _ = \
|
||||||
|
get_banner_file(base_dir, nickname, domain, theme_name)
|
||||||
|
hashtag_search_form += \
|
||||||
|
'<header>\n' + \
|
||||||
|
'<a href="/users/' + nickname + '/' + box_name + '" title="' + \
|
||||||
|
translate['Switch to timeline view'] + '" alt="' + \
|
||||||
|
translate['Switch to timeline view'] + '" ' + \
|
||||||
|
'aria-flowto="containerHeader" tabindex="1" accesskey="' + \
|
||||||
|
access_keys['menuTimeline'] + '">\n'
|
||||||
|
hashtag_search_form += '<img loading="lazy" decoding="async" ' + \
|
||||||
|
'class="timeline-banner" alt="" ' + \
|
||||||
|
'src="/users/' + nickname + '/' + banner_file + '" /></a>\n' + \
|
||||||
|
'</header>\n'
|
||||||
|
|
||||||
|
# add the page title
|
||||||
hashtag_search_form += '<center>\n' + \
|
hashtag_search_form += '<center>\n' + \
|
||||||
'<h1><a href="/users/' + nickname + '/search">#' + \
|
'<h1><a href="/users/' + nickname + '/search">#' + \
|
||||||
hashtag + '</a>'
|
hashtag + '</a>'
|
||||||
else:
|
else:
|
||||||
|
# add the page title
|
||||||
hashtag_search_form += '<center>\n' + \
|
hashtag_search_form += '<center>\n' + \
|
||||||
'<h1>#' + hashtag
|
'<h1>#' + hashtag
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue