diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0265e11fb..d99ba9156 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,13 +8,6 @@ updates: day: "friday" open-pull-requests-limit: 5 target-branch: "master" - - package-ecosystem: "npm" - directory: "/searx/static/themes/oscar" - schedule: - interval: "weekly" - day: "friday" - open-pull-requests-limit: 5 - target-branch: "master" - package-ecosystem: "npm" directory: "/searx/static/themes/simple" schedule: diff --git a/Makefile b/Makefile index 1e75f7bee..fe28e0f47 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ MANAGE += pyenv pyenv.install pyenv.uninstall MANAGE += pypi.upload pypi.upload.test MANAGE += format.python MANAGE += test.yamllint test.pylint test.pyright test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean -MANAGE += themes.all themes.oscar themes.simple themes.simple.test pygments.less +MANAGE += themes.all themes.simple themes.simple.test pygments.less MANAGE += static.build.commit static.build.drop static.build.restore MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs diff --git a/docs/admin/api.rst b/docs/admin/api.rst index 21d1a8626..7bf465404 100644 --- a/docs/admin/api.rst +++ b/docs/admin/api.rst @@ -24,7 +24,7 @@ Sample response "images", ], "default_locale": "", - "default_theme": "oscar", + "default_theme": "simple", "engines": [ { "categories": [ diff --git a/docs/admin/engines/nosql-engines.rst b/docs/admin/engines/nosql-engines.rst index 36a7c6713..a50b9c367 100644 --- a/docs/admin/engines/nosql-engines.rst +++ b/docs/admin/engines/nosql-engines.rst @@ -18,9 +18,8 @@ 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:`oscar ` & -:origin:`simple ` -themes. If you are not satisfied with the original result layout, you can use +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:: diff --git a/docs/admin/engines/sql-engines.rst b/docs/admin/engines/sql-engines.rst index 147087786..d91383214 100644 --- a/docs/admin/engines/sql-engines.rst +++ b/docs/admin/engines/sql-engines.rst @@ -30,9 +30,8 @@ engines, e.g. ``database:`` ... query_str: ... By default, the engines use the ``key-value`` template for displaying results / -see :origin:`oscar ` & -:origin:`simple ` -themes. If you are not satisfied with the original result layout, you can use +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:: diff --git a/docs/dev/search_api.rst b/docs/dev/search_api.rst index ce7237677..761c96303 100644 --- a/docs/dev/search_api.rst +++ b/docs/dev/search_api.rst @@ -75,8 +75,8 @@ 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 ``oscar`` - [ ``oscar``, ``simple`` ] +``theme`` : default ``simple`` + [ ``simple`` ] Theme of instance. @@ -84,16 +84,6 @@ Parameters instance administrator deleted, created or renamed themes on their instance. See the available options in the preferences page of the instance. -``oscar-style`` : default ``logicodev`` - [ ``pointhi``, ``logicodev`` ] - - Style of Oscar theme. It is only parsed if the theme of an instance is - ``oscar``. - - Please note, available styles depend on an instance. It is possible that an - instance administrator deleted, created or renamed styles on their - instance. See the available options in the preferences page of the instance. - ``enabled_plugins`` : optional List of enabled plugins. diff --git a/manage b/manage index 79ee6a7a9..9428e8381 100755 --- a/manage +++ b/manage @@ -115,7 +115,6 @@ test.: clean : clean intermediate test stuff themes.: all : build all themes - oscar : build oscar theme simple : build simple theme pygments.: less : build LESS files for pygments @@ -554,9 +553,6 @@ node.env() { nodejs.ensure ( set -e - build_msg INSTALL "searx/static/themes/oscar/package.json" - npm --prefix searx/static/themes/oscar install - build_msg INSTALL "searx/static/themes/simple/package.json" npm --prefix searx/static/themes/simple install ) @@ -576,7 +572,6 @@ node.clean() { fi build_msg CLEAN "themes -- locally installed npm dependencies" ( set -e - npm --prefix searx/static/themes/oscar run clean npm --prefix searx/static/themes/simple run clean ) dump_return $? @@ -762,7 +757,6 @@ themes.all() { ( set -e pygments.less node.env - themes.oscar themes.simple ) dump_return $? @@ -771,14 +765,14 @@ themes.all() { themes.live() { local LIVE_THEME="${LIVE_THEME:-${1}}" case "${LIVE_THEME}" in - simple|oscar) + simple) theme="searx/static/themes/${LIVE_THEME}" ;; '') die_caller 42 "missing theme argument" ;; *) - die_caller 42 "unknown theme '${LIVE_THEME}' // [simple|oscar]'" + die_caller 42 "unknown theme '${LIVE_THEME}' // [simple]'" ;; esac build_msg GRUNT "theme: $1 (live build)" @@ -792,12 +786,6 @@ themes.live() { | grep -E --ignore-case --color 'error[s]?[:]? |warning[s]?[:]? |' } -themes.oscar() { - build_msg GRUNT "theme: oscar" - npm --prefix searx/static/themes/oscar run build - dump_return $? -} - themes.simple() { ( set -e build_msg GRUNT "theme: simple" diff --git a/searx/preferences.py b/searx/preferences.py index e493dadc0..cd943af66 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -362,11 +362,6 @@ class Preferences: locked=is_locked('doi_resolver'), choices=DOI_RESOLVERS ), - 'oscar-style': EnumStringSetting( - settings['ui']['theme_args']['oscar_style'], - locked=is_locked('oscar-style'), - choices=['', 'logicodev', 'logicodev-dark', 'pointhi'] - ), 'simple_style': EnumStringSetting( settings['ui']['theme_args']['simple_style'], locked=is_locked('simple_style'), diff --git a/searx/settings.yml b/searx/settings.yml index c476b1321..6e5556d0c 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -86,8 +86,6 @@ ui: # Open result links in a new tab by default # results_on_new_tab: false theme_args: - # default style of oscar - oscar_style: logicodev # style of simple theme: auto, light, dark simple_style: auto diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index e3efb8544..7110fce93 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -18,7 +18,6 @@ searx_dir = abspath(dirname(__file__)) logger = logging.getLogger('searx') OUTPUT_FORMATS = ['html', 'csv', 'json', 'rss'] LANGUAGE_CODES = ['all'] + list(l[0] for l in languages) -OSCAR_STYLE = ('logicodev', 'logicodev-dark', 'pointhi') SIMPLE_STYLE = ('auto', 'light', 'dark') CATEGORIES_AS_TABS = { 'general': {}, @@ -181,7 +180,6 @@ SCHEMA = { 'default_theme': SettingsValue(str, 'simple'), 'default_locale': SettingsValue(str, ''), 'theme_args': { - 'oscar_style': SettingsValue(OSCAR_STYLE, 'logicodev'), 'simple_style': SettingsValue(SIMPLE_STYLE, 'auto'), }, 'results_on_new_tab': SettingsValue(bool, False), diff --git a/searx/templates/oscar/messages/no_cookies.html b/searx/templates/simple/messages/no_cookies.html similarity index 82% rename from searx/templates/oscar/messages/no_cookies.html rename to searx/templates/simple/messages/no_cookies.html index 9bebc8ad1..a9898b4e3 100644 --- a/searx/templates/oscar/messages/no_cookies.html +++ b/searx/templates/simple/messages/no_cookies.html @@ -1,4 +1,4 @@ -{% from 'oscar/macros.html' import icon %} +{% from 'simple/icons.html' import icon %}