mirror of https://github.com/searxng/searxng.git
Merge pull request #1428 from return42/fix-center_aligment
fix typo and document preference 'center_alignment' in the 'ui' section
This commit is contained in:
commit
df837d8b1b
|
@ -230,6 +230,7 @@ Global Settings
|
||||||
ui:
|
ui:
|
||||||
default_locale: ""
|
default_locale: ""
|
||||||
query_in_title: false
|
query_in_title: false
|
||||||
|
center_alignment: false
|
||||||
default_theme: simple
|
default_theme: simple
|
||||||
theme_args:
|
theme_args:
|
||||||
simple_style: auto
|
simple_style: auto
|
||||||
|
@ -240,16 +241,21 @@ Global Settings
|
||||||
specific instance of searx, a locale can be defined using an ISO language
|
specific instance of searx, a locale can be defined using an ISO language
|
||||||
code, like ``fr``, ``en``, ``de``.
|
code, like ``fr``, ``en``, ``de``.
|
||||||
|
|
||||||
|
``query_in_title`` :
|
||||||
|
When true, the result page's titles contains the query it decreases the
|
||||||
|
privacy, since the browser can records the page titles.
|
||||||
|
|
||||||
|
``center_alignment`` : default ``false``
|
||||||
|
When enabled, the results are centered instead of being in the left (or RTL)
|
||||||
|
side of the screen. This setting only affects the *desktop layout*
|
||||||
|
(:origin:`min-width: @tablet <searx/static/themes/simple/src/less/definitions.less>`)
|
||||||
|
|
||||||
``default_theme`` :
|
``default_theme`` :
|
||||||
Name of the theme you want to use by default on your SearXNG instance.
|
Name of the theme you want to use by default on your SearXNG instance.
|
||||||
|
|
||||||
``theme_args.simple_style``:
|
``theme_args.simple_style``:
|
||||||
Style of simple theme: ``auto``, ``light``, ``dark``
|
Style of simple theme: ``auto``, ``light``, ``dark``
|
||||||
|
|
||||||
``query_in_title`` :
|
|
||||||
When true, the result page's titles contains the query it decreases the
|
|
||||||
privacy, since the browser can records the page titles.
|
|
||||||
|
|
||||||
``results_on_new_tab``:
|
``results_on_new_tab``:
|
||||||
Open result links in a new tab by default.
|
Open result links in a new tab by default.
|
||||||
|
|
||||||
|
|
|
@ -365,9 +365,9 @@ class Preferences:
|
||||||
locked=is_locked('simple_style'),
|
locked=is_locked('simple_style'),
|
||||||
choices=['', 'auto', 'light', 'dark']
|
choices=['', 'auto', 'light', 'dark']
|
||||||
),
|
),
|
||||||
'center_aligment': MapSetting(
|
'center_alignment': MapSetting(
|
||||||
settings['ui']['center_aligment'],
|
settings['ui']['center_alignment'],
|
||||||
locked=is_locked('center_aligment'),
|
locked=is_locked('center_alignment'),
|
||||||
map={
|
map={
|
||||||
'0': False,
|
'0': False,
|
||||||
'1': True,
|
'1': True,
|
||||||
|
|
|
@ -92,7 +92,7 @@ ui:
|
||||||
# ui theme
|
# ui theme
|
||||||
default_theme: simple
|
default_theme: simple
|
||||||
# center the results ?
|
# center the results ?
|
||||||
center_aligment: false
|
center_alignment: false
|
||||||
# Default interface locale - leave blank to detect from browser information or
|
# Default interface locale - leave blank to detect from browser information or
|
||||||
# use codes from the 'locales' config section
|
# use codes from the 'locales' config section
|
||||||
default_locale: ""
|
default_locale: ""
|
||||||
|
|
|
@ -185,7 +185,7 @@ SCHEMA = {
|
||||||
'theme_args': {
|
'theme_args': {
|
||||||
'simple_style': SettingsValue(SIMPLE_STYLE, 'auto'),
|
'simple_style': SettingsValue(SIMPLE_STYLE, 'auto'),
|
||||||
},
|
},
|
||||||
'center_aligment': SettingsValue(bool, False),
|
'center_alignment': SettingsValue(bool, False),
|
||||||
'results_on_new_tab': SettingsValue(bool, False),
|
'results_on_new_tab': SettingsValue(bool, False),
|
||||||
'advanced_search': SettingsValue(bool, False),
|
'advanced_search': SettingsValue(bool, False),
|
||||||
'query_in_title': SettingsValue(bool, False),
|
'query_in_title': SettingsValue(bool, False),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!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>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="description" content="SearXNG — a privacy-respecting, hackable metasearch engine">
|
<meta name="description" content="SearXNG — a privacy-respecting, hackable metasearch engine">
|
||||||
|
|
|
@ -214,11 +214,11 @@
|
||||||
<div class="description">{{ _('Choose auto to follow your browser settings') }}</div>
|
<div class="description">{{ _('Choose auto to follow your browser settings') }}</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend id="pref_center_aligment">{{ _('Center Alignment') }}</legend>
|
<legend id="pref_center_alignment">{{ _('Center Alignment') }}</legend>
|
||||||
<p class="value">
|
<p class="value">
|
||||||
<select name="center_aligment" aria-labelledby="pref_center_aligment">
|
<select name="center_alignment" aria-labelledby="pref_center_alignment">
|
||||||
<option value="1" {% if preferences.get_value('center_aligment') %}selected="selected"{% endif %}>{{ _('On') }}</option>
|
<option value="1" {% if preferences.get_value('center_alignment') %}selected="selected"{% endif %}>{{ _('On') }}</option>
|
||||||
<option value="0" {% if not preferences.get_value('center_aligment') %}selected="selected"{% endif %}>{{ _('Off')}}</option>
|
<option value="0" {% if not preferences.get_value('center_alignment') %}selected="selected"{% endif %}>{{ _('Off')}}</option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<div class="description">{{ _('Displays results in the center of the page (Oscar layout).') }}</div>
|
<div class="description">{{ _('Displays results in the center of the page (Oscar layout).') }}</div>
|
||||||
|
|
Loading…
Reference in New Issue