diff --git a/docs/admin/api.rst b/docs/admin/api.rst index 7bf46540456..0a42a95de25 100644 --- a/docs/admin/api.rst +++ b/docs/admin/api.rst @@ -24,7 +24,6 @@ Sample response "images", ], "default_locale": "", - "default_theme": "simple", "engines": [ { "categories": [ diff --git a/docs/admin/engines/nosql-engines.rst b/docs/admin/engines/nosql-engines.rst index a50b9c36718..fcf5a4cd026 100644 --- a/docs/admin/engines/nosql-engines.rst +++ b/docs/admin/engines/nosql-engines.rst @@ -18,12 +18,12 @@ All of the engines above are just commented out in the :origin:`settings.yml dependencies before using them. By default, the engines use the ``key-value`` template for displaying results / -see :origin:`simple ` -theme. If you are not satisfied with the original result layout, you can use -your own template, set ``result_template`` attribute to ``{template_name}`` and -place the templates at:: +see :origin:`simple `. +If you are not satisfied with the original result layout, you can use your own +template, set ``result_template`` attribute to ``{template_name}`` and place +the templates at:: - searx/templates/{theme_name}/result_templates/{template_name} + searx/templates/result_templates/{template_name} Futhermore, if you do not wish to expose these engines on a public instance, you can still add them and limit the access by setting ``tokens`` as described in diff --git a/docs/admin/engines/settings.rst b/docs/admin/engines/settings.rst index 71ad29b43d3..5558583462f 100644 --- a/docs/admin/engines/settings.rst +++ b/docs/admin/engines/settings.rst @@ -232,7 +232,6 @@ Global Settings query_in_title: false infinite_scroll: false center_alignment: false - default_theme: simple theme_args: simple_style: auto @@ -254,9 +253,6 @@ Global Settings side of the screen. This setting only affects the *desktop layout* (:origin:`min-width: @tablet `) -``default_theme`` : - Name of the theme you want to use by default on your SearXNG instance. - ``theme_args.simple_style``: Style of simple theme: ``auto``, ``light``, ``dark`` diff --git a/docs/admin/engines/sql-engines.rst b/docs/admin/engines/sql-engines.rst index d91383214f2..040fa1d9936 100644 --- a/docs/admin/engines/sql-engines.rst +++ b/docs/admin/engines/sql-engines.rst @@ -30,12 +30,12 @@ engines, e.g. ``database:`` ... query_str: ... By default, the engines use the ``key-value`` template for displaying results / -see :origin:`simple ` -theme. If you are not satisfied with the original result layout, you can use +see :origin:`simple `. +If you are not satisfied with the original result layout, you can use your own template, set ``result_template`` attribute to ``{template_name}`` and place the templates at:: - searx/templates/{theme_name}/result_templates/{template_name} + searx/templates/result_templates/{template_name} If you do not wish to expose these engines on a public instance, you can still add them and limit the access by setting ``tokens`` as described in section diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst index db52a2d801d..66a10df4291 100644 --- a/docs/dev/quickstart.rst +++ b/docs/dev/quickstart.rst @@ -25,7 +25,7 @@ choose a meaningful commit message and we are happy to receive your pull request. To not end in *wild west* we have some directives, please pay attention to our ":ref:`how to contribute`" guideline. -If you implement themes, you will need to setup a :ref:`make node.env` once: +If you implement theme, you will need to setup a :ref:`make node.env` once: .. code:: sh diff --git a/docs/dev/search_api.rst b/docs/dev/search_api.rst index 761c963037e..ca697cf55f1 100644 --- a/docs/dev/search_api.rst +++ b/docs/dev/search_api.rst @@ -75,15 +75,6 @@ Parameters Filter search results of engines which support safe search. See if an engine supports safe search in the preferences page of an instance. -``theme`` : default ``simple`` - [ ``simple`` ] - - Theme of instance. - - Please note, available themes depend on an instance. It is possible that an - instance administrator deleted, created or renamed themes on their instance. - See the available options in the preferences page of the instance. - ``enabled_plugins`` : optional List of enabled plugins. diff --git a/searx/preferences.py b/searx/preferences.py index fdb4f50081c..0676f2e0661 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -290,7 +290,7 @@ def transform_form_items(self, items): class Preferences: """Validates and saves preferences to cookies""" - def __init__(self, themes: List[str], categories: List[str], engines: Dict[str, Engine], plugins: Iterable[Plugin]): + def __init__(self, categories: List[str], engines: Dict[str, Engine], plugins: Iterable[Plugin]): super().__init__() self.key_value_settings: Dict[str, Setting] = { @@ -340,11 +340,6 @@ def __init__(self, themes: List[str], categories: List[str], engines: Dict[str, '2': 2 } ), - 'theme': EnumStringSetting( - settings['ui']['default_theme'], - locked=is_locked('theme'), - choices=themes - ), 'results_on_new_tab': MapSetting( settings['ui']['results_on_new_tab'], locked=is_locked('results_on_new_tab'), diff --git a/searx/settings.yml b/searx/settings.yml index 63d6be3cdda..adbe8346039 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -91,8 +91,6 @@ ui: query_in_title: false # infinite_scroll: When true, automatically loads the next page when scrolling to bottom of the current page. infinite_scroll: false - # ui theme - default_theme: simple # center the results ? center_alignment: false # Default interface locale - leave blank to detect from browser information or diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index 3185dd7bd32..7916aba940f 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -180,7 +180,6 @@ def apply_schema(settings, schema, path_list): 'static_path': SettingsDirectoryValue(str, os.path.join(searx_dir, 'static')), 'static_use_hash': SettingsValue(bool, False), 'templates_path': SettingsDirectoryValue(str, os.path.join(searx_dir, 'templates')), - 'default_theme': SettingsValue(str, 'simple'), 'default_locale': SettingsValue(str, ''), 'theme_args': { 'simple_style': SettingsValue(SIMPLE_STYLE, 'auto'), diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index 630cac212bb..257bc7642c2 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -145,7 +145,7 @@ module.exports = function (grunt) { svgo: ['--config', 'svg4web.svgo.js'] }, files: { - '<%= _templates %>/simple/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg', + '<%= _templates %>/searxng-wordmark.min.svg': '<%= _brand %>/searxng-wordmark.svg', 'img/searxng.svg': '<%= _brand %>/searxng.svg', 'img/img_load_error.svg': '<%= _brand %>/img_load_error.svg' } @@ -192,7 +192,7 @@ module.exports = function (grunt) { 'heart-outline': 'node_modules/ionicons/dist/svg/heart-outline.svg', 'information-circle-outline': 'src/svg/information-circle-outline.svg', }, - dest: '../../../templates/simple/icons.html', + dest: '../../../templates/icons.html', }, }, }); diff --git a/searx/templates/simple/404.html b/searx/templates/404.html similarity index 89% rename from searx/templates/simple/404.html rename to searx/templates/404.html index 1a10514cc3b..0405b9bbf09 100644 --- a/searx/templates/simple/404.html +++ b/searx/templates/404.html @@ -1,4 +1,4 @@ -{% extends "simple/base.html" %} +{% extends "base.html" %} {% block content %}

{{ _('Page not found') }}

diff --git a/searx/templates/simple/base.html b/searx/templates/base.html similarity index 97% rename from searx/templates/simple/base.html rename to searx/templates/base.html index a2464a1a55a..55a3f842b9a 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/base.html @@ -28,7 +28,7 @@ -
+
{% if errors %}