diff options
author | Alexandre Flament <alex@al-f.net> | 2022-07-07 09:43:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 09:43:12 +0200 |
commit | df837d8b1b45d7386a1ab81f9b5da04baedc6274 (patch) | |
tree | a7ce3e439e7d7d8fd1cd8598bf23ed8c934c63b0 /searx | |
parent | e524358426ffeb5a8bdefef429e5e7611a1c0c35 (diff) | |
parent | d8de994e0fd0abd42172bbae7026e04082708fe9 (diff) | |
download | searxng-df837d8b1b45d7386a1ab81f9b5da04baedc6274.tar.gz searxng-df837d8b1b45d7386a1ab81f9b5da04baedc6274.zip |
Merge pull request #1428 from return42/fix-center_aligment
fix typo and document preference 'center_alignment' in the 'ui' section
Diffstat (limited to 'searx')
-rw-r--r-- | searx/preferences.py | 6 | ||||
-rw-r--r-- | searx/settings.yml | 2 | ||||
-rw-r--r-- | searx/settings_defaults.py | 2 | ||||
-rw-r--r-- | searx/templates/simple/base.html | 2 | ||||
-rw-r--r-- | searx/templates/simple/preferences.html | 8 |
5 files changed, 10 insertions, 10 deletions
diff --git a/searx/preferences.py b/searx/preferences.py index a7ecac55e..fdb4f5008 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -365,9 +365,9 @@ class Preferences: locked=is_locked('simple_style'), choices=['', 'auto', 'light', 'dark'] ), - 'center_aligment': MapSetting( - settings['ui']['center_aligment'], - locked=is_locked('center_aligment'), + 'center_alignment': MapSetting( + settings['ui']['center_alignment'], + locked=is_locked('center_alignment'), map={ '0': False, '1': True, diff --git a/searx/settings.yml b/searx/settings.yml index a8ec798e7..7bbdda85e 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -92,7 +92,7 @@ ui: # ui theme default_theme: simple # center the results ? - center_aligment: false + center_alignment: false # Default interface locale - leave blank to detect from browser information or # use codes from the 'locales' config section default_locale: "" diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index bb4707cc4..3185dd7bd 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -185,7 +185,7 @@ SCHEMA = { 'theme_args': { 'simple_style': SettingsValue(SIMPLE_STYLE, 'auto'), }, - 'center_aligment': SettingsValue(bool, False), + 'center_alignment': SettingsValue(bool, False), 'results_on_new_tab': SettingsValue(bool, False), 'advanced_search': SettingsValue(bool, False), 'query_in_title': SettingsValue(bool, False), diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index d1d3d8fe5..a2464a1a5 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html class="no-js theme-{{ preferences.get_value('simple_style') or 'auto' }} center-aligment-{{ preferences.get_value('center_aligment') and 'yes' or 'no' }}" lang="{{ locale_rfc5646 }}" {% if rtl %} dir="rtl"{% endif %}> +<html class="no-js theme-{{ preferences.get_value('simple_style') or 'auto' }} center-aligment-{{ preferences.get_value('center_alignment') and 'yes' or 'no' }}" lang="{{ locale_rfc5646 }}" {% if rtl %} dir="rtl"{% endif %}> <head> <meta charset="UTF-8" /> <meta name="description" content="SearXNG — a privacy-respecting, hackable metasearch engine"> diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index aa0e65e28..8ee0a02c7 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -214,11 +214,11 @@ <div class="description">{{ _('Choose auto to follow your browser settings') }}</div> </fieldset> <fieldset> - <legend id="pref_center_aligment">{{ _('Center Alignment') }}</legend> + <legend id="pref_center_alignment">{{ _('Center Alignment') }}</legend> <p class="value"> - <select name="center_aligment" aria-labelledby="pref_center_aligment"> - <option value="1" {% if preferences.get_value('center_aligment') %}selected="selected"{% endif %}>{{ _('On') }}</option> - <option value="0" {% if not preferences.get_value('center_aligment') %}selected="selected"{% endif %}>{{ _('Off')}}</option> + <select name="center_alignment" aria-labelledby="pref_center_alignment"> + <option value="1" {% if preferences.get_value('center_alignment') %}selected="selected"{% endif %}>{{ _('On') }}</option> + <option value="0" {% if not preferences.get_value('center_alignment') %}selected="selected"{% endif %}>{{ _('Off')}}</option> </select> </p> <div class="description">{{ _('Displays results in the center of the page (Oscar layout).') }}</div> |