Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[mod] rename "default" theme to "legacy"

Adam Tauberbee7b497a300
diff --git a/manage.sh b/manage.sh
index 75ba32024..11f2df04d 100755
--- a/manage.sh
+++ b/manage.sh
@@ -53,8 +53,8 @@ build_style() {
styles() {
echo '[!] Building styles'
- build_style themes/default/less/style.less themes/default/css/style.css
- build_style themes/default/less/style-rtl.less themes/default/css/style-rtl.css
+ build_style themes/legacy/less/style.less themes/legacy/css/style.css
+ build_style themes/legacy/less/style-rtl.less themes/legacy/css/style-rtl.css
build_style themes/courgette/less/style.less themes/courgette/css/style.css
build_style themes/courgette/less/style-rtl.less themes/courgette/css/style-rtl.css
build_style less/bootstrap/bootstrap.less css/bootstrap.min.css
diff --git a/searx/settings_robot.yml b/searx/settings_robot.yml
index 7c7c4eec2..1ae084155 100644
--- a/searx/settings_robot.yml
+++ b/searx/settings_robot.yml
@@ -15,7 +15,7 @@ server:
ui:
themes_path : ""
- default_theme : default
+ default_theme : legacy
default_locale : ""
outgoing:
diff --git a/searx/static/themes/default/css/style-rtl.css b/searx/static/themes/legacy/css/style-rtl.css
similarity index 100%
rename from searx/static/themes/default/css/style-rtl.css
rename to searx/static/themes/legacy/css/style-rtl.css
diff --git a/searx/static/themes/default/css/style.css b/searx/static/themes/legacy/css/style.css
similarity index 100%
rename from searx/static/themes/default/css/style.css
rename to searx/static/themes/legacy/css/style.css
diff --git a/searx/static/themes/default/img/favicon.png b/searx/static/themes/legacy/img/favicon.png
similarity index 100%
rename from searx/static/themes/default/img/favicon.png
rename to searx/static/themes/legacy/img/favicon.png
diff --git a/searx/static/themes/default/img/github_ribbon.png b/searx/static/themes/legacy/img/github_ribbon.png
similarity index 100%
rename from searx/static/themes/default/img/github_ribbon.png
rename to searx/static/themes/legacy/img/github_ribbon.png
diff --git a/searx/static/themes/default/img/icons/icon_500px.ico b/searx/static/themes/legacy/img/icons/icon_500px.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_500px.ico
rename to searx/static/themes/legacy/img/icons/icon_500px.ico
diff --git a/searx/static/themes/default/img/icons/icon_bing.ico b/searx/static/themes/legacy/img/icons/icon_bing.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_bing.ico
rename to searx/static/themes/legacy/img/icons/icon_bing.ico
diff --git a/searx/static/themes/default/img/icons/icon_dailymotion.ico b/searx/static/themes/legacy/img/icons/icon_dailymotion.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_dailymotion.ico
rename to searx/static/themes/legacy/img/icons/icon_dailymotion.ico
diff --git a/searx/static/themes/default/img/icons/icon_deezer.ico b/searx/static/themes/legacy/img/icons/icon_deezer.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_deezer.ico
rename to searx/static/themes/legacy/img/icons/icon_deezer.ico
diff --git a/searx/static/themes/default/img/icons/icon_deviantart.ico b/searx/static/themes/legacy/img/icons/icon_deviantart.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_deviantart.ico
rename to searx/static/themes/legacy/img/icons/icon_deviantart.ico
diff --git a/searx/static/themes/default/img/icons/icon_digg.ico b/searx/static/themes/legacy/img/icons/icon_digg.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_digg.ico
rename to searx/static/themes/legacy/img/icons/icon_digg.ico
diff --git a/searx/static/themes/default/img/icons/icon_duckduckgo.ico b/searx/static/themes/legacy/img/icons/icon_duckduckgo.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_duckduckgo.ico
rename to searx/static/themes/legacy/img/icons/icon_duckduckgo.ico
diff --git a/searx/static/themes/default/img/icons/icon_flickr.ico b/searx/static/themes/legacy/img/icons/icon_flickr.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_flickr.ico
rename to searx/static/themes/legacy/img/icons/icon_flickr.ico
diff --git a/searx/static/themes/default/img/icons/icon_github.ico b/searx/static/themes/legacy/img/icons/icon_github.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_github.ico
rename to searx/static/themes/legacy/img/icons/icon_github.ico
diff --git a/searx/static/themes/default/img/icons/icon_google play apps.ico b/searx/static/themes/legacy/img/icons/icon_google play apps.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_google play apps.ico
rename to searx/static/themes/legacy/img/icons/icon_google play apps.ico
diff --git a/searx/static/themes/default/img/icons/icon_google play movies.ico b/searx/static/themes/legacy/img/icons/icon_google play movies.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_google play movies.ico
rename to searx/static/themes/legacy/img/icons/icon_google play movies.ico
diff --git a/searx/static/themes/default/img/icons/icon_google play music.ico b/searx/static/themes/legacy/img/icons/icon_google play music.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_google play music.ico
rename to searx/static/themes/legacy/img/icons/icon_google play music.ico
diff --git a/searx/static/themes/default/img/icons/icon_google.ico b/searx/static/themes/legacy/img/icons/icon_google.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_google.ico
rename to searx/static/themes/legacy/img/icons/icon_google.ico
diff --git a/searx/static/themes/default/img/icons/icon_kickass.ico b/searx/static/themes/legacy/img/icons/icon_kickass.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_kickass.ico
rename to searx/static/themes/legacy/img/icons/icon_kickass.ico
diff --git a/searx/static/themes/default/img/icons/icon_openstreetmap.ico b/searx/static/themes/legacy/img/icons/icon_openstreetmap.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_openstreetmap.ico
rename to searx/static/themes/legacy/img/icons/icon_openstreetmap.ico
diff --git a/searx/static/themes/default/img/icons/icon_searchcode code.ico b/searx/static/themes/legacy/img/icons/icon_searchcode code.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_searchcode code.ico
rename to searx/static/themes/legacy/img/icons/icon_searchcode code.ico
diff --git a/searx/static/themes/default/img/icons/icon_searchcode doc.ico b/searx/static/themes/legacy/img/icons/icon_searchcode doc.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_searchcode doc.ico
rename to searx/static/themes/legacy/img/icons/icon_searchcode doc.ico
diff --git a/searx/static/themes/default/img/icons/icon_searchcode.ico b/searx/static/themes/legacy/img/icons/icon_searchcode.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_searchcode.ico
rename to searx/static/themes/legacy/img/icons/icon_searchcode.ico
diff --git a/searx/static/themes/default/img/icons/icon_soundcloud.ico b/searx/static/themes/legacy/img/icons/icon_soundcloud.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_soundcloud.ico
rename to searx/static/themes/legacy/img/icons/icon_soundcloud.ico
diff --git a/searx/static/themes/default/img/icons/icon_stackoverflow.ico b/searx/static/themes/legacy/img/icons/icon_stackoverflow.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_stackoverflow.ico
rename to searx/static/themes/legacy/img/icons/icon_stackoverflow.ico
diff --git a/searx/static/themes/default/img/icons/icon_startpage.ico b/searx/static/themes/legacy/img/icons/icon_startpage.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_startpage.ico
rename to searx/static/themes/legacy/img/icons/icon_startpage.ico
diff --git a/searx/static/themes/default/img/icons/icon_subtitleseeker.ico b/searx/static/themes/legacy/img/icons/icon_subtitleseeker.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_subtitleseeker.ico
rename to searx/static/themes/legacy/img/icons/icon_subtitleseeker.ico
diff --git a/searx/static/themes/default/img/icons/icon_twitter.ico b/searx/static/themes/legacy/img/icons/icon_twitter.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_twitter.ico
rename to searx/static/themes/legacy/img/icons/icon_twitter.ico
diff --git a/searx/static/themes/default/img/icons/icon_vimeo.ico b/searx/static/themes/legacy/img/icons/icon_vimeo.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_vimeo.ico
rename to searx/static/themes/legacy/img/icons/icon_vimeo.ico
diff --git a/searx/static/themes/default/img/icons/icon_wikipedia.ico b/searx/static/themes/legacy/img/icons/icon_wikipedia.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_wikipedia.ico
rename to searx/static/themes/legacy/img/icons/icon_wikipedia.ico
diff --git a/searx/static/themes/default/img/icons/icon_yahoo.ico b/searx/static/themes/legacy/img/icons/icon_yahoo.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_yahoo.ico
rename to searx/static/themes/legacy/img/icons/icon_yahoo.ico
diff --git a/searx/static/themes/default/img/icons/icon_youtube.ico b/searx/static/themes/legacy/img/icons/icon_youtube.ico
similarity index 100%
rename from searx/static/themes/default/img/icons/icon_youtube.ico
rename to searx/static/themes/legacy/img/icons/icon_youtube.ico
diff --git a/searx/static/themes/default/img/preference-icon.png b/searx/static/themes/legacy/img/preference-icon.png
similarity index 100%
rename from searx/static/themes/default/img/preference-icon.png
rename to searx/static/themes/legacy/img/preference-icon.png
diff --git a/searx/static/themes/default/img/search-icon.png b/searx/static/themes/legacy/img/search-icon.png
similarity index 100%
rename from searx/static/themes/default/img/search-icon.png
rename to searx/static/themes/legacy/img/search-icon.png
diff --git a/searx/static/themes/default/img/searx.png b/searx/static/themes/legacy/img/searx.png
similarity index 100%
rename from searx/static/themes/default/img/searx.png
rename to searx/static/themes/legacy/img/searx.png
diff --git a/searx/static/themes/default/img/searx_logo.svg b/searx/static/themes/legacy/img/searx_logo.svg
similarity index 100%
rename from searx/static/themes/default/img/searx_logo.svg
rename to searx/static/themes/legacy/img/searx_logo.svg
diff --git a/searx/static/themes/default/js/searx.js b/searx/static/themes/legacy/js/searx.js
similarity index 100%
rename from searx/static/themes/default/js/searx.js
rename to searx/static/themes/legacy/js/searx.js
diff --git a/searx/static/themes/default/less/autocompleter.less b/searx/static/themes/legacy/less/autocompleter.less
similarity index 100%
rename from searx/static/themes/default/less/autocompleter.less
rename to searx/static/themes/legacy/less/autocompleter.less
diff --git a/searx/static/themes/default/less/code.less b/searx/static/themes/legacy/less/code.less
similarity index 100%
rename from searx/static/themes/default/less/code.less
rename to searx/static/themes/legacy/less/code.less
diff --git a/searx/static/themes/default/less/definitions.less b/searx/static/themes/legacy/less/definitions.less
similarity index 100%
rename from searx/static/themes/default/less/definitions.less
rename to searx/static/themes/legacy/less/definitions.less
diff --git a/searx/static/themes/default/less/mixins.less b/searx/static/themes/legacy/less/mixins.less
similarity index 100%
rename from searx/static/themes/default/less/mixins.less
rename to searx/static/themes/legacy/less/mixins.less
diff --git a/searx/static/themes/default/less/search.less b/searx/static/themes/legacy/less/search.less
similarity index 100%
rename from searx/static/themes/default/less/search.less
rename to searx/static/themes/legacy/less/search.less
diff --git a/searx/static/themes/default/less/style-rtl.less b/searx/static/themes/legacy/less/style-rtl.less
similarity index 100%
rename from searx/static/themes/default/less/style-rtl.less
rename to searx/static/themes/legacy/less/style-rtl.less
diff --git a/searx/static/themes/default/less/style.less b/searx/static/themes/legacy/less/style.less
similarity index 100%
rename from searx/static/themes/default/less/style.less
rename to searx/static/themes/legacy/less/style.less
diff --git a/searx/templates/default/404.html b/searx/templates/legacy/404.html
similarity index 89%
rename from searx/templates/default/404.html
rename to searx/templates/legacy/404.html
index 1d88f86c4..05c14e155 100644
--- a/searx/templates/default/404.html
+++ b/searx/templates/legacy/404.html
@@ -1,4 +1,4 @@
-{% extends "default/base.html" %}
+{% extends "legacy/base.html" %}
{% block content %}
<div class="center">
<h1>{{ _('Page not found') }}</h1>
diff --git a/searx/templates/default/about.html b/searx/templates/legacy/about.html
similarity index 97%
rename from searx/templates/default/about.html
rename to searx/templates/legacy/about.html
index f21a6f296..45fb0e449 100644
--- a/searx/templates/default/about.html
+++ b/searx/templates/legacy/about.html
@@ -1,6 +1,6 @@
-{% extends 'default/base.html' %}
+{% extends 'legacy/base.html' %}
{% block content %}
-{% include 'default/github_ribbon.html' %}
+{% include 'legacy/github_ribbon.html' %}
<div class="row"{% if rtl %} dir="ltr"{% endif %}>
<h1>About <a href="{{ url_for('index') }}">searx</a></h1>
diff --git a/searx/templates/default/base.html b/searx/templates/legacy/base.html
similarity index 100%
rename from searx/templates/default/base.html
rename to searx/templates/legacy/base.html
diff --git a/searx/templates/default/categories.html b/searx/templates/legacy/categories.html
similarity index 100%
rename from searx/templates/default/categories.html
rename to searx/templates/legacy/categories.html
diff --git a/searx/templates/default/github_ribbon.html b/searx/templates/legacy/github_ribbon.html
similarity index 100%
rename from searx/templates/default/github_ribbon.html
rename to searx/templates/legacy/github_ribbon.html
diff --git a/searx/templates/default/index.html b/searx/templates/legacy/index.html
similarity index 80%
rename from searx/templates/default/index.html
rename to searx/templates/legacy/index.html
index fc15a44b6..de956d5b3 100644
--- a/searx/templates/default/index.html
+++ b/searx/templates/legacy/index.html
@@ -1,8 +1,8 @@
-{% extends "default/base.html" %}
+{% extends "legacy/base.html" %}
{% block content %}
<div class="center">
<div class="title"><h1>searx</h1></div>
- {% include 'default/search.html' %}
+ {% include 'legacy/search.html' %}
<p class="top_margin">
{% if rtl %}
<a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a>
@@ -13,6 +13,6 @@
{% endif %}
</p>
</div>
-{% include 'default/github_ribbon.html' %}
+{% include 'legacy/github_ribbon.html' %}
{% endblock %}
diff --git a/searx/templates/default/infobox.html b/searx/templates/legacy/infobox.html
similarity index 100%
rename from searx/templates/default/infobox.html
rename to searx/templates/legacy/infobox.html
diff --git a/searx/templates/default/opensearch.xml b/searx/templates/legacy/opensearch.xml
similarity index 100%
rename from searx/templates/default/opensearch.xml
rename to searx/templates/legacy/opensearch.xml
diff --git a/searx/templates/default/opensearch_response_rss.xml b/searx/templates/legacy/opensearch_response_rss.xml
similarity index 100%
rename from searx/templates/default/opensearch_response_rss.xml
rename to searx/templates/legacy/opensearch_response_rss.xml
diff --git a/searx/templates/default/preferences.html b/searx/templates/legacy/preferences.html
similarity index 98%
rename from searx/templates/default/preferences.html
rename to searx/templates/legacy/preferences.html
index 1de9d2275..30d632c93 100644
--- a/searx/templates/default/preferences.html
+++ b/searx/templates/legacy/preferences.html
@@ -1,4 +1,4 @@
-{% extends "default/base.html" %}
+{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<div class="row">
@@ -8,7 +8,7 @@
<fieldset>
<legend>{{ _('Default categories') }}</legend>
{% set display_tooltip = false %}
- {% include 'default/categories.html' %}
+ {% include 'legacy/categories.html' %}
</fieldset>
<fieldset>
<legend>{{ _('Search language') }}</legend>
diff --git a/searx/templates/default/result_templates/code.html b/searx/templates/legacy/result_templates/code.html
similarity index 100%
rename from searx/templates/default/result_templates/code.html
rename to searx/templates/legacy/result_templates/code.html
diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/legacy/result_templates/default.html
similarity index 100%
rename from searx/templates/default/result_templates/default.html
rename to searx/templates/legacy/result_templates/default.html
diff --git a/searx/templates/default/result_templates/images.html b/searx/templates/legacy/result_templates/images.html
similarity index 100%
rename from searx/templates/default/result_templates/images.html
rename to searx/templates/legacy/result_templates/images.html
diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/legacy/result_templates/map.html
similarity index 100%
rename from searx/templates/default/result_templates/map.html
rename to searx/templates/legacy/result_templates/map.html
diff --git a/searx/templates/default/result_templates/torrent.html b/searx/templates/legacy/result_templates/torrent.html
similarity index 100%
rename from searx/templates/default/result_templates/torrent.html
rename to searx/templates/legacy/result_templates/torrent.html
diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/legacy/result_templates/videos.html
similarity index 100%
rename from searx/templates/default/result_templates/videos.html
rename to searx/templates/legacy/result_templates/videos.html
diff --git a/searx/templates/default/results.html b/searx/templates/legacy/results.html
similarity index 93%
rename from searx/templates/default/results.html
rename to searx/templates/legacy/results.html
index 927b7b8a8..f50700c6f 100644
--- a/searx/templates/default/results.html
+++ b/searx/templates/legacy/results.html
@@ -1,10 +1,10 @@
-{% extends "default/base.html" %}
+{% extends "legacy/base.html" %}
{% block title %}{{ q }} - {% endblock %}
{% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;format=rss&amp;{% for category in selected_categories %}category_{{ category }}=1&amp;{% endfor %}pageno={{ pageno }}">{% endblock %}
{% block content %}
<div class="preferences_container right"><a href="{{ url_for('preferences') }}" id="preferences"><span>preferences</span></a></div>
<div class="small search center">
- {% include 'default/search.html' %}
+ {% include 'legacy/search.html' %}
</div>
<div id="results">
<div id="sidebar">
@@ -55,16 +55,16 @@
{% if infoboxes %}
<div id="infoboxes">
{% for infobox in infoboxes %}
- {% include 'default/infobox.html' %}
+ {% include 'legacy/infobox.html' %}
{% endfor %}
</div>
{% endif %}
{% for result in results %}
{% if result['template'] %}
- {% include get_result_template('default', result['template']) %}
+ {% include get_result_template('legacy', result['template']) %}
{% else %}
- {% include 'default/result_templates/default.html' %}
+ {% include 'legacy/result_templates/default.html' %}
{% endif %}
{% endfor %}
diff --git a/searx/templates/default/search.html b/searx/templates/legacy/search.html
similarity index 90%
rename from searx/templates/default/search.html
rename to searx/templates/legacy/search.html
index 5a049a492..4d37f9ba1 100644
--- a/searx/templates/default/search.html
+++ b/searx/templates/legacy/search.html
@@ -4,5 +4,5 @@
<input type="submit" value="search" id="search_submit" />
</div>
{% set display_tooltip = true %}
- {% include 'default/categories.html' %}
+ {% include 'legacy/categories.html' %}
</form>
diff --git a/searx/templates/default/stats.html b/searx/templates/legacy/stats.html
similarity index 94%
rename from searx/templates/default/stats.html
rename to searx/templates/legacy/stats.html
index 70fe98ac7..372447e23 100644
--- a/searx/templates/default/stats.html
+++ b/searx/templates/legacy/stats.html
@@ -1,4 +1,4 @@
-{% extends "default/base.html" %}
+{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<h2>{{ _('Engine stats') }}</h2>
diff --git a/searx/templates/pix-art/preferences.html b/searx/templates/pix-art/preferences.html
index a4a6cd268..ea5557b07 100644
--- a/searx/templates/pix-art/preferences.html
+++ b/searx/templates/pix-art/preferences.html
@@ -1,4 +1,4 @@
-{% extends "default/base.html" %}
+{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<div class="row">
diff --git a/searx/templates/pix-art/stats.html b/searx/templates/pix-art/stats.html
index 70fe98ac7..372447e23 100644
--- a/searx/templates/pix-art/stats.html
+++ b/searx/templates/pix-art/stats.html
@@ -1,4 +1,4 @@
-{% extends "default/base.html" %}
+{% extends "legacy/base.html" %}
{% block head %} {% endblock %}
{% block content %}
<h2>{{ _('Engine stats') }}</h2>
diff --git a/tests/robot/test_basic.robot b/tests/robot/test_basic.robot
index a455eeaa0..540060fef 100644
--- a/tests/robot/test_basic.robot
+++ b/tests/robot/test_basic.robot
@@ -67,7 +67,7 @@ Change theme
Page Should Contain about
Page Should Contain preferences
Go To http://localhost:11111/preferences
- List Selection Should Be theme default
+ List Selection Should Be theme legacy
Select From List theme oscar
Submit Form id=search_form
Location Should Be http://localhost:11111/
@@ -139,7 +139,7 @@ Block a plugin
Page Should Contain about
Page Should Contain preferences
Go To http://localhost:11111/preferences
- List Selection Should Be theme default
+ List Selection Should Be theme legacy
Select From List theme oscar
Submit Form id=search_form
Location Should Be http://localhost:11111/
diff --git a/tests/unit/test_webapp.py b/tests/unit/test_webapp.py
index 1762d66b6..912bebc4d 100644
--- a/tests/unit/test_webapp.py
+++ b/tests/unit/test_webapp.py
@@ -44,7 +44,7 @@ class ViewsTestCase(SearxTestCase):
webapp.Search.search = search_mock
def get_current_theme_name_mock(override=None):
- return 'default'
+ return 'legacy'
webapp.get_current_theme_name = get_current_theme_name_mock
@@ -58,7 +58,7 @@ class ViewsTestCase(SearxTestCase):
def test_index_html(self):
result = self.app.post('/', data={'q': 'test'})
self.assertIn(
- '<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/default/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz" rel="noreferrer">Second <span class="highlight">Test</span></a></h3>', # noqa
+ '<h3 class="result_title"><img width="14" height="14" class="favicon" src="/static/themes/legacy/img/icons/icon_youtube.ico" alt="youtube" /><a href="http://second.test.xyz" rel="noreferrer">Second <span class="highlight">Test</span></a></h3>', # noqa
result.data
)
self.assertIn(