summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-09-16 17:14:18 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-09-19 08:06:06 +0200
commit317db5b04f6de919e996df943f7f0a845b8238a9 (patch)
tree913bf68346fbd18b5cd0363658c259dbac4a1b4f /searx/templates
parent09935e289730027f6d7e1476916381bd6a98349c (diff)
downloadsearxng-317db5b04f6de919e996df943f7f0a845b8238a9.tar.gz
searxng-317db5b04f6de919e996df943f7f0a845b8238a9.zip
[mod] preferences: implement drop-down menu for hotkeys (default, vim)
Replace the on/off checkbox of the vim-hotkeys in the preferences by a drop-down menu. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/simple/preferences.html1
-rw-r--r--searx/templates/simple/preferences/hotkeys.html23
2 files changed, 24 insertions, 0 deletions
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
index 3d62682bb..9dab84fd1 100644
--- a/searx/templates/simple/preferences.html
+++ b/searx/templates/simple/preferences.html
@@ -200,6 +200,7 @@
{%- if 'search_on_category_select' not in locked_preferences -%}
{%- include 'simple/preferences/search_on_category_select.html' -%}
{%- endif -%}
+ {%- include 'simple/preferences/hotkeys.html' -%}
{{- plugin_preferences('ui') -}}
{{- tab_footer() -}}
diff --git a/searx/templates/simple/preferences/hotkeys.html b/searx/templates/simple/preferences/hotkeys.html
new file mode 100644
index 000000000..c13d0c8d2
--- /dev/null
+++ b/searx/templates/simple/preferences/hotkeys.html
@@ -0,0 +1,23 @@
+<fieldset>{{- '' -}}
+ <legend id="pref_hotkeys">{{- _('Hotkeys') -}}</legend>{{- '' -}}
+ <div class="value">{{- '' -}}
+ <select name="hotkeys" aria-labelledby="pref_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">
+ {{- _(
+ 'Navigate search results with hotkeys (JavaScript required). '
+ 'Press "h" key on main or result page to get help.'
+ ) -}}
+ </div>{{- '' -}}
+</fieldset>{{- '' -}}