on master help sign in
Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme
commitf14a7add31c8db54c90ee7bd8504e3f395faf944 authorMarkus Heiser <markus.heiser@darmarit.de> dateTue 30 Jun 2020, 15:37 (6 years ago) parentca1c3bdc59ca60
38 files changed+831−290
Makefile+2−1 README.rst+53−43 docs/admin/installation-uwsgi.rst+6−5 docs/blog/index.rst+1 docs/blog/lxcdev-202006.rst+413 docs/blog/private-engines.rst+1−1 docs/dev/search_api.rst+2−2 docs/user/own-instance.rst+2−2 docs/utils/lxc.sh.rst+4−3 searx/engines/duckduckgo.py+6 searx/engines/gigablast.py+82−85 searx/engines/yacy.py+1−1 searx/engines/yahoo.py+1−1 searx/static/themes/oscar/css/logicodev-dark.css+32−4 searx/static/themes/oscar/css/logicodev-dark.min.css+1−1 searx/static/themes/oscar/css/logicodev.css+32−4 searx/static/themes/oscar/css/logicodev.min.css+1−1 searx/static/themes/oscar/less/logicodev/advanced.less+2−2 searx/static/themes/oscar/less/logicodev/onoff.less+19−2 searx/static/themes/oscar/less/logicodev/search.less+11−1 searx/templates/__common__/about.html+9−5 searx/templates/oscar/advanced.html+1−1 searx/templates/oscar/base.html+3−3 searx/templates/oscar/index.html+2−2 searx/templates/oscar/infobox.html+1−1 searx/templates/oscar/languages.html+1 searx/templates/oscar/macros.html+17−16 searx/templates/oscar/preferences.html+47−47 searx/templates/oscar/result_templates/code.html+2−2 searx/templates/oscar/result_templates/default.html+6−6 searx/templates/oscar/result_templates/images.html+2−2 searx/templates/oscar/result_templates/map.html+4−4 searx/templates/oscar/result_templates/torrent.html+4−4 searx/templates/oscar/result_templates/videos.html+6−6 searx/templates/oscar/time-range.html+1 searx/webapp.py+9−2 utils/fetch_languages.py+2−2 utils/searx.sh+42−28
Makefile+2−1
@@ -223,6 +223,7 @@ test.pylint: pyenvinstall
223223 $(call cmd,pylint,\
224224 searx/preferences.py \
225225 searx/testing.py \
226+ searx/engines/gigablast.py \
226227 )
227228endif
228229
@@ -243,7 +244,7 @@ test.sh:
243244
244245test.pep8: pyenvinstall
245246 @echo "TEST pep8"
246− $(Q)$(PY_ENV_ACT); pep8 --exclude=searx/static --max-line-length=120 --ignore "E402,W503" searx tests
247+ $(Q)$(PY_ENV_ACT); pep8 --exclude='searx/static, searx/engines/gigablast.py' --max-line-length=120 --ignore "E402,W503" searx tests
247248
248249test.unit: pyenvinstall
249250 @echo "TEST tests/unit"
README.rst+53−43
@@ -1,63 +1,73 @@
1−searx
2−=====
1+.. SPDX-License-Identifier: AGPL-3.0-or-later
2+
3+.. figure:: https://raw.githubusercontent.com/asciimoo/searx/master/searx/static/themes/oscar/img/logo_searx_a.png
4+ :target: https://asciimoo.github.io/searx/
5+ :alt: searX
6+ :width: 100%
7+ :align: center
8+
9+-------
10+
11+|searx install|
12+|searx homepage|
13+|searx wiki|
14+|AGPL License|
15+|Issues|
16+|commits|
17+|OpenCollective searx backers|
18+|OpenCollective searx sponsors|
319
4−A privacy-respecting, hackable `metasearch
5−engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__.
20+Privacy-respecting, hackable `metasearch engine`_ / *pronunciation* **səːks**.
621
7−Pronunciation: səːks
22+.. _metasearch engine: https://en.wikipedia.org/wiki/Metasearch_engine
823
9−List of `running
10−instances <https://searx.space/>`__.
24+.. |searx install| image:: https://img.shields.io/badge/-install-blue
25+ :target: https://asciimoo.github.io/searx/admin/installation.html
1126
12−See the `documentation <https://asciimoo.github.io/searx>`__ and the `wiki <https://github.com/asciimoo/searx/wiki>`__ for more information.
27+.. |searx homepage| image:: https://img.shields.io/badge/-homepage-blue
28+ :target: https://asciimoo.github.io/searx
1329
14−|OpenCollective searx backers|
15−|OpenCollective searx sponsors|
30+.. |searx wiki| image:: https://img.shields.io/badge/-wiki-blue
31+ :target: https://github.com/asciimoo/searx/wiki
1632
17−Installation
18−~~~~~~~~~~~~
33+.. |AGPL License| image:: https://img.shields.io/badge/license-AGPL-blue.svg
34+ :target: https://github.com/asciimoo/searx/blob/master/LICENSE
1935
20−With Docker
21−-----------
22−Go to the `searx-docker <https://github.com/searx/searx-docker>`__ project.
36+.. |Issues| image:: https://img.shields.io/github/issues/asciimoo/searx?color=yellow&label=issues
37+ :target: https://github.com/asciimoo/searx/issues
2338
24−Without Docker
25−--------------
26−For all of the details, follow this `step by step installation <https://asciimoo.github.io/searx/admin/installation.html>`__.
39+.. |PR| image:: https://img.shields.io/github/issues-pr-raw/asciimoo/searx?color=yellow&label=PR
40+ :target: https://github.com/asciimoo/searx/pulls
2741
28−Note: the documentation needs to be updated.
42+.. |commits| image:: https://img.shields.io/github/commit-activity/y/asciimoo/searx?color=yellow&label=commits
43+ :target: https://github.com/asciimoo/searx/commits/master
2944
30−If you are in a hurry
31−---------------------
32−- clone the source:
33− ``git clone https://github.com/asciimoo/searx.git && cd searx``
34−- install dependencies: ``./manage.sh update_packages``
35−- edit your
36− `settings.yml <https://github.com/asciimoo/searx/blob/master/searx/settings.yml>`__
37− (set your ``secret_key``!)
38−- run ``python searx/webapp.py`` to start the application
45+.. |OpenCollective searx backers| image:: https://opencollective.com/searx/backers/badge.svg
46+ :target: https://opencollective.com/searx#backer
3947
48+.. |OpenCollective searx sponsors| image:: https://opencollective.com/searx/sponsors/badge.svg
49+ :target: https://opencollective.com/searx#sponsor
4050
41−Bugs
42−~~~~
4351
44−Bugs or suggestions? Visit the `issue
45−tracker <https://github.com/asciimoo/searx/issues>`__.
52+If you are looking for running instances, ready to use, then visit searx.space_.
4653
47−`License <https://github.com/asciimoo/searx/blob/master/LICENSE>`__
48−~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+Otherwise jump to the user_, admin_ and developer_ handbooks you will find on
55+our homepage_.
4956
50−More about searx
51−~~~~~~~~~~~~~~~~
57+.. _searx.space: https://searx.space
58+.. _user: https://asciimoo.github.io/searx/user
59+.. _admin: https://asciimoo.github.io/searx/admin
60+.. _developer: https://asciimoo.github.io/searx/dev
61+.. _homepage: https://asciimoo.github.io/searx
5262
53−- `openhub <https://www.openhub.net/p/searx/>`__
54−- `twitter <https://twitter.com/Searx_engine>`__
55−- IRC: #searx @ freenode
63+contact:
64+ openhub_ // twitter_ // IRC: #searx @ freenode
5665
66+.. _openhub: https://www.openhub.net/p/searx
67+.. _twitter: https://twitter.com/Searx_engine
5768
58−.. |OpenCollective searx backers| image:: https://opencollective.com/searx/backers/badge.svg
59− :target: https://opencollective.com/searx#backer
69+-------
6070
71+|gluten free|
6172
62−.. |OpenCollective searx sponsors| image:: https://opencollective.com/searx/sponsors/badge.svg
63− :target: https://opencollective.com/searx#sponsor
73+.. |gluten free| image:: https://forthebadge.com/images/featured/featured-gluten-free.svg
docs/admin/installation-uwsgi.rst+6−5
@@ -108,6 +108,7 @@ restart the uwsgi application.
108108 :start-after: START searx uwsgi-description ubuntu-20.04
109109 :end-before: END searx uwsgi-description ubuntu-20.04
110110
111+ .. hotfix: a bug group-tab need this comment
111112
112113 .. group-tab:: Arch Linux
113114
@@ -115,6 +116,7 @@ restart the uwsgi application.
115116 :start-after: START searx uwsgi-description arch
116117 :end-before: END searx uwsgi-description arch
117118
119+ .. hotfix: a bug group-tab need this comment
118120
119121 .. group-tab:: Fedora / RHEL
120122
@@ -128,22 +130,21 @@ restart the uwsgi application.
128130 .. group-tab:: Ubuntu / debian
129131
130132 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
131− :code: ini
132133 :start-after: START searx uwsgi-appini ubuntu-20.04
133134 :end-before: END searx uwsgi-appini ubuntu-20.04
134135
136+ .. hotfix: a bug group-tab need this comment
137+
135138 .. group-tab:: Arch Linux
136139
137140 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
138− :code: ini
139141 :start-after: START searx uwsgi-appini arch
140142 :end-before: END searx uwsgi-appini arch
141143
144+ .. hotfix: a bug group-tab need this comment
145+
142146 .. group-tab:: Fedora / RHEL
143147
144148 .. kernel-include:: $DOCS_BUILD/includes/searx.rst
145− :code: ini
146149 :start-after: START searx uwsgi-appini fedora
147150 :end-before: END searx uwsgi-appini fedora
148−
149−
docs/blog/index.rst+1
@@ -6,6 +6,7 @@ Blog
66 :maxdepth: 2
77 :caption: Contents
88
9+ lxcdev-202006
910 python3
1011 admin
1112 intro-offline
docs/blog/lxcdev-202006.rstnew file+413
@@ -0,0 +1,413 @@
1+.. _blog-lxcdev-202006:
2+
3+=======================================
4+Developing in Linux containers [202006]
5+=======================================
6+
7+.. _LXC: https://linuxcontainers.org/lxc/introduction/
8+
9+.. sidebar:: Audience
10+
11+ This blog post is written for experienced admins and developers / readers
12+ should have a serious meaning about: *distributed*, *merge* and *linux
13+ container*.
14+
15+.. contents:: Contents
16+ :depth: 2
17+ :local:
18+ :backlinks: entry
19+
20+In PR :PR:`1803` we added a lot of scripts to Searx's boilerplate. In this blog
21+post I will show you, how you can make use of them in *distributed and
22+heterogeneous development cycles* (TL;DR; jump to the :ref:`blog-lxcdev-202006
23+abstract`).
24+
25+Motivation
26+==========
27+
28+Normally in our development cycle, we edit the sources and run some test and/or
29+builds by using ``make`` before we commit. This cycle is simple and perfect but
30+might fail in some aspects we should not overlook.
31+
32+ The environment in which we run all our development processes matters!
33+
34+The :ref:`makefile` and the :ref:`make pyenv` encapsulate a lot for us, but they
35+do not have access to all prerequisites. For example, there may have
36+dependencies on packages that are installed on the developer's desktop, but
37+usually are not preinstalled on a server or client system. Another examples
38+are; settings have been made to the software on the developer's host that would
39+never be set on a *production* system.
40+
41+*Linux Containers* (LXC_) are isolate environments and not to mix up on
42+developer's all the prerequisites of all the projects he contribute to, is
43+always a good choice.
44+
45+The scripts from PR :PR:`1803` can divide in those to install and maintain
46+software:
47+
48+- :ref:`searx.sh`
49+- :ref:`filtron.sh`
50+- :ref:`morty.sh`
51+
52+and the script :ref:`lxc.sh`, with we can scale our installation, maintenance or
53+even development tasks over a stack of containers, what we call: *Searx's lxc
54+suite*.
55+
56+Gentlemen, start your engines!
57+==============================
58+
59+.. _LXD: https://linuxcontainers.org/lxd/introduction/
60+.. _archlinux: https://www.archlinux.org/
61+
62+Before you can start with containers, you need to install and initiate LXD_
63+once:
64+
65+.. tabs::
66+
67+ .. group-tab:: desktop
68+
69+ .. code:: sh
70+
71+ $ snap install lxd
72+ $ lxd init --auto
73+
74+And you need to clone from origin or if you have your own fork, clone from your
75+fork:
76+
77+.. tabs::
78+
79+ .. group-tab:: desktop
80+
81+ .. code:: sh
82+
83+ $ cd ~/Downloads
84+ $ git clone https://github.com/asciimoo/searx.git
85+ $ cd searx
86+
87+The :ref:`lxc-searx.env` consists of several images, see ``export
88+LXC_SUITE=(...`` near by :origin:`utils/lxc-searx.env#L19`. For this blog post
89+we exercise on a archlinux_ image. The container of this image is named
90+``searx-archlinux``. Lets build the container, but be sure that this container
91+does not already exists, so first lets remove possible old one:
92+
93+.. tabs::
94+
95+ .. group-tab:: desktop
96+
97+ .. code:: sh
98+
99+ $ sudo -H ./utils/lxc.sh remove searx-archlinux
100+ $ sudo -H ./utils/lxc.sh build searx-archlinux
101+
102+.. sidebar:: The ``searx-archlinux`` container
103+
104+ is the base of all our exercises here.
105+
106+In this container we install all services :ref:`including searx, morty & filtron
107+<lxc.sh install suite>` in once:
108+
109+.. tabs::
110+
111+ .. group-tab:: desktop
112+
113+ .. code:: sh
114+
115+ $ sudo -H ./utils/lxc.sh install suite searx-archlinux
116+
117+To proxy HTTP from filtron and morty in the container to the outside of the
118+container, install nginx into the container. Once for the bot blocker filtron:
119+
120+.. tabs::
121+
122+ .. group-tab:: desktop
123+
124+ .. code:: sh
125+
126+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
127+ ./utils/filtron.sh nginx install
128+ ...
129+ INFO: got 429 from http://10.174.184.156/searx
130+
131+and once for the content sanitizer (content proxy morty):
132+
133+.. tabs::
134+
135+ .. group-tab:: desktop
136+
137+ .. code:: sh
138+
139+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
140+ ./utils/morty.sh nginx install
141+ ...
142+ INFO: got 200 from http://10.174.184.156/morty/
143+
144+.. sidebar:: Fully functional searx suite
145+
146+ From here on you have a fully functional searx suite running with bot blocker
147+ (filtron) and Web content sanitizer (content proxy morty) needed for a
148+ *privacy protecting* search engine.
149+
150+On your system, the IP of your ``searx-archlinux`` container differs from
151+http://10.174.184.156/searx, just open the URL reported in your installation
152+protocol in your WEB browser from the desktop to test the instance from outside
153+of the container.
154+
155+In such a searx suite admins can maintain and access the debug log of the
156+different services quite easy.
157+
158+.. _working in containers:
159+
160+In containers, work as usual
161+============================
162+
163+Usually you open a root-bash using ``sudo -H bash``. In case of LXC containers
164+open the root-bash in the container using ``./utils/lxc.sh cmd
165+searx-archlinux``:
166+
167+.. tabs::
168+
169+ .. group-tab:: desktop
170+
171+ .. code:: sh
172+
173+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux bash
174+ INFO: [searx-archlinux] bash
175+ [root@searx-archlinux searx]# pwd
176+ /share/searx
177+
178+The prompt ``[root@searx-archlinux ...]`` signals, that you are the root user in
179+the searx-container. To debug the running searx instance use:
180+
181+.. tabs::
182+
183+ .. group-tab:: root@searx-archlinux
184+
185+ .. code:: sh
186+
187+ $ ./utils/searx.sh inspect service
188+ ...
189+ use [CTRL-C] to stop monitoring the log
190+ ...
191+
192+Back in the browser on your desktop open the service http://10.174.184.156/searx
193+and run your application tests while the debug log is shown in the terminal from
194+above. You can stop monitoring using ``CTRL-C``, this also disables the *"debug
195+option"* in searx's settings file and restarts the searx uwsgi application. To
196+debug services from filtron and morty analogous use:
197+
198+.. tabs::
199+
200+ .. group-tab:: root@searx-archlinux
201+
202+ .. code:: sh
203+
204+ $ ./utils/filtron.sh inspect service
205+ $ ./utils/morty.sh inspect service
206+
207+Another point we have to notice is that each service (:ref:`searx <searx.sh>`,
208+:ref:`filtron <filtron.sh>` and :ref:`morty <morty.sh>`) runs under dedicated
209+system user account with the same name (compare :ref:`create searx user`). To
210+get a shell from theses accounts, simply call one of the scripts:
211+
212+.. tabs::
213+
214+ .. group-tab:: root@searx-archlinux
215+
216+ .. code:: sh
217+
218+ $ ./utils/searx.sh shell
219+ $ ./utils/filtron.sh shell
220+ $ ./utils/morty.sh shell
221+
222+To get in touch, open a shell from the service user (searx@searx-archlinux):
223+
224+.. tabs::
225+
226+ .. group-tab:: desktop
227+
228+ .. code:: sh
229+
230+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
231+ ./utils/searx.sh shell
232+ // exit with [CTRL-D]
233+ (searx-pyenv) [searx@searx-archlinux ~]$ ...
234+
235+The prompt ``[searx@searx-archlinux]`` signals that you are logged in as system
236+user ``searx`` in the ``searx-archlinux`` container and the python *virtualenv*
237+``(searx-pyenv)`` environment is activated.
238+
239+.. tabs::
240+
241+ .. group-tab:: searx@searx-archlinux
242+
243+ .. code:: sh
244+
245+ (searx-pyenv) [searx@searx-archlinux ~]$ pwd
246+ /usr/local/searx
247+
248+
249+
250+Wrap production into developer suite
251+====================================
252+
253+In this section we will see how to change the *"Fully functional searx suite"*
254+from a LXC container (which is quite ready for production) into a developer
255+suite. For this, we have to keep an eye on the :ref:`installation basic`:
256+
257+- searx setup in: ``/etc/searx/settings.yml``
258+- searx user's home: ``/usr/local/searx``
259+- virtualenv in: ``/usr/local/searx/searx-pyenv``
260+- searx software in: ``/usr/local/searx/searx-src``
261+
262+The searx software is a clone of the ``GIT_URL`` (see :ref:`makefile setup`) and
263+the working tree is checked out from the ``GIT_BRANCH``. With the use of the
264+:ref:`searx.sh` the searx service was installed as :ref:`uWSGI application
265+<searx uwsgi>`. To maintain this service, we can use ``systemctl`` (compare
266+:ref:`service architectures on distributions <uwsgi configuration>`).
267+
268+.. tabs::
269+
270+ .. group-tab:: desktop
271+
272+ .. code:: sh
273+
274+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
275+ systemctl stop uwsgi@searx
276+
277+With the command above, we stopped the searx uWSGI-App in the archlinux
278+container.
279+
280+The uWSGI-App for the archlinux dsitros is configured in
281+:origin:`utils/templates/etc/uwsgi/apps-archlinux/searx.ini`, from where at
282+least you should attend the settings of ``uid``, ``chdir``, ``env`` and
283+``http``::
284+
285+ env = SEARX_SETTINGS_PATH=/etc/searx/settings.yml
286+ http = 127.0.0.1:8888
287+
288+ chdir = /usr/local/searx/searx-src/searx
289+ virtualenv = /usr/local/searx/searx-pyenv
290+ pythonpath = /usr/local/searx/searx-src
291+
292+If you have read the :ref:`"Good to know section" <lxc.sh>` you remember, that
293+each container shares the root folder of the repository and the command
294+``utils/lxc.sh cmd`` handles relative path names **transparent**. To wrap the
295+searx installation into a developer one, we simple have to create a smylink to
296+the **transparent** reposetory from the desktop. Now lets replace the
297+repository at ``searx-src`` in the container with the working tree from outside
298+of the container:
299+
300+.. tabs::
301+
302+ .. group-tab:: container becomes a developer suite
303+
304+ .. code:: sh
305+
306+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
307+ mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
308+
309+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
310+ ln -s /share/searx/ /usr/local/searx/searx-src
311+
312+Now we can develop as usual in the working tree of our desktop system. Every
313+time the software was changed, you have to restart the searx service (in the
314+conatiner):
315+
316+.. tabs::
317+
318+ .. group-tab:: desktop
319+
320+ .. code:: sh
321+
322+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
323+ systemctl restart uwsgi@searx
324+
325+
326+Remember: :ref:`working in containers` .. here are just some examples from my
327+daily usage:
328+
329+.. tabs::
330+
331+ .. group-tab:: desktop
332+
333+ To *inspect* the searx instance (already described above):
334+
335+ .. code:: sh
336+
337+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
338+ ./utils/searx.sh inspect service
339+
340+ Run :ref:`makefile`, e.g. to test inside the container:
341+
342+ .. code:: sh
343+
344+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
345+ make test
346+
347+ To install all prerequisites needed for a :ref:`buildhosts`:
348+
349+ .. code:: sh
350+
351+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
352+ ./utils/searx.sh install buildhost
353+
354+ To build the docs on a buildhost :ref:`buildhosts`:
355+
356+ .. code:: sh
357+
358+ $ sudo -H ./utils/lxc.sh cmd searx-archlinux \
359+ make docs
360+
361+.. _blog-lxcdev-202006 abstract:
362+
363+Abstract
364+========
365+
366+We build up a fully functional searx suite in a archlinux container:
367+
368+.. code:: sh
369+
370+ $ sudo -H ./utils/lxc.sh install suite searx-archlinux
371+
372+To access HTTP from the desktop we installed nginx for the services inside the
373+conatiner:
374+
375+.. tabs::
376+
377+ .. group-tab:: [root@searx-archlinux]
378+
379+ .. code:: sh
380+
381+ $ ./utils/filtron.sh nginx install
382+ $ ./utils/morty.sh nginx install
383+
384+To wrap the suite into a developer one, we created a symbolic link to the
385+repository which is shared **transparent** from the desktop's file system into
386+the container :
387+
388+.. tabs::
389+
390+ .. group-tab:: [root@searx-archlinux]
391+
392+ .. code:: sh
393+
394+ $ mv /usr/local/searx/searx-src /usr/local/searx/searx-src.old
395+ $ ln -s /share/searx/ /usr/local/searx/searx-src
396+ $ systemctl restart uwsgi@searx
397+
398+To get remarks from the suite of the archlinux container we can use:
399+
400+.. tabs::
401+
402+ .. group-tab:: desktop
403+
404+ .. code:: sh
405+
406+ $ sudo -H ./utils/lxc.sh show suite searx-archlinux
407+ ...
408+ [searx-archlinux] INFO: (eth0) filtron: http://10.174.184.156:4004/ http://10.174.184.156/searx
409+ [searx-archlinux] INFO: (eth0) morty: http://10.174.184.156:3000/
410+ [searx-archlinux] INFO: (eth0) docs-live: http://10.174.184.156:8080/
411+ [searx-archlinux] INFO: (eth0) IPv6: http://[fd42:573b:e0b3:e97e:216:3eff:fea5:9b65]
412+ ...
413+
docs/blog/private-engines.rst+1−1
@@ -13,7 +13,7 @@ Private engines
1313To solve this issue private engines were introduced in :pull:`1823`.
1414A new option was added to engines named `tokens`. It expects a list
1515of strings. If the user making a request presents one of the tokens
16−of an engine, he/she is able to access information about the engine
16+of an engine, they can access information about the engine
1717and make search requests.
1818
1919Example configuration to restrict access to the Arch Linux Wiki engine:
docs/dev/search_api.rst+2−2
@@ -81,7 +81,7 @@ Parameters
8181 Theme of instance.
8282
8383 Please note, available themes depend on an instance. It is possible that an
84− instance administrator deleted, created or renamed themes on his/her instance.
84+ instance administrator deleted, created or renamed themes on their instance.
8585 See the available options in the preferences page of the instance.
8686
8787``oscar-style`` : default ``logicodev``
@@ -91,7 +91,7 @@ Parameters
9191 ``oscar``.
9292
9393 Please note, available styles depend on an instance. It is possible that an
94− instance administrator deleted, created or renamed styles on his/her
94+ instance administrator deleted, created or renamed styles on their
9595 instance. See the available options in the preferences page of the instance.
9696
9797``enabled_plugins`` : optional
docs/user/own-instance.rst+2−2
@@ -44,9 +44,9 @@ hidden from visited result pages.
4444What are the consequences of using public instances?
4545----------------------------------------------------
4646
47−If someone uses a public instance, he/she has to trust the administrator of that
47+If someone uses a public instance, they have to trust the administrator of that
4848instance. This means that the user of the public instance does not know whether
49−his/her requests are logged, aggregated and sent or sold to a third party.
49+their requests are logged, aggregated and sent or sold to a third party.
5050
5151Also, public instances without proper protection are more vulnerable to abusing
5252the search service, In this case the external service in exchange returns
docs/utils/lxc.sh.rst+4−3
@@ -47,9 +47,9 @@ one**::
4747
4848*Good to know ...*
4949
50−Eeach container shares the root folder of the repository and the
51−command ``utils/lxc.sh cmd`` **handles relative path names transparent**,
52−compare output of::
50+Each container shares the root folder of the repository and the command
51+``utils/lxc.sh cmd`` **handles relative path names transparent**, compare output
52+of::
5353
5454 $ sudo -H ./utils/lxc.sh cmd -- ls -la Makefile
5555 ...
@@ -66,6 +66,7 @@ If there comes the time you want to **get rid off all** the containers and
6666 $ sudo -H ./utils/lxc.sh remove
6767 $ sudo -H ./utils/lxc.sh remove images
6868
69+.. _lxc.sh install suite:
6970
7071Install suite
7172=============
searx/engines/duckduckgo.py+6
@@ -50,6 +50,7 @@ result_xpath = '//div[@class="result results_links results_links_deep web-result
5050url_xpath = './/a[@class="result__a"]/@href'
5151title_xpath = './/a[@class="result__a"]'
5252content_xpath = './/a[@class="result__snippet"]'
53+correction_xpath = '//div[@id="did_you_mean"]//a'
5354
5455
5556# match query's language to a region code that duckduckgo will accept
@@ -125,6 +126,11 @@ def response(resp):
125126 'content': content,
126127 'url': res_url})
127128
129+ # parse correction
130+ for correction in eval_xpath(doc, correction_xpath):
131+ # append correction
132+ results.append({'correction': extract_text(correction)})
133+
128134 # return results
129135 return results
130136
searx/engines/gigablast.py+82−85
@@ -1,3 +1,4 @@
1+# SPDX-License-Identifier: AGPL-3.0-or-later
12"""
23 Gigablast (Web)
34
@@ -9,121 +10,117 @@
910 @stable yes
1011 @parse url, title, content
1112"""
13+# pylint: disable=missing-function-docstring, invalid-name
1214
13−import random
15+import re
1416from json import loads
15−from time import time
16−from lxml.html import fromstring
17−from searx.poolrequests import get
17+# from searx import logger
1818from searx.url_utils import urlencode
19−from searx.utils import eval_xpath
19+from searx.poolrequests import get
2020
2121# engine dependent config
2222categories = ['general']
23−paging = True
24−number_of_results = 10
23+# gigablast's pagination is totally damaged, don't use it
24+paging = False
2525language_support = True
2626safesearch = True
2727
2828# search-url
29−base_url = 'https://gigablast.com/'
30−search_string = 'search?{query}'\
31− '&n={number_of_results}'\
32− '&c=main'\
33− '&s={offset}'\
34− '&format=json'\
35− '&langcountry={lang}'\
36− '&ff={safesearch}'\
37− '&rand={rxikd}'
38−# specific xpath variables
39−results_xpath = '//response//result'
40−url_xpath = './/url'
41−title_xpath = './/title'
42−content_xpath = './/sum'
43−
44−supported_languages_url = 'https://gigablast.com/search?&rxikd=1'
45−
46−extra_param = '' # gigablast requires a random extra parameter
47−# which can be extracted from the source code of the search page
29+base_url = 'https://gigablast.com'
4830
31+# ugly hack: gigablast requires a random extra parameter which can be extracted
32+# from the source code of the gigablast HTTP client
33+extra_param = ''
34+extra_param_path='/search?c=main&qlangcountry=en-us&q=south&s=10'
4935
5036def parse_extra_param(text):
51− global extra_param
52− param_lines = [x for x in text.splitlines() if x.startswith('var url=') or x.startswith('url=url+')]
53− extra_param = ''
54− for l in param_lines:
55− extra_param += l.split("'")[1]
56− extra_param = extra_param.split('&')[-1]
5737
58−
59−def init(engine_settings=None):
60− parse_extra_param(get('http://gigablast.com/search?c=main&qlangcountry=en-us&q=south&s=10').text)
38+ # example:
39+ #
40+ # var uxrl='/search?c=main&qlangcountry=en-us&q=south&s=10&rand=1590740241635&n';
41+ # uxrl=uxrl+'sab=730863287';
42+ #
43+ # extra_param --> "rand=1590740241635&nsab=730863287"
44+
45+ global extra_param # pylint: disable=global-statement
46+ re_var= None
47+ for line in text.splitlines():
48+ if re_var is None and extra_param_path in line:
49+ var = line.split("=")[0].split()[1] # e.g. var --> 'uxrl'
50+ re_var = re.compile(var + "\\s*=\\s*" + var + "\\s*\\+\\s*'" + "(.*)" + "'(.*)")
51+ extra_param = line.split("'")[1][len(extra_param_path):]
52+ continue
53+ if re_var is not None and re_var.search(line):
54+ extra_param += re_var.search(line).group(1)
55+ break
56+ # logger.debug('gigablast extra_param="%s"', extra_param)
57+
58+def init(engine_settings=None): # pylint: disable=unused-argument
59+ parse_extra_param(get(base_url + extra_param_path).text)
6160
6261
6362# do search-request
64−def request(query, params):
65− print("EXTRAPARAM:", extra_param)
66− offset = (params['pageno'] - 1) * number_of_results
63+def request(query, params): # pylint: disable=unused-argument
6764
68− if params['language'] == 'all':
69− language = 'xx'
70− else:
71− language = params['language'].replace('-', '_').lower()
72− if language.split('-')[0] != 'zh':
73− language = language.split('-')[0]
65+ # see API http://www.gigablast.com/api.html#/search
66+ # Take into account, that the API has some quirks ..
7467
75− if params['safesearch'] >= 1:
76− safesearch = 1
77− else:
78− safesearch = 0
68+ query_args = dict(
69+ c = 'main'
70+ , format = 'json'
71+ , q = query
72+ , dr = 1
73+ , showgoodimages = 0
74+ )
7975
80− # rxieu is some kind of hash from the search query, but accepts random atm
81− search_path = search_string.format(query=urlencode({'q': query}),
82− offset=offset,
83− number_of_results=number_of_results,
84− lang=language,
85− rxikd=int(time() * 1000),
86− safesearch=safesearch)
76+ if params['language'] and params['language'] != 'all':
77+ query_args['qlangcountry'] = params['language']
78+ query_args['qlang'] = params['language'].split('-')[0]
8779
88− params['url'] = base_url + search_path + '&' + extra_param
80+ if params['safesearch'] >= 1:
81+ query_args['ff'] = 1
8982
90− return params
83+ search_url = '/search?' + urlencode(query_args)
84+ params['url'] = base_url + search_url + extra_param
9185
86+ return params
9287
9388# get response from search-request
9489def response(resp):
9590 results = []
9691
97− # parse results
98− try:
99− response_json = loads(resp.text)
100− except:
101− parse_extra_param(resp.text)
102− raise Exception('extra param expired, please reload')
92+ response_json = loads(resp.text)
93+
94+ # logger.debug('gigablast returns %s results', len(response_json['results']))
10395
10496 for result in response_json['results']:
105− # append result
106− results.append({'url': result['url'],
107− 'title': result['title'],
108− 'content': result['sum']})
97+ # see "Example JSON Output (&format=json)"
98+ # at http://www.gigablast.com/api.html#/search
10999
110− # return results
111− return results
100+ # sort out meaningless result
101+
102+ title = result.get('title')
103+ if len(title) < 2:
104+ continue
105+
106+ url = result.get('url')
107+ if len(url) < 9:
108+ continue
109+
110+ content = result.get('sum')
111+ if len(content) < 5:
112+ continue
112113
114+ # extend fields
113115
114−# get supported languages from their site
115−def _fetch_supported_languages(resp):
116− supported_languages = []
117− dom = fromstring(resp.text)
118− links = eval_xpath(dom, '//span[@id="menu2"]/a')
119− for link in links:
120− href = eval_xpath(link, './@href')[0].split('lang%3A')
121− if len(href) == 2:
122− code = href[1].split('_')
123− if len(code) == 2:
124− code = code[0] + '-' + code[1].upper()
125− else:
126− code = code[0]
127− supported_languages.append(code)
128−
129− return supported_languages
116+ subtitle = result.get('title')
117+ if len(subtitle) > 3 and subtitle != title:
118+ title += " - " + subtitle
119+
120+ results.append(dict(
121+ url = url
122+ , title = title
123+ , content = content
124+ ))
125+
126+ return results
searx/engines/yacy.py+1−1
@@ -75,7 +75,7 @@ def response(resp):
7575
7676 for result in search_results[0].get('items', []):
7777 # parse image results
78− if result.get('image'):
78+ if result.get('image') and result.get('width') and result.get('height'):
7979
8080 result_url = ''
8181 if 'url' in result:
searx/engines/yahoo.py+1−1
@@ -33,7 +33,7 @@ supported_languages_url = 'https://search.yahoo.com/web/advanced'
3333results_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' Sr ')]"
3434url_xpath = './/h3/a/@href'
3535title_xpath = './/h3/a'
36−content_xpath = './/div[@class="compText aAbs"]'
36+content_xpath = './/div[contains(@class, "compText")]'
3737suggestion_xpath = "//div[contains(concat(' ', normalize-space(@class), ' '), ' AlsoTry ')]//a"
3838
3939time_range_dict = {'day': ['1d', 'd'],
searx/static/themes/oscar/css/logicodev-dark.css+32−4
@@ -70,7 +70,21 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
7070 -ms-user-select: none;
7171}
7272.onoffswitch-checkbox {
73− display: none;
73+ opacity: 0;
74+ position: absolute;
75+}
76+.onoffswitch-checkbox:before {
77+ content: "";
78+ display: inline-block;
79+ width: 16px;
80+ height: 16px;
81+ margin-right: 10px;
82+ position: absolute;
83+ left: 0;
84+ bottom: 1px;
85+ background-color: #fff;
86+ border: 1px solid #ccc;
87+ border-radius: 0px;
7488}
7589.onoffswitch-label {
7690 display: block;
@@ -104,7 +118,7 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
104118 top: 0;
105119 bottom: 0;
106120 right: 0px;
107− border: 2px solid #FFFFFF !important;
121+ border: 2px solid #FFFFFF;
108122 border-radius: 50px !important;
109123 transition: all 0.3s ease-in 0s;
110124}
@@ -115,6 +129,9 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
115129 right: 71px;
116130 background-color: #A1A1A1;
117131}
132+.onoffswitch-checkbox:focus + .onoffswitch-label .onoffswitch-switch {
133+ border: 3px solid #444444;
134+}
118135.result_header {
119136 margin-top: 0px;
120137 margin-bottom: 2px;
@@ -377,6 +394,17 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
377394.search-margin {
378395 margin-bottom: 0.6em;
379396}
397+.visually-hidden {
398+ position: absolute !important;
399+ height: 1px;
400+ width: 1px;
401+ overflow: hidden;
402+ clip: rect(1px 1px 1px 1px);
403+ /* IE6, IE7 */
404+ clip: rect(1px, 1px, 1px, 1px);
405+ white-space: nowrap;
406+ /* added line */
407+}
380408#advanced-search-container {
381409 display: none;
382410 text-align: left;
@@ -407,8 +435,8 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
407435 font-weight: bold;
408436 border-bottom: #01d7d4 5px solid;
409437}
410−#check-advanced {
411− display: none;
438+#check-advanced:focus + label {
439+ text-decoration: underline;
412440}
413441#check-advanced:checked ~ #advanced-search-container {
414442 display: block;
searx/static/themes/oscar/css/logicodev-dark.min.css+1−1
@@ -1 +1 @@
1−*{border-radius:0!important}html{position:relative;min-height:100%;color:#29314d}body{font-family:Roboto,Helvetica,Arial,sans-serif;margin-bottom:80px;background-color:#fff}body a{color:#08c}.footer{position:absolute;bottom:0;width:100%;height:60px;text-align:center;color:#999}input[type=checkbox]:checked+.label_hide_if_checked,input[type=checkbox]:checked+.label_hide_if_not_checked+.label_hide_if_checked{display:none}input[type=checkbox]:not(:checked)+.label_hide_if_not_checked,input[type=checkbox]:not(:checked)+.label_hide_if_checked+.label_hide_if_not_checked{display:none}.onoff-checkbox{width:15%}.onoffswitch{position:relative;width:110px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #FFF!important;border-radius:50px!important}.onoffswitch-inner{display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner:before,.onoffswitch-inner:after{display:block;float:left;width:50%;height:30px;padding:0;line-height:40px;font-size:20px;box-sizing:border-box;content:"";background-color:#EEE}.onoffswitch-switch{display:block;width:37px;background-color:#01d7d4;position:absolute;top:0;bottom:0;right:0;border:2px solid #FFF!important;border-radius:50px!important;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-right:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:71px;background-color:#A1A1A1}.result_header{margin-top:0;margin-bottom:2px;font-size:16px}.result_header .favicon{margin-bottom:-3px}.result_header a{color:#29314d;text-decoration:none}.result_header a:hover{color:#08c}.result_header a:visited{color:#684898}.result_header a .highlight{background-color:#f6f9fa}.result-content,.result-format,.result-source{margin-top:2px;margin-bottom:0;word-wrap:break-word;color:#666;font-size:13px}.result-content .highlight,.result-format .highlight,.result-source .highlight{font-weight:700}.result-source{font-size:10px;float:left}.result-format{font-size:10px;float:right}.external-link{color:#069025;font-size:12px;margin-bottom:15px}.external-link a{margin-right:3px}.result-default,.result-code,.result-torrent,.result-videos,.result-map{clear:both;padding:.5em 4px}.result-default:hover,.result-code:hover,.result-torrent:hover,.result-videos:hover,.result-map:hover{background-color:#f6f9fa}.result-images{float:left!important;width:24%;margin:.5%}.result-images a{display:block;width:100%;background-size:cover}.img-thumbnail{margin:5px;max-height:128px;min-height:128px}.result-videos{clear:both}.result-videos hr{margin:5px 0 15px 0}.result-videos .collapse{width:100%}.result-videos .in{margin-bottom:8px}.result-torrent{clear:both}.result-torrent b{margin-right:5px;margin-left:5px}.result-torrent .seeders{color:#2ecc71}.result-torrent .leechers{color:#f35e77}.result-map{clear:both}.result-code{clear:both}.result-code .code-fork,.result-code .code-fork a{color:#666}.suggestion_item{margin:2px 5px;max-width:100%}.suggestion_item .btn{max-width:100%;white-space:normal;word-wrap:break-word;text-align:left}.result_download{margin-right:5px}#pagination{margin-top:30px;padding-bottom:60px}.label-default{color:#a4a4a4;background:0 0}.result .text-muted small{word-wrap:break-word}.modal-wrapper{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-wrapper{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0 none;position:relative}@media screen and (max-width:75em){.img-thumbnail{object-fit:cover}}.infobox .panel-heading{background-color:#f6f9fa}.infobox .panel-heading .panel-title{font-weight:700}.infobox p{font-family:"DejaVu Serif",Georgia,Cambria,"Times New Roman",Times,serif!important;font-style:italic}.infobox .btn{background-color:#2ecc71;border:none}.infobox .btn a{color:#fff;margin:5px}.infobox .infobox_part{margin-bottom:20px;word-wrap:break-word;table-layout:fixed}.infobox .infobox_part:last-child{margin-bottom:0}.search_categories,#categories{text-transform:capitalize;margin-bottom:.5rem;display:flex;flex-wrap:wrap;flex-flow:row wrap;align-content:stretch}.search_categories label,#categories label,.search_categories .input-group-addon,#categories .input-group-addon{flex-grow:1;flex-basis:auto;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-top:.4rem;text-align:center;min-width:50px}.search_categories label:last-child,#categories label:last-child,.search_categories .input-group-addon:last-child,#categories .input-group-addon:last-child{border-right:#ddd 1px solid}.search_categories input[type=checkbox]:checked+label,#categories input[type=checkbox]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#main-logo{margin-top:10vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}#q{box-shadow:none;border-right:none;border-color:#a4a4a4}#search_form .input-group-btn .btn{border-color:#a4a4a4}#search_form .input-group-btn .btn:hover{background-color:#2ecc71;color:#fff}.custom-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;color:#666;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAQAAACR313BAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAABFkAAARZAVnbJUkAAAAHdElNRQfgBxgLDwB20OFsAAAAbElEQVQY073OsQ3CMAAEwJMYwJGnsAehpoXJItltBkmcdZBYgIIiQoLglnz3ui+eP+bk5uneteTMZJa6OJuIqvYzSJoqwqBq8gdmTTW86/dghxAUq4xsVYT9laBYXCw93Aajh7GPEF23t4fkBYevGFTANkPRAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA3LTI0VDExOjU1OjU4KzAyOjAwRFqFOQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0wNy0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) 96% no-repeat}.search-margin{margin-bottom:.6em}#advanced-search-container{display:none;text-align:left;margin-bottom:1rem;clear:both}#advanced-search-container label,#advanced-search-container .input-group-addon{font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-right:.7rem;padding-left:.7rem}#advanced-search-container label:last-child,#advanced-search-container .input-group-addon:last-child{border-right:#ddd 1px solid}#advanced-search-container input[type=radio]{display:none}#advanced-search-container input[type=radio]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#check-advanced{display:none}#check-advanced:checked~#advanced-search-container{display:block}.advanced{padding:0;margin-top:.3rem;text-align:right}.advanced label,.advanced select{cursor:pointer}.cursor-text{cursor:text!important}.cursor-pointer{cursor:pointer!important}pre,code{font-family:'Ubuntu Mono','Courier New','Lucida Console',monospace!important}.lineno{margin-right:5px}.highlight .hll{background-color:#ffc}.highlight{background:#f8f8f8}.highlight .c{color:#556366;font-style:italic}.highlight .err{border:1px solid #ffa92f}.highlight .k{color:#BE74D5;font-weight:700}.highlight .o{color:#d19a66}.highlight .cm{color:#556366;font-style:italic}.highlight .cp{color:#bc7a00}.highlight .c1{color:#556366;font-style:italic}.highlight .cs{color:#556366;font-style:italic}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04d}.highlight .kc{color:#BE74D5;font-weight:700}.highlight .kd{color:#BE74D5;font-weight:700}.highlight .kn{color:#BE74D5;font-weight:700}.highlight .kp{color:#be74d5}.highlight .kr{color:#BE74D5;font-weight:700}.highlight .kt{color:#d46c72}.highlight .m{color:#d19a66}.highlight .s{color:#86c372}.highlight .na{color:#7d9029}.highlight .nb{color:#be74d5}.highlight .nc{color:#61AFEF;font-weight:700}.highlight .no{color:#d19a66}.highlight .nd{color:#a2f}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#61afef}.highlight .nl{color:#a0a000}.highlight .nn{color:#61AFEF;font-weight:700}.highlight .nt{color:#BE74D5;font-weight:700}.highlight .nv{color:#dfc06f}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#d7dae0}.highlight .mf{color:#d19a66}.highlight .mh{color:#d19a66}.highlight .mi{color:#d19a66}.highlight .mo{color:#d19a66}.highlight .sb{color:#86c372}.highlight .sc{color:#86c372}.highlight .sd{color:#86C372;font-style:italic}.highlight .s2{color:#86c372}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#86c372}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:#be74d5}.highlight .sr{color:#b68}.highlight .s1{color:#86c372}.highlight .ss{color:#dfc06f}.highlight .bp{color:#be74d5}.highlight .vc{color:#dfc06f}.highlight .vg{color:#dfc06f}.highlight .vi{color:#dfc06f}.highlight .il{color:#d19a66}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;color:#556366}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.highlight pre{background-color:#282C34;color:#D7DAE0;border:none;margin-bottom:25px;font-size:15px;padding:20px 10px}.highlight{font-weight:700}.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}body{background:#1d1f21 none!important;color:#D5D8D7!important}a{color:#41a2ce!important;text-decoration:none!important}a:hover{color:#5F89AC!important}input,button,textarea,select{border:1px solid #282a2e!important;background-color:#444!important;color:#BBB!important}input:focus,button:focus,textarea:focus,select:focus{border:1px solid #C5C8C6!important;box-shadow:initial!important}div#advanced-search-container div#categories label{background:0 0;border:1px solid #282a2e}ul.nav li a{border:0!important;border-bottom:1px solid #4d3f43!important}#categories *,.modal-wrapper *{background:#1d1f21 none!important;color:#D5D8D7!important}#categories *{border:1px solid #3d3f43!important}#categories :checked+label{border-bottom:4px solid #3d9f94!important}.result-content,.result-source,.result-format{color:#B5B8B7!important}.external-link{color:#35B887!important}.table-striped tr td,.table-striped tr th{border-color:#4d3f43!important}.highlight{background:#333!important}.navbar{background:#1d1f21 none;border:none}.navbar .active,.menu{background:none!important}.label-default{background:0 0;color:#BBB}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus,.nav-tabs.nav-justified>.active>a{background-color:#282a2e!important}.result-default:hover,.result-code:hover,.result-torrent:hover,.result-videos:hover,.result-map:hover{background-color:#222426}.btn{color:#BBB;background-color:#444;border:1px solid #282a2e}.btn:hover{color:#444!important;background-color:#BBB!important}.btn-primary.active{color:#C5C8C6;background-color:#5F89AC;border-color:#5F89AC}.panel{border:1px solid #111;background:0 0}.panel-heading{color:#C5C8C6!important;background:#282a2e!important;border-bottom:none}.panel-body{color:#C5C8C6!important;background:#1d1f21!important;border-color:#111!important}p.btn.btn-default{background:0 0}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th,.table-striped>thead>tr:nth-child(odd)>th{background:#2d2f32 none!important;color:#D5D8D7!important}.label-success{background:#1d6f42 none!important}.label-danger{background:#ad1f12 none!important}.searx-navbar{background:#333334;height:2.3rem;font-size:1.3rem;line-height:1.3rem;padding:.5rem;font-weight:700;margin-bottom:.8rem}.searx-navbar a,.searx-navbar a:hover{margin-right:2rem;color:#fff;text-decoration:none}.searx-navbar .instance a{color:#01d7d4;margin-left:2rem}#main-logo{margin-top:20vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}.onoffswitch-inner:before,.onoffswitch-inner:after{background:#1d1f21 none!important}.onoffswitch-switch,.onoffswitch-label{border:2px solid #3d3f43!important}.nav>li>a:hover,.nav>li>a:focus{background-color:#3d3f43!important}.img-thumbnail,.thumbnail{padding:0;line-height:1.42857143;background:0 0;border:none}.modal-content{background:#1d1f21 none!important}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background:rgba(240,0,0,.56)!important;color:#C5C8C6!important}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background:rgba(237,59,59,.61)!important;color:#C5C8C6!important}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background:#66696e!important}.btn-success{color:#C5C8C6;background:#449d44}.btn-danger{color:#C5C8C6;background:#d9534f}.well{background:#444;border-color:#282a2e}.highlight{background-color:transparent!important}
1+*{border-radius:0!important}html{position:relative;min-height:100%;color:#29314d}body{font-family:Roboto,Helvetica,Arial,sans-serif;margin-bottom:80px;background-color:#fff}body a{color:#08c}.footer{position:absolute;bottom:0;width:100%;height:60px;text-align:center;color:#999}input[type=checkbox]:checked+.label_hide_if_checked,input[type=checkbox]:checked+.label_hide_if_not_checked+.label_hide_if_checked{display:none}input[type=checkbox]:not(:checked)+.label_hide_if_not_checked,input[type=checkbox]:not(:checked)+.label_hide_if_checked+.label_hide_if_not_checked{display:none}.onoff-checkbox{width:15%}.onoffswitch{position:relative;width:110px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{opacity:0;position:absolute}.onoffswitch-checkbox:before{content:"";display:inline-block;width:16px;height:16px;margin-right:10px;position:absolute;left:0;bottom:1px;background-color:#fff;border:1px solid #ccc;border-radius:0}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #FFF!important;border-radius:50px!important}.onoffswitch-inner{display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner:before,.onoffswitch-inner:after{display:block;float:left;width:50%;height:30px;padding:0;line-height:40px;font-size:20px;box-sizing:border-box;content:"";background-color:#EEE}.onoffswitch-switch{display:block;width:37px;background-color:#01d7d4;position:absolute;top:0;bottom:0;right:0;border:2px solid #FFF;border-radius:50px!important;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-right:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:71px;background-color:#A1A1A1}.onoffswitch-checkbox:focus+.onoffswitch-label .onoffswitch-switch{border:3px solid #444}.result_header{margin-top:0;margin-bottom:2px;font-size:16px}.result_header .favicon{margin-bottom:-3px}.result_header a{color:#29314d;text-decoration:none}.result_header a:hover{color:#08c}.result_header a:visited{color:#684898}.result_header a .highlight{background-color:#f6f9fa}.result-content,.result-format,.result-source{margin-top:2px;margin-bottom:0;word-wrap:break-word;color:#666;font-size:13px}.result-content .highlight,.result-format .highlight,.result-source .highlight{font-weight:700}.result-source{font-size:10px;float:left}.result-format{font-size:10px;float:right}.external-link{color:#069025;font-size:12px;margin-bottom:15px}.external-link a{margin-right:3px}.result-default,.result-code,.result-torrent,.result-videos,.result-map{clear:both;padding:.5em 4px}.result-default:hover,.result-code:hover,.result-torrent:hover,.result-videos:hover,.result-map:hover{background-color:#f6f9fa}.result-images{float:left!important;width:24%;margin:.5%}.result-images a{display:block;width:100%;background-size:cover}.img-thumbnail{margin:5px;max-height:128px;min-height:128px}.result-videos{clear:both}.result-videos hr{margin:5px 0 15px 0}.result-videos .collapse{width:100%}.result-videos .in{margin-bottom:8px}.result-torrent{clear:both}.result-torrent b{margin-right:5px;margin-left:5px}.result-torrent .seeders{color:#2ecc71}.result-torrent .leechers{color:#f35e77}.result-map{clear:both}.result-code{clear:both}.result-code .code-fork,.result-code .code-fork a{color:#666}.suggestion_item{margin:2px 5px;max-width:100%}.suggestion_item .btn{max-width:100%;white-space:normal;word-wrap:break-word;text-align:left}.result_download{margin-right:5px}#pagination{margin-top:30px;padding-bottom:60px}.label-default{color:#a4a4a4;background:0 0}.result .text-muted small{word-wrap:break-word}.modal-wrapper{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-wrapper{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0 none;position:relative}@media screen and (max-width:75em){.img-thumbnail{object-fit:cover}}.infobox .panel-heading{background-color:#f6f9fa}.infobox .panel-heading .panel-title{font-weight:700}.infobox p{font-family:"DejaVu Serif",Georgia,Cambria,"Times New Roman",Times,serif!important;font-style:italic}.infobox .btn{background-color:#2ecc71;border:none}.infobox .btn a{color:#fff;margin:5px}.infobox .infobox_part{margin-bottom:20px;word-wrap:break-word;table-layout:fixed}.infobox .infobox_part:last-child{margin-bottom:0}.search_categories,#categories{text-transform:capitalize;margin-bottom:.5rem;display:flex;flex-wrap:wrap;flex-flow:row wrap;align-content:stretch}.search_categories label,#categories label,.search_categories .input-group-addon,#categories .input-group-addon{flex-grow:1;flex-basis:auto;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-top:.4rem;text-align:center;min-width:50px}.search_categories label:last-child,#categories label:last-child,.search_categories .input-group-addon:last-child,#categories .input-group-addon:last-child{border-right:#ddd 1px solid}.search_categories input[type=checkbox]:checked+label,#categories input[type=checkbox]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#main-logo{margin-top:10vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}#q{box-shadow:none;border-right:none;border-color:#a4a4a4}#search_form .input-group-btn .btn{border-color:#a4a4a4}#search_form .input-group-btn .btn:hover{background-color:#2ecc71;color:#fff}.custom-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;color:#666;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAQAAACR313BAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAABFkAAARZAVnbJUkAAAAHdElNRQfgBxgLDwB20OFsAAAAbElEQVQY073OsQ3CMAAEwJMYwJGnsAehpoXJItltBkmcdZBYgIIiQoLglnz3ui+eP+bk5uneteTMZJa6OJuIqvYzSJoqwqBq8gdmTTW86/dghxAUq4xsVYT9laBYXCw93Aajh7GPEF23t4fkBYevGFTANkPRAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA3LTI0VDExOjU1OjU4KzAyOjAwRFqFOQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0wNy0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) 96% no-repeat}.search-margin{margin-bottom:.6em}.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);white-space:nowrap}#advanced-search-container{display:none;text-align:left;margin-bottom:1rem;clear:both}#advanced-search-container label,#advanced-search-container .input-group-addon{font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-right:.7rem;padding-left:.7rem}#advanced-search-container label:last-child,#advanced-search-container .input-group-addon:last-child{border-right:#ddd 1px solid}#advanced-search-container input[type=radio]{display:none}#advanced-search-container input[type=radio]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#check-advanced:focus+label{text-decoration:underline}#check-advanced:checked~#advanced-search-container{display:block}.advanced{padding:0;margin-top:.3rem;text-align:right}.advanced label,.advanced select{cursor:pointer}.cursor-text{cursor:text!important}.cursor-pointer{cursor:pointer!important}pre,code{font-family:'Ubuntu Mono','Courier New','Lucida Console',monospace!important}.lineno{margin-right:5px}.highlight .hll{background-color:#ffc}.highlight{background:#f8f8f8}.highlight .c{color:#556366;font-style:italic}.highlight .err{border:1px solid #ffa92f}.highlight .k{color:#BE74D5;font-weight:700}.highlight .o{color:#d19a66}.highlight .cm{color:#556366;font-style:italic}.highlight .cp{color:#bc7a00}.highlight .c1{color:#556366;font-style:italic}.highlight .cs{color:#556366;font-style:italic}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04d}.highlight .kc{color:#BE74D5;font-weight:700}.highlight .kd{color:#BE74D5;font-weight:700}.highlight .kn{color:#BE74D5;font-weight:700}.highlight .kp{color:#be74d5}.highlight .kr{color:#BE74D5;font-weight:700}.highlight .kt{color:#d46c72}.highlight .m{color:#d19a66}.highlight .s{color:#86c372}.highlight .na{color:#7d9029}.highlight .nb{color:#be74d5}.highlight .nc{color:#61AFEF;font-weight:700}.highlight .no{color:#d19a66}.highlight .nd{color:#a2f}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#61afef}.highlight .nl{color:#a0a000}.highlight .nn{color:#61AFEF;font-weight:700}.highlight .nt{color:#BE74D5;font-weight:700}.highlight .nv{color:#dfc06f}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#d7dae0}.highlight .mf{color:#d19a66}.highlight .mh{color:#d19a66}.highlight .mi{color:#d19a66}.highlight .mo{color:#d19a66}.highlight .sb{color:#86c372}.highlight .sc{color:#86c372}.highlight .sd{color:#86C372;font-style:italic}.highlight .s2{color:#86c372}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#86c372}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:#be74d5}.highlight .sr{color:#b68}.highlight .s1{color:#86c372}.highlight .ss{color:#dfc06f}.highlight .bp{color:#be74d5}.highlight .vc{color:#dfc06f}.highlight .vg{color:#dfc06f}.highlight .vi{color:#dfc06f}.highlight .il{color:#d19a66}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;color:#556366}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.highlight pre{background-color:#282C34;color:#D7DAE0;border:none;margin-bottom:25px;font-size:15px;padding:20px 10px}.highlight{font-weight:700}.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}body{background:#1d1f21 none!important;color:#D5D8D7!important}a{color:#41a2ce!important;text-decoration:none!important}a:hover{color:#5F89AC!important}input,button,textarea,select{border:1px solid #282a2e!important;background-color:#444!important;color:#BBB!important}input:focus,button:focus,textarea:focus,select:focus{border:1px solid #C5C8C6!important;box-shadow:initial!important}div#advanced-search-container div#categories label{background:0 0;border:1px solid #282a2e}ul.nav li a{border:0!important;border-bottom:1px solid #4d3f43!important}#categories *,.modal-wrapper *{background:#1d1f21 none!important;color:#D5D8D7!important}#categories *{border:1px solid #3d3f43!important}#categories :checked+label{border-bottom:4px solid #3d9f94!important}.result-content,.result-source,.result-format{color:#B5B8B7!important}.external-link{color:#35B887!important}.table-striped tr td,.table-striped tr th{border-color:#4d3f43!important}.highlight{background:#333!important}.navbar{background:#1d1f21 none;border:none}.navbar .active,.menu{background:none!important}.label-default{background:0 0;color:#BBB}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus,.nav-tabs.nav-justified>.active>a{background-color:#282a2e!important}.result-default:hover,.result-code:hover,.result-torrent:hover,.result-videos:hover,.result-map:hover{background-color:#222426}.btn{color:#BBB;background-color:#444;border:1px solid #282a2e}.btn:hover{color:#444!important;background-color:#BBB!important}.btn-primary.active{color:#C5C8C6;background-color:#5F89AC;border-color:#5F89AC}.panel{border:1px solid #111;background:0 0}.panel-heading{color:#C5C8C6!important;background:#282a2e!important;border-bottom:none}.panel-body{color:#C5C8C6!important;background:#1d1f21!important;border-color:#111!important}p.btn.btn-default{background:0 0}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th,.table-striped>thead>tr:nth-child(odd)>th{background:#2d2f32 none!important;color:#D5D8D7!important}.label-success{background:#1d6f42 none!important}.label-danger{background:#ad1f12 none!important}.searx-navbar{background:#333334;height:2.3rem;font-size:1.3rem;line-height:1.3rem;padding:.5rem;font-weight:700;margin-bottom:.8rem}.searx-navbar a,.searx-navbar a:hover{margin-right:2rem;color:#fff;text-decoration:none}.searx-navbar .instance a{color:#01d7d4;margin-left:2rem}#main-logo{margin-top:20vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}.onoffswitch-inner:before,.onoffswitch-inner:after{background:#1d1f21 none!important}.onoffswitch-switch,.onoffswitch-label{border:2px solid #3d3f43!important}.nav>li>a:hover,.nav>li>a:focus{background-color:#3d3f43!important}.img-thumbnail,.thumbnail{padding:0;line-height:1.42857143;background:0 0;border:none}.modal-content{background:#1d1f21 none!important}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background:rgba(240,0,0,.56)!important;color:#C5C8C6!important}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background:rgba(237,59,59,.61)!important;color:#C5C8C6!important}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background:#66696e!important}.btn-success{color:#C5C8C6;background:#449d44}.btn-danger{color:#C5C8C6;background:#d9534f}.well{background:#444;border-color:#282a2e}.highlight{background-color:transparent!important}
searx/static/themes/oscar/css/logicodev.css+32−4
@@ -43,7 +43,21 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
4343 -ms-user-select: none;
4444}
4545.onoffswitch-checkbox {
46− display: none;
46+ opacity: 0;
47+ position: absolute;
48+}
49+.onoffswitch-checkbox:before {
50+ content: "";
51+ display: inline-block;
52+ width: 16px;
53+ height: 16px;
54+ margin-right: 10px;
55+ position: absolute;
56+ left: 0;
57+ bottom: 1px;
58+ background-color: #fff;
59+ border: 1px solid #ccc;
60+ border-radius: 0px;
4761}
4862.onoffswitch-label {
4963 display: block;
@@ -77,7 +91,7 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
7791 top: 0;
7892 bottom: 0;
7993 right: 0px;
80− border: 2px solid #FFFFFF !important;
94+ border: 2px solid #FFFFFF;
8195 border-radius: 50px !important;
8296 transition: all 0.3s ease-in 0s;
8397}
@@ -88,6 +102,9 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not
88102 right: 71px;
89103 background-color: #A1A1A1;
90104}
105+.onoffswitch-checkbox:focus + .onoffswitch-label .onoffswitch-switch {
106+ border: 3px solid #444444;
107+}
91108.result_header {
92109 margin-top: 0px;
93110 margin-bottom: 2px;
@@ -350,6 +367,17 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
350367.search-margin {
351368 margin-bottom: 0.6em;
352369}
370+.visually-hidden {
371+ position: absolute !important;
372+ height: 1px;
373+ width: 1px;
374+ overflow: hidden;
375+ clip: rect(1px 1px 1px 1px);
376+ /* IE6, IE7 */
377+ clip: rect(1px, 1px, 1px, 1px);
378+ white-space: nowrap;
379+ /* added line */
380+}
353381#advanced-search-container {
354382 display: none;
355383 text-align: left;
@@ -380,8 +408,8 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
380408 font-weight: bold;
381409 border-bottom: #01d7d4 5px solid;
382410}
383−#check-advanced {
384− display: none;
411+#check-advanced:focus + label {
412+ text-decoration: underline;
385413}
386414#check-advanced:checked ~ #advanced-search-container {
387415 display: block;
searx/static/themes/oscar/css/logicodev.min.css+1−1
@@ -1 +1 @@
1−.searx-navbar{background:#29314d;height:2.3rem;font-size:1.3rem;line-height:1.3rem;padding:.5rem;font-weight:700;margin-bottom:.8rem}.searx-navbar a,.searx-navbar a:hover{margin-right:2rem;color:#fff;text-decoration:none}.searx-navbar .instance a{color:#01d7d4;margin-left:2rem}#main-logo{margin-top:20vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}*{border-radius:0!important}html{position:relative;min-height:100%;color:#29314d}body{font-family:Roboto,Helvetica,Arial,sans-serif;margin-bottom:80px;background-color:#fff}body a{color:#08c}.footer{position:absolute;bottom:0;width:100%;height:60px;text-align:center;color:#999}input[type=checkbox]:checked+.label_hide_if_checked,input[type=checkbox]:checked+.label_hide_if_not_checked+.label_hide_if_checked{display:none}input[type=checkbox]:not(:checked)+.label_hide_if_not_checked,input[type=checkbox]:not(:checked)+.label_hide_if_checked+.label_hide_if_not_checked{display:none}.onoff-checkbox{width:15%}.onoffswitch{position:relative;width:110px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #FFF!important;border-radius:50px!important}.onoffswitch-inner{display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner:before,.onoffswitch-inner:after{display:block;float:left;width:50%;height:30px;padding:0;line-height:40px;font-size:20px;box-sizing:border-box;content:"";background-color:#EEE}.onoffswitch-switch{display:block;width:37px;background-color:#01d7d4;position:absolute;top:0;bottom:0;right:0;border:2px solid #FFF!important;border-radius:50px!important;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-right:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:71px;background-color:#A1A1A1}.result_header{margin-top:0;margin-bottom:2px;font-size:16px}.result_header .favicon{margin-bottom:-3px}.result_header a{color:#29314d;text-decoration:none}.result_header a:hover{color:#08c}.result_header a:visited{color:#684898}.result_header a .highlight{background-color:#f6f9fa}.result-content,.result-format,.result-source{margin-top:2px;margin-bottom:0;word-wrap:break-word;color:#666;font-size:13px}.result-content .highlight,.result-format .highlight,.result-source .highlight{font-weight:700}.result-source{font-size:10px;float:left}.result-format{font-size:10px;float:right}.external-link{color:#069025;font-size:12px;margin-bottom:15px}.external-link a{margin-right:3px}.result-default,.result-code,.result-torrent,.result-videos,.result-map{clear:both;padding:.5em 4px}.result-default:hover,.result-code:hover,.result-torrent:hover,.result-videos:hover,.result-map:hover{background-color:#f6f9fa}.result-images{float:left!important;width:24%;margin:.5%}.result-images a{display:block;width:100%;background-size:cover}.img-thumbnail{margin:5px;max-height:128px;min-height:128px}.result-videos{clear:both}.result-videos hr{margin:5px 0 15px 0}.result-videos .collapse{width:100%}.result-videos .in{margin-bottom:8px}.result-torrent{clear:both}.result-torrent b{margin-right:5px;margin-left:5px}.result-torrent .seeders{color:#2ecc71}.result-torrent .leechers{color:#f35e77}.result-map{clear:both}.result-code{clear:both}.result-code .code-fork,.result-code .code-fork a{color:#666}.suggestion_item{margin:2px 5px;max-width:100%}.suggestion_item .btn{max-width:100%;white-space:normal;word-wrap:break-word;text-align:left}.result_download{margin-right:5px}#pagination{margin-top:30px;padding-bottom:60px}.label-default{color:#a4a4a4;background:0 0}.result .text-muted small{word-wrap:break-word}.modal-wrapper{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-wrapper{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0 none;position:relative}@media screen and (max-width:75em){.img-thumbnail{object-fit:cover}}.infobox .panel-heading{background-color:#f6f9fa}.infobox .panel-heading .panel-title{font-weight:700}.infobox p{font-family:"DejaVu Serif",Georgia,Cambria,"Times New Roman",Times,serif!important;font-style:italic}.infobox .btn{background-color:#2ecc71;border:none}.infobox .btn a{color:#fff;margin:5px}.infobox .infobox_part{margin-bottom:20px;word-wrap:break-word;table-layout:fixed}.infobox .infobox_part:last-child{margin-bottom:0}.search_categories,#categories{text-transform:capitalize;margin-bottom:.5rem;display:flex;flex-wrap:wrap;flex-flow:row wrap;align-content:stretch}.search_categories label,#categories label,.search_categories .input-group-addon,#categories .input-group-addon{flex-grow:1;flex-basis:auto;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-top:.4rem;text-align:center;min-width:50px}.search_categories label:last-child,#categories label:last-child,.search_categories .input-group-addon:last-child,#categories .input-group-addon:last-child{border-right:#ddd 1px solid}.search_categories input[type=checkbox]:checked+label,#categories input[type=checkbox]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#main-logo{margin-top:10vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}#q{box-shadow:none;border-right:none;border-color:#a4a4a4}#search_form .input-group-btn .btn{border-color:#a4a4a4}#search_form .input-group-btn .btn:hover{background-color:#2ecc71;color:#fff}.custom-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;color:#666;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAQAAACR313BAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAABFkAAARZAVnbJUkAAAAHdElNRQfgBxgLDwB20OFsAAAAbElEQVQY073OsQ3CMAAEwJMYwJGnsAehpoXJItltBkmcdZBYgIIiQoLglnz3ui+eP+bk5uneteTMZJa6OJuIqvYzSJoqwqBq8gdmTTW86/dghxAUq4xsVYT9laBYXCw93Aajh7GPEF23t4fkBYevGFTANkPRAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA3LTI0VDExOjU1OjU4KzAyOjAwRFqFOQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0wNy0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) 96% no-repeat}.search-margin{margin-bottom:.6em}#advanced-search-container{display:none;text-align:left;margin-bottom:1rem;clear:both}#advanced-search-container label,#advanced-search-container .input-group-addon{font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-right:.7rem;padding-left:.7rem}#advanced-search-container label:last-child,#advanced-search-container .input-group-addon:last-child{border-right:#ddd 1px solid}#advanced-search-container input[type=radio]{display:none}#advanced-search-container input[type=radio]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#check-advanced{display:none}#check-advanced:checked~#advanced-search-container{display:block}.advanced{padding:0;margin-top:.3rem;text-align:right}.advanced label,.advanced select{cursor:pointer}.cursor-text{cursor:text!important}.cursor-pointer{cursor:pointer!important}pre,code{font-family:'Ubuntu Mono','Courier New','Lucida Console',monospace!important}.lineno{margin-right:5px}.highlight .hll{background-color:#ffc}.highlight{background:#f8f8f8}.highlight .c{color:#556366;font-style:italic}.highlight .err{border:1px solid #ffa92f}.highlight .k{color:#BE74D5;font-weight:700}.highlight .o{color:#d19a66}.highlight .cm{color:#556366;font-style:italic}.highlight .cp{color:#bc7a00}.highlight .c1{color:#556366;font-style:italic}.highlight .cs{color:#556366;font-style:italic}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04d}.highlight .kc{color:#BE74D5;font-weight:700}.highlight .kd{color:#BE74D5;font-weight:700}.highlight .kn{color:#BE74D5;font-weight:700}.highlight .kp{color:#be74d5}.highlight .kr{color:#BE74D5;font-weight:700}.highlight .kt{color:#d46c72}.highlight .m{color:#d19a66}.highlight .s{color:#86c372}.highlight .na{color:#7d9029}.highlight .nb{color:#be74d5}.highlight .nc{color:#61AFEF;font-weight:700}.highlight .no{color:#d19a66}.highlight .nd{color:#a2f}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#61afef}.highlight .nl{color:#a0a000}.highlight .nn{color:#61AFEF;font-weight:700}.highlight .nt{color:#BE74D5;font-weight:700}.highlight .nv{color:#dfc06f}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#d7dae0}.highlight .mf{color:#d19a66}.highlight .mh{color:#d19a66}.highlight .mi{color:#d19a66}.highlight .mo{color:#d19a66}.highlight .sb{color:#86c372}.highlight .sc{color:#86c372}.highlight .sd{color:#86C372;font-style:italic}.highlight .s2{color:#86c372}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#86c372}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:#be74d5}.highlight .sr{color:#b68}.highlight .s1{color:#86c372}.highlight .ss{color:#dfc06f}.highlight .bp{color:#be74d5}.highlight .vc{color:#dfc06f}.highlight .vg{color:#dfc06f}.highlight .vi{color:#dfc06f}.highlight .il{color:#d19a66}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;color:#556366}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.highlight pre{background-color:#282C34;color:#D7DAE0;border:none;margin-bottom:25px;font-size:15px;padding:20px 10px}.highlight{font-weight:700}.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}
1+.searx-navbar{background:#29314d;height:2.3rem;font-size:1.3rem;line-height:1.3rem;padding:.5rem;font-weight:700;margin-bottom:.8rem}.searx-navbar a,.searx-navbar a:hover{margin-right:2rem;color:#fff;text-decoration:none}.searx-navbar .instance a{color:#01d7d4;margin-left:2rem}#main-logo{margin-top:20vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}*{border-radius:0!important}html{position:relative;min-height:100%;color:#29314d}body{font-family:Roboto,Helvetica,Arial,sans-serif;margin-bottom:80px;background-color:#fff}body a{color:#08c}.footer{position:absolute;bottom:0;width:100%;height:60px;text-align:center;color:#999}input[type=checkbox]:checked+.label_hide_if_checked,input[type=checkbox]:checked+.label_hide_if_not_checked+.label_hide_if_checked{display:none}input[type=checkbox]:not(:checked)+.label_hide_if_not_checked,input[type=checkbox]:not(:checked)+.label_hide_if_checked+.label_hide_if_not_checked{display:none}.onoff-checkbox{width:15%}.onoffswitch{position:relative;width:110px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{opacity:0;position:absolute}.onoffswitch-checkbox:before{content:"";display:inline-block;width:16px;height:16px;margin-right:10px;position:absolute;left:0;bottom:1px;background-color:#fff;border:1px solid #ccc;border-radius:0}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #FFF!important;border-radius:50px!important}.onoffswitch-inner{display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner:before,.onoffswitch-inner:after{display:block;float:left;width:50%;height:30px;padding:0;line-height:40px;font-size:20px;box-sizing:border-box;content:"";background-color:#EEE}.onoffswitch-switch{display:block;width:37px;background-color:#01d7d4;position:absolute;top:0;bottom:0;right:0;border:2px solid #FFF;border-radius:50px!important;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-right:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:71px;background-color:#A1A1A1}.onoffswitch-checkbox:focus+.onoffswitch-label .onoffswitch-switch{border:3px solid #444}.result_header{margin-top:0;margin-bottom:2px;font-size:16px}.result_header .favicon{margin-bottom:-3px}.result_header a{color:#29314d;text-decoration:none}.result_header a:hover{color:#08c}.result_header a:visited{color:#684898}.result_header a .highlight{background-color:#f6f9fa}.result-content,.result-format,.result-source{margin-top:2px;margin-bottom:0;word-wrap:break-word;color:#666;font-size:13px}.result-content .highlight,.result-format .highlight,.result-source .highlight{font-weight:700}.result-source{font-size:10px;float:left}.result-format{font-size:10px;float:right}.external-link{color:#069025;font-size:12px;margin-bottom:15px}.external-link a{margin-right:3px}.result-default,.result-code,.result-torrent,.result-videos,.result-map{clear:both;padding:.5em 4px}.result-default:hover,.result-code:hover,.result-torrent:hover,.result-videos:hover,.result-map:hover{background-color:#f6f9fa}.result-images{float:left!important;width:24%;margin:.5%}.result-images a{display:block;width:100%;background-size:cover}.img-thumbnail{margin:5px;max-height:128px;min-height:128px}.result-videos{clear:both}.result-videos hr{margin:5px 0 15px 0}.result-videos .collapse{width:100%}.result-videos .in{margin-bottom:8px}.result-torrent{clear:both}.result-torrent b{margin-right:5px;margin-left:5px}.result-torrent .seeders{color:#2ecc71}.result-torrent .leechers{color:#f35e77}.result-map{clear:both}.result-code{clear:both}.result-code .code-fork,.result-code .code-fork a{color:#666}.suggestion_item{margin:2px 5px;max-width:100%}.suggestion_item .btn{max-width:100%;white-space:normal;word-wrap:break-word;text-align:left}.result_download{margin-right:5px}#pagination{margin-top:30px;padding-bottom:60px}.label-default{color:#a4a4a4;background:0 0}.result .text-muted small{word-wrap:break-word}.modal-wrapper{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-wrapper{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0 none;position:relative}@media screen and (max-width:75em){.img-thumbnail{object-fit:cover}}.infobox .panel-heading{background-color:#f6f9fa}.infobox .panel-heading .panel-title{font-weight:700}.infobox p{font-family:"DejaVu Serif",Georgia,Cambria,"Times New Roman",Times,serif!important;font-style:italic}.infobox .btn{background-color:#2ecc71;border:none}.infobox .btn a{color:#fff;margin:5px}.infobox .infobox_part{margin-bottom:20px;word-wrap:break-word;table-layout:fixed}.infobox .infobox_part:last-child{margin-bottom:0}.search_categories,#categories{text-transform:capitalize;margin-bottom:.5rem;display:flex;flex-wrap:wrap;flex-flow:row wrap;align-content:stretch}.search_categories label,#categories label,.search_categories .input-group-addon,#categories .input-group-addon{flex-grow:1;flex-basis:auto;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-top:.4rem;text-align:center;min-width:50px}.search_categories label:last-child,#categories label:last-child,.search_categories .input-group-addon:last-child,#categories .input-group-addon:last-child{border-right:#ddd 1px solid}.search_categories input[type=checkbox]:checked+label,#categories input[type=checkbox]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#main-logo{margin-top:10vh;margin-bottom:25px}#main-logo>img{max-width:350px;width:80%}#q{box-shadow:none;border-right:none;border-color:#a4a4a4}#search_form .input-group-btn .btn{border-color:#a4a4a4}#search_form .input-group-btn .btn:hover{background-color:#2ecc71;color:#fff}.custom-select{appearance:none;-webkit-appearance:none;-moz-appearance:none;font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;color:#666;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAQAAACR313BAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAABFkAAARZAVnbJUkAAAAHdElNRQfgBxgLDwB20OFsAAAAbElEQVQY073OsQ3CMAAEwJMYwJGnsAehpoXJItltBkmcdZBYgIIiQoLglnz3ui+eP+bk5uneteTMZJa6OJuIqvYzSJoqwqBq8gdmTTW86/dghxAUq4xsVYT9laBYXCw93Aajh7GPEF23t4fkBYevGFTANkPRAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE2LTA3LTI0VDExOjU1OjU4KzAyOjAwRFqFOQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNi0wNy0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC) 96% no-repeat}.search-margin{margin-bottom:.6em}.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);white-space:nowrap}#advanced-search-container{display:none;text-align:left;margin-bottom:1rem;clear:both}#advanced-search-container label,#advanced-search-container .input-group-addon{font-size:1.2rem;font-weight:400;background-color:#fff;border:#ddd 1px solid;border-right:none;color:#666;padding-bottom:.4rem;padding-right:.7rem;padding-left:.7rem}#advanced-search-container label:last-child,#advanced-search-container .input-group-addon:last-child{border-right:#ddd 1px solid}#advanced-search-container input[type=radio]{display:none}#advanced-search-container input[type=radio]:checked+label{color:#29314d;font-weight:700;border-bottom:#01d7d4 5px solid}#check-advanced:focus+label{text-decoration:underline}#check-advanced:checked~#advanced-search-container{display:block}.advanced{padding:0;margin-top:.3rem;text-align:right}.advanced label,.advanced select{cursor:pointer}.cursor-text{cursor:text!important}.cursor-pointer{cursor:pointer!important}pre,code{font-family:'Ubuntu Mono','Courier New','Lucida Console',monospace!important}.lineno{margin-right:5px}.highlight .hll{background-color:#ffc}.highlight{background:#f8f8f8}.highlight .c{color:#556366;font-style:italic}.highlight .err{border:1px solid #ffa92f}.highlight .k{color:#BE74D5;font-weight:700}.highlight .o{color:#d19a66}.highlight .cm{color:#556366;font-style:italic}.highlight .cp{color:#bc7a00}.highlight .c1{color:#556366;font-style:italic}.highlight .cs{color:#556366;font-style:italic}.highlight .gd{color:#a00000}.highlight .ge{font-style:italic}.highlight .gr{color:red}.highlight .gh{color:navy;font-weight:700}.highlight .gi{color:#00a000}.highlight .go{color:#888}.highlight .gp{color:navy;font-weight:700}.highlight .gs{font-weight:700}.highlight .gu{color:purple;font-weight:700}.highlight .gt{color:#04d}.highlight .kc{color:#BE74D5;font-weight:700}.highlight .kd{color:#BE74D5;font-weight:700}.highlight .kn{color:#BE74D5;font-weight:700}.highlight .kp{color:#be74d5}.highlight .kr{color:#BE74D5;font-weight:700}.highlight .kt{color:#d46c72}.highlight .m{color:#d19a66}.highlight .s{color:#86c372}.highlight .na{color:#7d9029}.highlight .nb{color:#be74d5}.highlight .nc{color:#61AFEF;font-weight:700}.highlight .no{color:#d19a66}.highlight .nd{color:#a2f}.highlight .ni{color:#999;font-weight:700}.highlight .ne{color:#D2413A;font-weight:700}.highlight .nf{color:#61afef}.highlight .nl{color:#a0a000}.highlight .nn{color:#61AFEF;font-weight:700}.highlight .nt{color:#BE74D5;font-weight:700}.highlight .nv{color:#dfc06f}.highlight .ow{color:#A2F;font-weight:700}.highlight .w{color:#d7dae0}.highlight .mf{color:#d19a66}.highlight .mh{color:#d19a66}.highlight .mi{color:#d19a66}.highlight .mo{color:#d19a66}.highlight .sb{color:#86c372}.highlight .sc{color:#86c372}.highlight .sd{color:#86C372;font-style:italic}.highlight .s2{color:#86c372}.highlight .se{color:#B62;font-weight:700}.highlight .sh{color:#86c372}.highlight .si{color:#B68;font-weight:700}.highlight .sx{color:#be74d5}.highlight .sr{color:#b68}.highlight .s1{color:#86c372}.highlight .ss{color:#dfc06f}.highlight .bp{color:#be74d5}.highlight .vc{color:#dfc06f}.highlight .vg{color:#dfc06f}.highlight .vi{color:#dfc06f}.highlight .il{color:#d19a66}.highlight .lineno{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;color:#556366}.highlight .lineno::selection{background:0 0}.highlight .lineno::-moz-selection{background:0 0}.highlight pre{background-color:#282C34;color:#D7DAE0;border:none;margin-bottom:25px;font-size:15px;padding:20px 10px}.highlight{font-weight:700}.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}
searx/static/themes/oscar/less/logicodev/advanced.less+2−2
@@ -31,8 +31,8 @@
3131 }
3232}
3333
34−#check-advanced {
35− display: none;
34+#check-advanced:focus + label {
35+ text-decoration: underline;
3636}
3737
3838#check-advanced:checked ~ #advanced-search-container {
searx/static/themes/oscar/less/logicodev/onoff.less+19−2
@@ -9,7 +9,21 @@
99 -ms-user-select: none;
1010}
1111.onoffswitch-checkbox {
12− display: none;
12+ opacity: 0;
13+ position: absolute;
14+}
15+.onoffswitch-checkbox:before {
16+ content: "";
17+ display: inline-block;
18+ width: 16px;
19+ height: 16px;
20+ margin-right: 10px;
21+ position: absolute;
22+ left: 0;
23+ bottom: 1px;
24+ background-color: #fff;
25+ border: 1px solid #ccc;
26+ border-radius: 0px;
1327}
1428.onoffswitch-label {
1529 display: block;
@@ -44,7 +58,7 @@
4458 top: 0;
4559 bottom: 0;
4660 right: 0px;
47− border: 2px solid #FFFFFF !important;
61+ border: 2px solid #FFFFFF;
4862 border-radius: 50px !important;
4963 transition: all 0.3s ease-in 0s;
5064}
@@ -55,3 +69,6 @@
5569 right: 71px;
5670 background-color: #A1A1A1;
5771}
72+.onoffswitch-checkbox:focus + .onoffswitch-label .onoffswitch-switch {
73+ border: 3px solid #444444;
74+}
searx/static/themes/oscar/less/logicodev/search.less+11−1
@@ -77,4 +77,14 @@ Ny0yNFQxMToxNTowMCswMjowMP7RDgQAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb
7777
7878.search-margin {
7979 margin-bottom: 0.6em;
80−}
80+}
81+
82+.visually-hidden {
83+ position: absolute !important;
84+ height: 1px;
85+ width: 1px;
86+ overflow: hidden;
87+ clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
88+ clip: rect(1px, 1px, 1px, 1px);
89+ white-space: nowrap; /* added line */
90+}
searx/templates/__common__/about.html+9−5
@@ -59,12 +59,16 @@
5959
6060 <h2 id='add to browser'>How to set as the default search engine?</h2>
6161
62− <dt>Firefox</dt>
62+ <p>
63+ Searx supports <a href="https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md">OpenSearch</a>.
64+ For more information on changing your default search engine, see your browser's documentation:
65+ </p>
6366
64− <dd>
65− <a href="#" onclick="window.external.AddSearchProvider(window.location.protocol + '//' + window.location.host + '{{ url_for('opensearch') }}');">Install</a>
66− searx as a search engine on any version of Firefox! (javascript required)
67− </dd>
67+ <ul>
68+ <li><a href="https://support.mozilla.org/en-US/kb/add-or-remove-search-engine-firefox">Firefox</a></li>
69+ <li><a href="https://support.microsoft.com/en-us/help/4028574/microsoft-edge-change-the-default-search-engine" >Microsoft Egde</a></li>
70+ <li>Chrome based browsers <a href="https://www.chromium.org/tab-to-search">only add websites that the user navigates to without a path.</a>
71+ </ul>
6872
6973 <h2>Where to find anonymous usage statistics of this instance ?</h2>
7074
searx/templates/oscar/advanced.html+1−1
@@ -1,4 +1,4 @@
1−<input type="checkbox" name="advanced_search" id="check-advanced" {% if advanced_search %} checked="checked"{% endif %}>
1+<input type="checkbox" name="advanced_search" class="visually-hidden" id="check-advanced" {% if advanced_search %} checked="checked"{% endif %}>
22<label for="check-advanced">{{- "" -}}
33 <span class="glyphicon glyphicon-cog"></span>
44 {{- _('Advanced settings') -}}
searx/templates/oscar/base.html+3−3
@@ -1,6 +1,6 @@
11{% from 'oscar/macros.html' import icon %}
22<!DOCTYPE html>
3−<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}>
3+<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %}>
44<head>
55 <meta charset="UTF-8" />
66 <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" />
@@ -8,7 +8,7 @@
88 <meta http-equiv="X-UA-Compatible" content="IE=edge">
99 <meta name="generator" content="searx/{{ searx_version }}">
1010 <meta name="referrer" content="no-referrer">
11− <meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=1.0, user-scalable=1" />
11+ <meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" />
1212 {% block meta %}{% endblock %}
1313 <script src="{{ url_for('js_translations') }}"></script>
1414 <title>{% block title %}{% endblock %}{{ instance_name }}</title>
@@ -42,7 +42,7 @@
4242 <style type="text/css">
4343 .tab-content > .active_if_nojs, .active_if_nojs {display: block !important; visibility: visible !important;}
4444 .margin_top_if_nojs {margin-top: 20px;}
45− .hide_if_nojs {display: none !important;overflow:none !important;}
45+ .hide_if_nojs {display: none !important;overflow: hidden !important;}
4646 .disabled_if_nojs {pointer-events: none; cursor: default; text-decoration: line-through;}
4747 </style>
4848 </noscript>
searx/templates/oscar/index.html+2−2
@@ -6,10 +6,10 @@
66 {% if cookies['oscar-style'] == 'pointhi' %}
77 <h1 class="text-hide center-block"><img class="center-block img-responsive" src="{{ url_for('static', filename='img/searx_logo.png') }}" alt="searx logo"/>searx</h1>
88 {% else %}
9− <h1 class="text-hide center-block" id="main-logo">
9+ <div class="text-hide center-block" id="main-logo">
1010 <img class="center-block img-responsive" src="{{ url_for('static', filename='img/logo_searx_a.png') }}" alt="searx logo" />
1111 searx
12− </h1>
12+ </div>
1313 {% endif %}
1414 </div>
1515 </div>
searx/templates/oscar/infobox.html+1−1
@@ -5,7 +5,7 @@
55 {% for u in infobox.urls %}{% if u.official %} <a href="{{ u.url }}">{{ u.domain }}</a>{% endif %}{% endfor %}
66 </div>
77 <div class="panel-body">
8− {% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" alt="{{ infobox.infobox }}" />{% endif %}
8+ {% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" />{% endif %}
99
1010 {% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content | safe }}</p></bdi>{% endif %}
1111
searx/templates/oscar/languages.html+1
@@ -1,3 +1,4 @@
1+<label class="visually-hidden" for="language">{{ _('Language') }}</label>
12<select class="language custom-select form-control" id="language" name="language" accesskey="l">
23 <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
34{%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
searx/templates/oscar/macros.html+17−16
@@ -8,34 +8,34 @@
88 <img width="32" height="32" class="favicon" src="{{ url_for('static', filename='themes/oscar/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}" />
99{%- endmacro %}
1010
11−{%- macro result_link(url, title, classes='') -%}
12−<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ title }}</a>
11+{%- macro result_link(url, title, classes='', id='') -%}
12+<a href="{{ url }}" {% if classes %}class="{{ classes }}" {% endif %}{% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}{% if id %} aria-labelledby="result-{{id}}"{%endif%}>{{ title }}</a>
1313{%- endmacro -%}
1414
1515<!-- Draw result header -->
16−{% macro result_header(result, favicons) -%}
17−<h4 class="result_header">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe) }}{% else %}{{ result.title|safe}}{% endif %}</h4>
16+{% macro result_header(result, favicons, id) -%}
17+<h4 class="result_header" id="result-{{id}}">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe, id=id) }}{% else %}{{ result.title|safe}}{% endif %}</h4>
1818{%- endmacro %}
1919
2020<!-- Draw result sub header -->
21−{% macro result_sub_header(result) -%}
21+{% macro result_sub_header(result, id) -%}
2222 {% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
23− {% if result.magnetlink %}<small> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}</small>{% endif %}
24− {% if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}</small>{% endif %}
23+ {% if result.magnetlink %}<small> &bull; {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink", id) }}</small>{% endif %}
24+ {% if result.torrentfile %}<small> &bull; {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile", id) }}</small>{% endif %}
2525{%- endmacro %}
2626
2727<!-- Draw result footer -->
28−{% macro result_footer(result) -%}
28+{% macro result_footer(result, id) -%}
2929 <div class="clearfix"></div>{{- "" -}}
3030 <div class="pull-right">
3131 {%- for engine in result.engines -%}
3232 <span class="label label-default">{{ engine }}</span>
3333 {%- endfor -%}
3434 {%- if result.url -%}
35− <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
35+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
3636 {%- endif -%}
3737 {%- if proxify -%}
38− <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
38+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
3939 {%- endif -%}
4040 </div>
4141 {%- if result.pretty_url -%}
@@ -44,31 +44,31 @@
4444{%- endmacro %}
4545
4646<!-- Draw result footer -->
47−{% macro result_footer_rtl(result) -%}
47+{% macro result_footer_rtl(result, id) -%}
4848 <div class="clearfix"></div>{{- "" -}}
4949 {% for engine in result.engines -%}
5050 <span class="label label-default">{{ engine }}</span>
5151 {%- endfor %}
5252 {%- if result.url -%}
53− <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}</small>
53+ <small>{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info", id) }}</small>
5454 {%- endif -%}
5555 {% if proxify -%}
56− <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}</small>
56+ <small>{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info", id) }}</small>
5757 {%- endif %}
5858 {%- if result.pretty_url -%}
5959 <div class="external-link">{{ result.pretty_url }}</div>
6060 {%- endif %}
6161{%- endmacro %}
6262
63−{% macro preferences_item_header(info, label, rtl) -%}
63+{% macro preferences_item_header(info, label, rtl, id) -%}
6464 {% if rtl %}
6565 <div class="row form-group">
66− <label class="col-sm-3 col-md-2 pull-right">{{ label }}</label>
66+ <label class="col-sm-3 col-md-2 pull-right"{% if id %} for="{{id}}"{% endif %}>{{ label }}</label>
6767 <span class="col-sm-5 col-md-6 help-block pull-left">{{ info }}</span>
6868 <div class="col-sm-4 col-md-4">
6969 {% else %}
7070 <div class="row form-group">
71− <label class="col-sm-3 col-md-2">{{ label }}</label>
71+ <label class="col-sm-3 col-md-2"{% if id %} for="{{id}}"{% endif %}>{{ label }}</label>
7272 <div class="col-sm-4 col-md-4">
7373 {% endif %}
7474{%- endmacro %}
@@ -91,6 +91,7 @@
9191 <span class="onoffswitch-inner"></span>
9292 <span class="onoffswitch-switch"></span>
9393 </label>
94+ <label class="visually-hidden" for="{{ id }}">{{ _('Allow') }}</label>
9495 </div>
9596{%- endmacro %}
9697
searx/templates/oscar/preferences.html+47−47
@@ -30,9 +30,9 @@
3030 <div class="col-sm-11 col-md-10">
3131 {% include 'oscar/categories.html' %}
3232 </div>
33− <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
33+ <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
3434 {% else %}
35− <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
35+ <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
3636 <div class="col-sm-11 col-md-10 search-categories">
3737 {% include 'oscar/categories.html' %}
3838 </div>
@@ -40,14 +40,14 @@
4040 </div>
4141 {% set language_label = _('Search language') %}
4242 {% set language_info = _('What language do you prefer for search?') %}
43− {{ preferences_item_header(language_info, language_label, rtl) }}
43+ {{ preferences_item_header(language_info, language_label, rtl, 'language') }}
4444 {% include 'oscar/languages.html' %}
4545 {{ preferences_item_footer(language_info, language_label, rtl) }}
4646
4747 {% set locale_label = _('Interface language') %}
4848 {% set locale_info = _('Change the language of the layout') %}
49− {{ preferences_item_header(locale_info, locale_label, rtl) }}
50− <select class="form-control" name='locale'>
49+ {{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
50+ <select class="form-control" name="locale" id="locale">
5151 {% for locale_id,locale_name in locales.items() | sort %}
5252 <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
5353 {% endfor %}
@@ -56,8 +56,8 @@
5656
5757 {% set autocomplete_label = _('Autocomplete') %}
5858 {% set autocomplete_info = _('Find stuff as you type') %}
59− {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl) }}
60− <select class="form-control" name="autocomplete">
59+ {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
60+ <select class="form-control" name="autocomplete" id="autocomplete">
6161 <option value=""> - </option>
6262 {% for backend in autocomplete_backends %}
6363 <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
@@ -67,8 +67,8 @@
6767
6868 {% set image_proxy_label = _('Image proxy') %}
6969 {% set image_proxy_info = _('Proxying image results through searx') %}
70− {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl) }}
71− <select class="form-control" name='image_proxy'>
70+ {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
71+ <select class="form-control" name="image_proxy" id="image_proxy">
7272 <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
7373 <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
7474 </select>
@@ -76,8 +76,8 @@
7676
7777 {% set method_label = _('Method') %}
7878 {% set method_info = _('Change how forms are submited, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') %}
79− {{ preferences_item_header(method_info, method_label, rtl) }}
80− <select class="form-control" name='method'>
79+ {{ preferences_item_header(method_info, method_label, rtl, 'method') }}
80+ <select class="form-control" name="method" id="method">
8181 <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
8282 <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
8383 </select>
@@ -85,8 +85,8 @@
8585
8686 {% set safesearch_label = _('SafeSearch') %}
8787 {% set safesearch_info = _('Filter content') %}
88− {{ preferences_item_header(safesearch_info, safesearch_label, rtl) }}
89− <select class="form-control" name='safesearch'>
88+ {{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
89+ <select class="form-control" name="safesearch" id="safesearch">
9090 <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
9191 <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
9292 <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
@@ -95,16 +95,16 @@
9595
9696 {% set theme_label = _('Themes') %}
9797 {% set theme_info = _('Change searx layout') %}
98− {{ preferences_item_header(theme_info, theme_label, rtl) }}
99− <select class="form-control" name="theme">
98+ {{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
99+ <select class="form-control" name="theme" id="theme">
100100 {% for name in themes %}
101101 <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
102102 {% endfor %}
103103 </select>
104104 {{ preferences_item_footer(theme_info, theme_label, rtl) }}
105105
106− {{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl) }}
107− <select class="form-control" name='oscar-style'>
106+ {{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
107+ <select class="form-control" name="oscar-style" id="oscar_style">
108108 <option value="logicodev" >Logicodev</option>
109109 <option value="pointhi" {% if preferences.get_value('oscar-style') == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option>
110110 <option value="logicodev-dark" {% if preferences.get_value('oscar-style') == 'logicodev-dark' %}selected="selected"{% endif %}>Logicodev dark</option>
@@ -113,8 +113,8 @@
113113
114114 {% set label = _('Results on new tabs') %}
115115 {% set info = _('Open result links on new browser tabs') %}
116− {{ preferences_item_header(info, label, rtl) }}
117− <select class="form-control" name='results_on_new_tab'>
116+ {{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
117+ <select class="form-control" name="results_on_new_tab" id="results_on_new_tab">
118118 <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
119119 <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
120120 </select>
@@ -122,8 +122,8 @@
122122
123123 {% set label = _('Open Access DOI resolver') %}
124124 {% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
125− {{ preferences_item_header(info, label, rtl) }}
126− <select class="form-control" id='doi_resolver' name='doi_resolver'>
125+ {{ preferences_item_header(info, label, rtl, 'doi_resolver') }}
126+ <select class="form-control" name="doi_resolver" id="doi_resolver">
127127 {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
128128 <option value="{{ doi_resolver_name }}" {% if doi_resolver_name == current_doi_resolver %}selected="selected"{% endif %}>
129129 {{ doi_resolver_name }} - {{ doi_resolver_url }}
@@ -134,8 +134,8 @@
134134
135135 {% set label = _('Engine tokens') %}
136136 {% set info = _('Access tokens for private engines') %}
137− {{ preferences_item_header(info, label, rtl) }}
138− <input class="form-control" id='tokens' name='tokens' value='{{ preferences.tokens.get_value() }}'/>
137+ {{ preferences_item_header(info, label, rtl, 'tokens') }}
138+ <input class="form-control" id="tokens" name="tokens" value='{{ preferences.tokens.get_value() }}'/>
139139 {{ preferences_item_footer(info, label, rtl) }}
140140 </div>
141141 </fieldset>
@@ -173,23 +173,23 @@
173173 <table class="table table-hover table-condensed table-striped">
174174 <tr>
175175 {% if not rtl %}
176− <th>{{ _("Allow") }}</th>
177− <th>{{ _("Engine name") }}</th>
178− <th>{{ _("Shortcut") }}</th>
179− <th>{{ _("Selected language") }}</th>
180− <th>{{ _("SafeSearch") }}</th>
181− <th>{{ _("Time range") }}</th>
182− <th>{{ _("Avg. time") }}</th>
183− <th>{{ _("Max time") }}</th>
176+ <th scope="col">{{ _("Allow") }}</th>
177+ <th scope="col">{{ _("Engine name") }}</th>
178+ <th scope="col">{{ _("Shortcut") }}</th>
179+ <th scope="col">{{ _("Selected language") }}</th>
180+ <th scope="col">{{ _("SafeSearch") }}</th>
181+ <th scope="col">{{ _("Time range") }}</th>
182+ <th scope="col">{{ _("Avg. time") }}</th>
183+ <th scope="col">{{ _("Max time") }}</th>
184184 {% else %}
185− <th class="text-right">{{ _("Max time") }}</th>
186− <th class="text-right">{{ _("Avg. time") }}</th>
187− <th class="text-right">{{ _("Time range") }}</th>
188− <th class="text-right">{{ _("SafeSearch") }}</th>
189− <th class="text-right">{{ _("Selected language") }}</th>
190− <th class="text-right">{{ _("Shortcut") }}</th>
191− <th class="text-right">{{ _("Engine name") }}</th>
192− <th class="text-right">{{ _("Allow") }}</th>
185+ <th scope="col" class="text-right">{{ _("Max time") }}</th>
186+ <th scope="col" class="text-right">{{ _("Avg. time") }}</th>
187+ <th scope="col" class="text-right">{{ _("Time range") }}</th>
188+ <th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
189+ <th scope="col" class="text-right">{{ _("Selected language") }}</th>
190+ <th scope="col" class="text-right">{{ _("Shortcut") }}</th>
191+ <th scope="col" class="text-right">{{ _("Engine name") }}</th>
192+ <th scope="col" class="text-right">{{ _("Allow") }}</th>
193193 {% endif %}
194194 </tr>
195195 {% for search_engine in engines_by_category[categ] %}
@@ -199,21 +199,21 @@
199199 <td class="onoff-checkbox">
200200 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
201201 </td>
202− <th>{{ search_engine.name }}</th>
202+ <th scope="row">{{ search_engine.name }}</th>
203203 <td class="name">{{ shortcuts[search_engine.name] }}</td>
204204 <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
205205 <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
206206 <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
207− <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
208− <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
209− {% else %}
210− <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}</td>
211− <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
207+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{% if stats[search_engine.name]['warn_time'] %}{{ icon('exclamation-sign')}} {% endif %}{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}</td>
208+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{% if stats[search_engine.name]['warn_timeout'] %}{{ icon('exclamation-sign') }} {% endif %}{{ search_engine.timeout }}</td>
209+ {% else %}
210+ <td class="{{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</td>
211+ <td class="{{ 'danger' if stats[search_engine.name]['warn_time'] else '' }}">{{ 'N/A' if stats[search_engine.name].time==None else stats[search_engine.name].time }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</td>
212212 <td>{{ support_toggle(search_engine.time_range_support==True) }}</td>
213213 <td>{{ support_toggle(search_engine.safesearch==True) }}</td>
214214 <td>{{ support_toggle(stats[search_engine.name].supports_selected_language) }}</td>
215215 <td>{{ shortcuts[search_engine.name] }}</td>
216− <th>{{ search_engine.name }}</th>
216+ <th scope="row">{{ search_engine.name }}</th>
217217 <td class="onoff-checkbox">
218218 {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
219219 </td>
@@ -241,7 +241,7 @@
241241 <h3 class="panel-title">{{ _(plugin.name) }}</h3>
242242 </div>
243243 <div class="panel-body">
244− <div class="col-xs-6 col-sm-4 col-md-6">{{ _(plugin.description) }}</div>
244+ <div class="col-xs-6 col-sm-4 col-md-6"><label for="{{'plugin_' + plugin.id}}">{{ _(plugin.description) }}</label></div>
245245 <div class="col-xs-6 col-sm-4 col-md-6">
246246 <div class="onoff-checkbox">
247247 {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
searx/templates/oscar/result_templates/code.html+2−2
@@ -1,11 +1,11 @@
1−{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
1+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context%}
22
33{{ result_header(result, favicons) }}
44{{ result_sub_header(result) }}
55
66{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
77
8−{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
8+{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} aria-labelledby="result-{{loop.index}}">{{ result.repository }}</a></p>{% endif %}
99
1010<div dir="ltr">
1111{{ result.codelines|code_highlighter(result.code_language)|safe }}
searx/templates/oscar/result_templates/default.html+6−6
@@ -1,10 +1,10 @@
11{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context %}
22
3−{{- result_header(result, favicons) -}}
4−{{- result_sub_header(result) -}}
3+{{- result_header(result, favicons, loop.index) -}}
4+{{- result_sub_header(result, loop.index) -}}
55
66{%- if result.embedded -%}
7− <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music') }} {{ _('show media') }}</a></small>
7+ <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}" aria-labelledby="result-{{loop.index}}">{{ icon('music') }} {{ _('show media') }}</a></small>
88{%- endif -%}
99
1010{%- if result.embedded -%}
@@ -16,7 +16,7 @@
1616{%- if result.img_src -%}
1717<div class="container-fluid">
1818 <div class="row">
19−<img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" style="width: auto; max-height: 60px; min-height: 60px;" class="col-xs-2 col-sm-4 col-md-4 result-content">
19+<img src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" style="width: auto; max-height: 60px; min-height: 60px;" class="col-xs-2 col-sm-4 col-md-4 result-content">
2020{% if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%}
2121 </div>
2222</div>
@@ -25,7 +25,7 @@
2525{%- endif -%}
2626
2727{%- if rtl -%}
28−{{ result_footer_rtl(result) }}
28+{{ result_footer_rtl(result, loop.index) }}
2929{%- else -%}
30−{{ result_footer(result) }}
30+{{ result_footer(result, loop.index) }}
3131{%- endif -%}
searx/templates/oscar/result_templates/images.html+2−2
@@ -1,6 +1,6 @@
1−{%- from 'oscar/macros.html' import draw_favicon -%}
1+{%- from 'oscar/macros.html' import draw_favicon with context -%}
22
3−<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} data-toggle="modal" data-target="#modal-{{ index }}-{{pageno}}">{{- "" -}}
3+<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} data-toggle="modal" data-target="#modal-{{ index }}-{{pageno}}" id="result-{{loop.index}}">{{- "" -}}
44 <img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="img-thumbnail">{{- "" -}}
55</a>
66<div class="modal fade" id="modal-{{ index }}-{{ pageno }}" tabindex="-1" role="dialog" aria-hidden="true">{{- "" -}}
searx/templates/oscar/result_templates/map.html+4−4
@@ -1,7 +1,7 @@
11{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
22
3−{{ result_header(result, favicons) }}
4−{{ result_sub_header(result) }}
3+{{ result_header(result, favicons, loop.index) }}
4+{{ result_sub_header(result, loop.index) }}
55
66{% if (result.latitude and result.longitude) or result.boundingbox %}
77 <small> &bull; <a class="text-info btn-collapse collapsed searx_init_map cursor-pointer disabled_if_nojs" data-toggle="collapse" data-target="#result-map-{{ index }}" data-leaflet-target="osm-map-{{ index }}" data-map-lon="{{ result.longitude }}" data-map-lat="{{ result.latitude }}" {% if result.boundingbox %}data-map-boundingbox='{{ result.boundingbox|tojson|safe }}'{% endif %} {% if result.geojson %}data-map-geojson='{{ result.geojson|tojson|safe }}'{% endif %} data-btn-text-collapsed="{{ _('show map') }}" data-btn-text-not-collapsed="{{ _('hide map') }}">{{ icon('globe') }} {{ _('show map') }}</a></small>
@@ -66,7 +66,7 @@
6666{% endif %}
6767
6868{% if rtl %}
69−{{ result_footer_rtl(result) }}
69+{{ result_footer_rtl(result, loop.index) }}
7070{% else %}
71−{{ result_footer(result) }}
71+{{ result_footer(result, loop.index) }}
7272{% endif %}
searx/templates/oscar/result_templates/torrent.html+4−4
@@ -1,7 +1,7 @@
11{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
22
3−{{ result_header(result, favicons) }}
4−{{ result_sub_header(result) }}
3+{{ result_header(result, favicons, loop.index) }}
4+{{ result_sub_header(result, loop.index) }}
55
66{% if result.seed is defined %}<p class="result-content">{{ icon('transfer') }} {{ _('Seeder') }} <span class="badge">{{ result.seed }}</span> &bull; {{ _('Leecher') }} <span class="badge">{{ result.leech }}</span>{% endif %}
77{% if result.filesize %}<br />{{ icon('floppy-disk') }} {{ _('Filesize') }}
@@ -19,7 +19,7 @@
1919</p>
2020
2121{% if rtl %}
22−{{ result_footer_rtl(result) }}
22+{{ result_footer_rtl(result, loop.index) }}
2323{% else %}
24−{{ result_footer(result) }}
24+{{ result_footer(result, loop.index) }}
2525{% endif %}
searx/templates/oscar/result_templates/videos.html+6−6
@@ -1,10 +1,10 @@
11{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
22
3−{{ result_header(result, favicons) }}
4−{{ result_sub_header(result) }}
3+{{ result_header(result, favicons, loop.index) }}
4+{{ result_sub_header(result, loop.index) }}
55
66{% if result.embedded %}
7− <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film') }} {{ _('show video') }}</a></small>
7+ <small> &bull; <a class="text-info btn-collapse collapsed cursor-pointer media-loader disabled_if_nojs" data-toggle="collapse" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}" aria-labelledby="result-{{loop.index}}">{{ icon('film') }} {{ _('show video') }}</a></small>
88{% endif %}
99
1010{% if result.embedded %}
@@ -15,7 +15,7 @@
1515
1616<div class="container-fluid">
1717 <div class="row">
18− <a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail col-xs-6 col-sm-4 col-md-4 result-content" src="{{ image_proxify(result.thumbnail) }}" alt="{{ result.title|striptags }} {{ result.engine }}" /></a>
18+ <a href="{{ result.url }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}><img class="thumbnail col-xs-6 col-sm-4 col-md-4 result-content" src="{{ image_proxify(result.thumbnail) }}" aria-labelledby="result-{{loop.index}}" /></a>
1919 {% if result.author %}<p class="col-xs-12 col-sm-8 col-md-8 result-content"><b>{{ _('Author') }}</b>: {{ result.author }}</p>{% endif %}
2020 {% if result.length %}<p class="col-xs-12 col-sm-8 col-md-8 result-content"><b>{{ _('Length') }}</b>: {{ result.length }}</p>{% endif %}
2121 {% if result.content %}<p class="col-xs-12 col-sm-8 col-md-8 result-content">{{ result.content|safe }}</p>{% endif %}
@@ -23,7 +23,7 @@
2323</div>
2424
2525{% if rtl %}
26−{{ result_footer_rtl(result) }}
26+{{ result_footer_rtl(result, loop.index) }}
2727{% else %}
28−{{ result_footer(result) }}
28+{{ result_footer(result, loop.index) }}
2929{% endif %}
searx/templates/oscar/time-range.html+1
@@ -1,3 +1,4 @@
1+<label class="visually-hidden" for="time-range">{{ _('Time range') }}</label>
12<select name="time_range" id="time-range" class="custom-select form-control" accesskey="t">{{- "" -}}
23 <option id="time-range-anytime" value="" {{ "selected" if time_range=="" or not time_range else ""}}>
34 {{- _('Anytime') -}}
searx/webapp.py+9−2
@@ -335,8 +335,15 @@ def image_proxify(url):
335335 if not request.preferences.get_value('image_proxy'):
336336 return url
337337
338− if url.startswith('data:image/jpeg;base64,'):
339− return url
338+ if url.startswith('data:image/'):
339+ # 50 is an arbitrary number to get only the beginning of the image.
340+ partial_base64 = url[len('data:image/'):50].split(';')
341+ if len(partial_base64) == 2 \
342+ and partial_base64[0] in ['gif', 'png', 'jpeg', 'pjpeg', 'webp', 'tiff', 'bmp']\
343+ and partial_base64[1].startswith('base64,'):
344+ return url
345+ else:
346+ return None
340347
341348 if settings.get('result_proxy'):
342349 return proxify(url)
utils/fetch_languages.py+2−2
@@ -28,10 +28,10 @@ def fetch_supported_languages():
2828 names.sort()
2929
3030 for engine_name in names:
31− print("fetching languages of engine %s" % engine_name)
32−
3331 if hasattr(engines[engine_name], 'fetch_supported_languages'):
3432 engines_languages[engine_name] = engines[engine_name].fetch_supported_languages()
33+ print("fetched %s languages from engine %s" % (
34+ len(engines_languages[engine_name]), engine_name))
3535 if type(engines_languages[engine_name]) == list:
3636 engines_languages[engine_name] = sorted(engines_languages[engine_name])
3737
utils/searx.sh+42−28
@@ -816,47 +816,61 @@ rst-doc() {
816816
817817 case $DIST_ID-$DIST_VERS in
818818 ubuntu-*|debian-*) cat <<EOF
819−# init.d --> /usr/share/doc/uwsgi/README.Debian.gz
820−# For uWSGI debian uses the LSB init process, this might be changed
821−# one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
822−
823−create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
824−enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
825−start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
826−restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
827−stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
828−disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
819+
820+.. code:: bash
821+
822+ # init.d --> /usr/share/doc/uwsgi/README.Debian.gz
823+ # For uWSGI debian uses the LSB init process, this might be changed
824+ # one day, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067
825+
826+ create ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}
827+ enable: sudo -H ln -s ${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP} ${uWSGI_APPS_ENABLED}/
828+ start: sudo -H service uwsgi start ${SEARX_UWSGI_APP%.*}
829+ restart: sudo -H service uwsgi restart ${SEARX_UWSGI_APP%.*}
830+ stop: sudo -H service uwsgi stop ${SEARX_UWSGI_APP%.*}
831+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
832+
829833EOF
830834 ;;
831835 arch-*) cat <<EOF
832−# systemd --> /usr/lib/systemd/system/uwsgi@.service
833−# For uWSGI archlinux uses systemd template units, see
834−# - http://0pointer.de/blog/projects/instances.html
835−# - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
836−
837−create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
838−enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
839−start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
840−restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
841−stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
842−disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
836+
837+.. code:: bash
838+
839+ # systemd --> /usr/lib/systemd/system/uwsgi@.service
840+ # For uWSGI archlinux uses systemd template units, see
841+ # - http://0pointer.de/blog/projects/instances.html
842+ # - https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
843+
844+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
845+ enable: sudo -H systemctl enable uwsgi@${SEARX_UWSGI_APP%.*}
846+ start: sudo -H systemctl start uwsgi@${SEARX_UWSGI_APP%.*}
847+ restart: sudo -H systemctl restart uwsgi@${SEARX_UWSGI_APP%.*}
848+ stop: sudo -H systemctl stop uwsgi@${SEARX_UWSGI_APP%.*}
849+ disable: sudo -H systemctl disable uwsgi@${SEARX_UWSGI_APP%.*}
850+
843851EOF
844852 ;;
845853 fedora-*) cat <<EOF
846−# systemd --> /usr/lib/systemd/system/uwsgi.service
847−# The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
848−# - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
849854
850−create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
851−restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
852−disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
855+.. code:: bash
856+
857+ # systemd --> /usr/lib/systemd/system/uwsgi.service
858+ # The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
859+ # - https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
860+
861+ create: ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
862+ restart: sudo -H touch ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
863+ disable: sudo -H rm ${uWSGI_APPS_ENABLED}/${SEARX_UWSGI_APP}
864+
853865EOF
854866 ;;
855867 esac
856868 echo -e ".. END searx uwsgi-description $DIST_NAME"
857869
858870 echo -e "\n.. START searx uwsgi-appini $DIST_NAME"
859− eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\""
871+ echo ".. code:: bash"
872+ echo
873+ eval "echo \"$(< "${TEMPLATES}/${uWSGI_APPS_AVAILABLE}/${SEARX_UWSGI_APP}")\"" | prefix_stdout " "
860874 echo -e "\n.. END searx uwsgi-appini $DIST_NAME"
861875
862876 )