From e7788980ad1bb82e9ae084428d05a79b235c17ff Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 12 May 2020 14:17:47 +0200 Subject: [PATCH 01/32] [fix] about page- 'How to set as the default search engine?' Searx supports OpenSearch, remove the inline JS from the about page. close: https://github.com/asciimoo/searx/issues/1949 close: https://github.com/asciimoo/searx/issues/1616 Signed-off-by: Markus Heiser --- searx/templates/__common__/about.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/searx/templates/__common__/about.html b/searx/templates/__common__/about.html index d3e8d06a6..9741b5162 100644 --- a/searx/templates/__common__/about.html +++ b/searx/templates/__common__/about.html @@ -59,12 +59,16 @@

How to set as the default search engine?

-
Firefox
+

+ Searx supports OpenSearch. + For more information on changing your default search engine, see your browser's documentation: +

-
- Install - searx as a search engine on any version of Firefox! (javascript required) -
+

Where to find anonymous usage statistics of this instance ?

-- GitLab From 250e05e826c5aa072c0f05b0c1f0a8f66ba47631 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 12 May 2020 14:57:45 +0200 Subject: [PATCH 02/32] [README] update and polish up a little by using badges about markup & badges - https://github.com/ralsina/rst-cheatsheet/blob/master/rst-cheatsheet.rst - https://github.com/Naereen/badges/blob/master/README.rst - https://shields.io/ - https://gist.github.com/tterb/982ae14a9307b80117dbf49f624ce0e8 Signed-off-by: Markus Heiser --- README.rst | 96 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/README.rst b/README.rst index a7b75d6e2..c0008acde 100644 --- a/README.rst +++ b/README.rst @@ -1,63 +1,67 @@ -searx -===== - -A privacy-respecting, hackable `metasearch -engine `__. - -Pronunciation: səːks - -List of `running -instances `__. - -See the `documentation `__ and the `wiki `__ for more information. - +.. SPDX-License-Identifier: AGPL-3.0-or-later + +.. figure:: https://raw.githubusercontent.com/asciimoo/searx/master/searx/static/themes/oscar/img/logo_searx_a.png + :target: https://asciimoo.github.io/searx/ + :alt: searX + :width: 100% + :align: center + +------- + +|searx install| +|searx homepage| +|searx wiki| +|AGPL License| +|Issues| +|commits| |OpenCollective searx backers| |OpenCollective searx sponsors| -Installation -~~~~~~~~~~~~ - -With Docker ------------ -Go to the `searx-docker `__ project. - -Without Docker --------------- -For all of the details, follow this `step by step installation `__. - -Note: the documentation needs to be updated. +Privacy-respecting, hackable `metasearch engine`_ / *pronunciation* **səːks**. -If you are in a hurry ---------------------- -- clone the source: - ``git clone https://github.com/asciimoo/searx.git && cd searx`` -- install dependencies: ``./manage.sh update_packages`` -- edit your - `settings.yml `__ - (set your ``secret_key``!) -- run ``python searx/webapp.py`` to start the application +.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine +.. |searx install| image:: https://img.shields.io/badge/-install-blue + :target: https://asciimoo.github.io/searx/admin/installation.html -Bugs -~~~~ +.. |searx homepage| image:: https://img.shields.io/badge/-homepage-blue + :target: https://asciimoo.github.io/searx -Bugs or suggestions? Visit the `issue -tracker `__. +.. |searx wiki| image:: https://img.shields.io/badge/-wiki-blue + :target: https://github.com/asciimoo/searx/wiki -`License `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg + :target: https://github.com/asciimoo/searx/blob/master/LICENSE -More about searx -~~~~~~~~~~~~~~~~ +.. |Issues| image:: https://img.shields.io/github/issues/asciimoo/searx?color=yellow&label=issues + :target: https://github.com/asciimoo/searx/issues -- `openhub `__ -- `twitter `__ -- IRC: #searx @ freenode +.. |PR| image:: https://img.shields.io/github/issues-pr-raw/asciimoo/searx?color=yellow&label=PR + :target: https://github.com/asciimoo/searx/pulls +.. |commits| image:: https://img.shields.io/github/commit-activity/y/asciimoo/searx?color=yellow&label=commits + :target: https://github.com/asciimoo/searx/commits/master .. |OpenCollective searx backers| image:: https://opencollective.com/searx/backers/badge.svg :target: https://opencollective.com/searx#backer - .. |OpenCollective searx sponsors| image:: https://opencollective.com/searx/sponsors/badge.svg :target: https://opencollective.com/searx#sponsor + + +If you are looking for running instances, ready to use, then visit searx.space_. + +Otherwise jump to the user_, admin_ and developer_ handbooks you will find on +our homepage_. + +.. _searx.space: https://searx.space +.. _user: https://asciimoo.github.io/searx/user +.. _admin: https://asciimoo.github.io/searx/admin +.. _developer: https://asciimoo.github.io/searx/dev +.. _homepage: https://asciimoo.github.io/searx + +contact: + openhub_ // twitter_ // IRC: #searx @ freenode + +.. _openhub: https://www.openhub.net/p/searx +.. _twitter: https://twitter.com/Searx_engine -- GitLab From f8b16a6635d553f91cc3d2e81b816e10517e9a72 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 12 May 2020 15:02:53 +0200 Subject: [PATCH 03/32] [README] searx, world's first gluten free search engine ;) Signed-off-by: Markus Heiser --- README.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.rst b/README.rst index c0008acde..55deb674e 100644 --- a/README.rst +++ b/README.rst @@ -65,3 +65,9 @@ contact: .. _openhub: https://www.openhub.net/p/searx .. _twitter: https://twitter.com/Searx_engine + +------- + +|gluten free| + +.. |gluten free| image:: https://forthebadge.com/images/featured/featured-gluten-free.svg -- GitLab From 4954e56b69201463b23e9a140832d5ff56c9ebcb Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 15 May 2020 09:57:09 +0200 Subject: [PATCH 04/32] [fix] Makefile: node.env is a prerequisite of lessc and grunt Signed-off-by: Markus Heiser --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index abd0eddb8..863520788 100644 --- a/Makefile +++ b/Makefile @@ -136,29 +136,29 @@ quiet_cmd_grunt = GRUNT $2 cmd_grunt = PATH="$$(npm bin):$$PATH" \ grunt --gruntfile "$2" -themes.oscar: +themes.oscar: node.env $(Q)echo '[!] build oscar theme' $(call cmd,grunt,searx/static/themes/oscar/gruntfile.js) -themes.simple: +themes.simple: node.env $(Q)echo '[!] build simple theme' $(call cmd,grunt,searx/static/themes/simple/gruntfile.js) -themes.legacy: +themes.legacy: node.env $(Q)echo '[!] build legacy theme' $(call cmd,lessc,themes/legacy/less/style-rtl.less,themes/legacy/css/style-rtl.css) $(call cmd,lessc,themes/legacy/less/style.less,themes/legacy/css/style.css) -themes.courgette: +themes.courgette: node.env $(Q)echo '[!] build courgette theme' $(call cmd,lessc,themes/courgette/less/style.less,themes/courgette/css/style.css) $(call cmd,lessc,themes/courgette/less/style-rtl.less,themes/courgette/css/style-rtl.css) -themes.pixart: +themes.pixart: node.env $(Q)echo '[!] build pixart theme' $(call cmd,lessc,themes/pix-art/less/style.less,themes/pix-art/css/style.css) -themes.bootstrap: +themes.bootstrap: node.env $(call cmd,lessc,less/bootstrap/bootstrap.less,css/bootstrap.min.css) -- GitLab From ad208378bb78a35746db432011bcc08b4ffd708f Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 15 May 2020 10:16:49 +0200 Subject: [PATCH 05/32] [fix] oscar theme, remove inline style attributes (CSP compliants) Inline styles are blocked by default with Content Security Policy (CSP). Move the rest of inline styles to CSS and correct the HTML template of the oscar preference page. Signed-off-by: Markus Heiser --- .../oscar/less/logicodev/preferences.less | 12 ++++++++ searx/templates/oscar/preferences.html | 30 +++++++++++-------- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/searx/static/themes/oscar/less/logicodev/preferences.less b/searx/static/themes/oscar/less/logicodev/preferences.less index 9672d5011..82ce16310 100644 --- a/searx/static/themes/oscar/less/logicodev/preferences.less +++ b/searx/static/themes/oscar/less/logicodev/preferences.less @@ -1,3 +1,15 @@ .table > tbody > tr > td, .table > tbody > tr > th { vertical-align: middle !important; } + +.nav-tabs.nav-justified{ + margin-bottom: 20px; +} + +p { + margin: 10px 0; +} + +input.cursor-text { + margin: 10px 0; +} diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index b03929df3..5f6979590 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -9,7 +9,7 @@
-