diff --git a/searx/static/themes/simple/src/less/toolkit.less b/searx/static/themes/simple/src/less/toolkit.less index 93fa5e04c..18f72795d 100644 --- a/searx/static/themes/simple/src/less/toolkit.less +++ b/searx/static/themes/simple/src/less/toolkit.less @@ -428,7 +428,7 @@ reversed-checkbox displays unchecked checkedboxes as checked, and vice versa. see https://github.com/searxng/searxng/blob/3408d061aab9abc6168fec9bbc6deab71b236dac/searx/templates/simple/preferences.html#L313 */ input.checkbox-onoff[type="checkbox"], -.reversed-checkbox input.checkbox-onoff[type="checkbox"]:checked { +input.checkbox-onoff.reversed-checkbox[type="checkbox"]:checked { background: var(--color-toolkit-checkbox-onoff-off-background); &::before { @@ -440,7 +440,7 @@ input.checkbox-onoff[type="checkbox"], } input.checkbox-onoff[type="checkbox"]:checked, -.reversed-checkbox input.checkbox-onoff[type="checkbox"] { +input.checkbox-onoff.reversed-checkbox[type="checkbox"] { background: var(--color-toolkit-checkbox-onoff-on-background); &::before { diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html index d9af3fbbb..7e3c05e5d 100644 --- a/searx/templates/simple/macros.html +++ b/searx/templates/simple/macros.html @@ -52,33 +52,12 @@ {%- endmacro -%} - -{%- macro tabs_open() -%} -
-{%- endmacro -%} - -{%- macro tab_header(name, id, label, checked) -%} - - -
-{%- endmacro -%} - -{%- macro tab_footer() -%} -
-{%- endmacro -%} - -{%- macro tabs_close() -%} -
-{%- endmacro -%} - + {%- macro checkbox_onoff(name, checked) -%} - -{%- endmacro -%} - -{%- macro checkbox(name, checked, disabled) -%} -{%- if checked == '?' -%} - {{- icon_small('warning') -}} -{%- else -%} - -{%- endif -%} + {%- endmacro -%} diff --git a/searx/templates/simple/page_with_header.html b/searx/templates/simple/page_with_header.html index d4466b612..719553a38 100644 --- a/searx/templates/simple/page_with_header.html +++ b/searx/templates/simple/page_with_header.html @@ -1,5 +1,7 @@ -{% set body_class = "page_with_header" %} -{% extends "simple/base.html" %} -{% block header %} - -{% endblock %} +{%- set body_class = "page_with_header" -%} +{%- extends "simple/base.html" -%} +{%- block header -%} + {{- '' -}} + {{- '' -}} + {{- '' -}} +{%- endblock -%} diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index 3210a36b0..8bc89a118 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -1,7 +1,40 @@ -{% from 'simple/macros.html' import tabs_open, tabs_close, tab_header, tab_footer, checkbox_onoff, checkbox %} -{% from 'simple/icons.html' import icon_big %} +{%- from 'simple/icons.html' import icon_big -%} +{%- extends "simple/page_with_header.html" -%} -{% extends "simple/page_with_header.html" %} +{%- macro tabs_open() -%} +
+{%- endmacro -%} + +{%- macro tab_header(name, id, label, checked) -%} + + +
+{%- endmacro -%} + +{%- macro tab_footer() -%} +
+{%- endmacro -%} + +{%- macro tabs_close() -%} +
+{%- endmacro -%} + +{%- macro checkbox(name, checked, disabled) -%} + {%- if checked == '?' -%} + {{- icon_small('warning') -}} + {%- else -%} + + {%- endif -%} +{%- endmacro -%} + +{%- macro checkbox_onoff_reversed(name, checked) -%} + +{%- endmacro -%} {%- macro plugin_preferences(section) -%} {%- for plugin in plugins -%} @@ -9,7 +42,7 @@
{{- '' -}} {{ _(plugin.name) }}{{- '' -}}
- {{- checkbox_onoff('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}} + {{- checkbox_onoff_reversed('plugin_' + plugin.id, plugin.id not in allowed_plugins) -}}
{{- '' -}}
{{- _(plugin.description) -}} @@ -19,427 +52,190 @@ {%- endfor -%} {%- endmacro -%} -{% macro engine_about(search_engine) -%} -{% if search_engine.about is defined %} -{% set about = search_engine.about %} - {%- endif -%} -{%- endmacro %} +{%- endmacro -%} {%- macro engine_time(engine_name) -%} -{{- "" -}} + {{- '' -}} {%- if stats[engine_name].time != None -%} - {{- stats[engine_name].time -}}{{- "" -}} + {{- stats[engine_name].time -}}{{- '' -}} {{- "" -}} -