Add new settings templates for hotkeys, title query, and URL formatting

- Create hotkeys.html template with SearXNG and Vim-like hotkey options
- Add title_query.html template for toggling query display in page title
- Implement url_formatting.html template with URL display format selection
- Include descriptive labels and help text for each setting
This commit is contained in:
Gnkalk 2025-02-17 19:15:09 +03:30
parent 48748f0f25
commit 3e09ed6728
3 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<fieldset>
<div class="container">
<legend id="pref_hotkeys">{{- _('Hotkeys') -}}</legend>
<select name="hotkeys" aria-labelledby="pref_hotkeys" aria-describedby="desc_hotkeys">
<option value="default"
{%- if hotkeys == 'default' %} selected="selected"
{%- endif -%}>
SearXNG
</option>
<option value="vim"
{%- if hotkeys == 'vim' %} selected="selected"
{%- endif -%}>
{{- _('Vim-like') -}}
</option>
</select>
</div>
<div class="description" id="desc_url_formatting">
{{- _(
'Navigate search results with hotkeys (JavaScript required). '
'Press "h" key on main or result page to get help.'
) -}}
</div>
</fieldset>

View file

@ -0,0 +1,15 @@
<fieldset>
<div class="container">
<legend id="pref_query_in_title">
{{ _("Query in the page's title") }}
</legend>
<input type="checkbox" name="query_in_title"
aria-labelledby="pref_query_in_title"
aria-describedby="desc_query_in_title" class="switch" {%- if
preferences.get_value('query_in_title') -%} checked {%- endif -%} >
</div>
<div class="description" id="desc_query_in_title">
{{- _("When enabled, the result page's title contains your query. Your
browser can record this title") -}}
</div>
</fieldset>

View file

@ -0,0 +1,25 @@
<fieldset>
<div class="container">
<legend id="pref_url_formatting">{{- _('URL formatting') -}}</legend>
<select name="url_formatting" aria-labelledby="pref_url_formatting" aria-describedby="desc_url_formatting">
<option value="pretty"
{%- if preferences.get_value('url_formatting') == 'pretty' %} selected="selected"
{%- endif -%}>
{{- _('Pretty') -}}
</option>
<option value="full"
{%- if preferences.get_value('url_formatting') == 'full' %} selected="selected"
{%- endif -%}>
{{- _('Full') -}}
</option>
<option value="host"
{%- if preferences.get_value('url_formatting') == 'host' %} selected="selected"
{%- endif -%}>
{{- _('Host') -}}
</option>
</select>
</div>
<div class="description" id="desc_url_formatting">
{{- _('Change result URL formatting') -}}
</div>
</fieldset>