mirror of
https://github.com/searxng/searxng.git
synced 2025-09-05 17:58:34 +02:00
[enh] theme/simple: custom router
Lay the foundation for loading scripts granularly depending on the endpoint it's on. Remove vendor specific prefixes as there are now managed by browserslist and LightningCSS. Enabled quite a few rules in Biome that don't come in recommended to better catch issues and improve consistency. Related: - https://github.com/searxng/searxng/pull/5073#discussion_r2256037965 - https://github.com/searxng/searxng/pull/5073#discussion_r2256057100
This commit is contained in:
parent
adc4361eb9
commit
60bd8b90f0
28 changed files with 1109 additions and 1039 deletions
|
@ -358,7 +358,7 @@ def get_client_settings():
|
|||
'favicon_resolver': req_pref.get_value('favicon_resolver'),
|
||||
'advanced_search': req_pref.get_value('advanced_search'),
|
||||
'query_in_title': req_pref.get_value('query_in_title'),
|
||||
'safesearch': str(req_pref.get_value('safesearch')),
|
||||
'safesearch': req_pref.get_value('safesearch'),
|
||||
'theme': req_pref.get_value('theme'),
|
||||
'doi_resolver': get_doi_resolver(),
|
||||
}
|
||||
|
@ -368,15 +368,7 @@ def render(template_name: str, **kwargs):
|
|||
# values from the preferences
|
||||
# pylint: disable=too-many-statements
|
||||
client_settings = get_client_settings()
|
||||
kwargs['client_settings'] = str(
|
||||
base64.b64encode(
|
||||
bytes(
|
||||
json.dumps(client_settings),
|
||||
encoding='utf-8',
|
||||
)
|
||||
),
|
||||
encoding='utf-8',
|
||||
)
|
||||
kwargs['client_settings'] = base64.b64encode(json.dumps(client_settings).encode('utf-8')).decode('utf-8')
|
||||
kwargs['preferences'] = sxng_request.preferences
|
||||
kwargs.update(client_settings)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue