1
0
mirror of https://github.com/searxng/searxng.git synced 2024-08-20 13:21:35 +02:00
Commit Graph

581 Commits

Author SHA1 Message Date
Alexandre Flament
92db0227b1 Merge remote-tracking branch 'dalf/oscar-images' 2021-04-19 09:36:54 +02:00
Markus Heiser
f637bfc635 [mod] oscar's "default" template should make use of result.thumbnail
Some engine do have set result.img_src, other return a result.thumbnail.  If
result.img_src is unset and a result.thumbnail is given, show it to the UI.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-15 08:52:11 +02:00
Markus Heiser
c4793afadc [fix] https-scheme missing in preferences-page
This patch is an addition to PR #2656 which removed all usage of `base_url` from
the templates, except one was forgotten in the cookie URL of the preferences.

closes: 2740

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-12 16:02:16 +02:00
Alexandre Flament
7089526723
Merge pull request #2656 from return42/fix-url_for
[fix] url_for(..., _external=True) in templates
2021-04-05 14:50:39 +02:00
Markus Heiser
87e4c47621 [fix] url_for(..., _external=True) in templates
The `url_for` function in the template context is not the one from Flask, it is
the one from `webapp`.  The `webapp.url_for_theme` is different from its
namesake of Flask and has it quirks, when called with argument `_external=True`.

The `webapp.url_for_theme` can't handle absolute URLs since it pokes a leading
'/', here is the snippet of the old code::

    url = url_for(endpoint, **values)
    if settings['server']['base_url']:
        if url.startswith('/'):
            url = url[1:]
        url = urljoin(settings['server']['base_url'], url)

Next drawback of (Flask's) `_external=True` is, that it will not return the HTTP
scheme when searx (the Flask app) listens on http and is proxied by a https
server.

To get the right scheme `HTTP_X_SCHEME` is needed by Flask (werkzeug).  Since
this is not provided in every environment (e.g. behind Apache mod_wsgi or the
HTTP header is not fully set for some other reasons) it is recommended to
get *script_name*, *server* and *scheme* from the configured `base_url`.  If
`base_url` is specified, then these values from are given preference over any
Flask's generics.

BTW this patch normalize to use `url_for` in the `opensearch.xml` and drop the
need of `host` and `urljoin` in template's context.

Signed-off-by: Markus Heiser <markus@darmarit.de>
2021-04-05 14:34:45 +02:00
Alexandre Flament
7a0fbdecc4 [enh] oscar: image thumbnail layout
Adjust thumbnail sizes to fill the container width
2021-04-05 11:29:17 +02:00
Markus Heiser
ebfd0eb2b7 [fix] default_doi_resolver in preferences
Instead of a hard-coded `oadoi.org` default, use the default value from
`settings.yml`.

Fix an issue in the themes: The replacement 'current_doi_resolver' contains the
doi_resolver_url, not the name of the DOI resolver.  Compare return value of::

    searx.plugins.oa_doi_rewrite.get_doi_resolver(...)

Fix a typo in `get_doi_resolver(..)`:  suggested by @kvch:

  *L32 should set doi_resolver not doi_resolvers*

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-04 13:36:33 +02:00
Alexandre Flament
d648001688 [mod] preferences: a tooltip is shown when the mouse is over the engine names 2021-03-22 08:22:59 +01:00
Alexandre Flament
30c950a2c7
Merge pull request #2660 from dalf/upd-translations
[mod] replace /translations.js with an embedded JSON
2021-03-21 12:39:26 +01:00
Alexandre Flament
2b0dd96bd3 [mod] oscar: remove space
* reduce by 15% the uncompressed output (on average)
* dos2unix searx/templates/oscar/result_templates/files.html
2021-03-17 09:22:05 +01:00
Alexandre Flament
6553c79029 [mod] replace /translations.js by embedded JSON
In webapp.py, there is a new function "get_translations" lists available translations

Close #2064
2021-03-16 11:22:21 +01:00
Alexandre Flament
9292571304
Merge pull request #2346 from dalf/upgrade-oscar
[mod] oscar: upgrade dependencies
2021-03-13 09:29:13 +01:00
Alexandre Flament
44407353ef [mod] oscar: get leaflet and jquery from NPM
easy to upgrade (package.json)
2021-03-11 09:32:22 +01:00
Alexandre Flament
eda3b513ac [mod] oscar: remove polyfills for Internet Explorer 2021-03-10 19:01:16 +01:00
Alexandre Flament
bdb41bea7b [mod] theme: remove require-2.1.15.min.js
See https://github.com/requirejs/requirejs/issues/1816

requirejs loads one file: leaflet.

This commit:
* removes requirejs
* load leaflet using <script src...> HTML tag in searx/templates/oscar/base.html
2021-03-10 19:01:15 +01:00
Alexandre Flament
99e0651cea [mod] by default allow only HTTPS, not HTTP
Related to https://github.com/searx/searx/pull/2373
2021-03-08 11:35:08 +01:00
Adam Tauber
44f4a9d49a [enh] add ability to send engine data to subsequent requests 2021-03-06 12:12:35 +01:00
Alexandre Flament
8d0312d014
Merge pull request #2458 from MarcAbonce/hide-links-mobile2
Hide links panel in mobile screens
2021-01-12 08:27:24 +01:00
Marc Abonce Seguin
635c6516a4 hide links panel in mobile screens 2021-01-11 20:40:21 -07:00
Alexandre Flament
54e69d0367 [upd] update dependencies
minor change in the oscar theme becase the last version of jinja2
respect more carefully the spaces in the templates
2020-12-28 09:04:39 +01:00
Alexandre Flament
14c7cc0e11 [mod] Makefile: make CONTACT_URL optional 2020-12-18 09:54:03 +01:00
BBaoVanC
19fce74443
Add link to contact instance maintainer to footer of each page (#2391) 2020-12-18 09:53:28 +01:00
Alexandre Flament
9bc1856e2b [mod] themes: remove legacy, courgette and pix-art themes 2020-12-17 11:33:28 +01:00
Markus Heiser
9db7d6357b [themes] add hyperlink to searx instances list in error message
closes: #2383

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-16 20:24:42 +01:00
Noémi Ványi
3a63dfbdd7 display if an engine does not support https
Closes #302
2020-12-09 20:49:54 +01:00
GazoilKerozen
1b700738eb
[fix] fix the reset button in the oscar theme (#2306)
Rely on javascript instead of type="clear"

Close #2009
2020-11-30 16:30:21 +01:00
Noémi Ványi
4a36a3044d
Add recoll engine (#2325)
recoll is a local search engine based on Xapian:
http://www.lesbonscomptes.com/recoll/

By itself recoll does not offer web or API access,
this can be achieved using recoll-webui:
https://framagit.org/medoc92/recollwebui.git

This engine uses a custom 'files' result template

set `base_url` to the location where recoll-webui can be reached
set `dl_prefix` to a location where the file hierarchy as indexed by recoll can be reached
set `search_dir` to the part of the indexed file hierarchy to be searched, use an empty string to search the entire search domain
2020-11-30 08:35:15 +01:00
renyhp
b00f77059c Add preference for displaying advanced settings 2020-11-22 18:16:43 +01:00
Marc Abonce Seguin
8d71420b45 [mod] separate index and search routes
This makes it easier to separately handle search and index requests
from a web server or from a reverse proxy.

If a request to index contains a query, a permanent redirect HTTP response
is returned. This should give some level of backwards compatibility
for users that have set a searx instance in their browser's search bar.
2020-11-02 20:04:03 -07:00
Alexandre Flament
ca593728af [mod] duckduckgo_definitions: display only user friendly attributes / URL
various bug fixes
2020-10-28 08:09:25 +01:00
Alexandre Flament
23f4203dfb [fix] simple theme: infobox: remove useless entity information 2020-10-28 08:09:25 +01:00
Marc Abonce Seguin
32957cdf49 add Ahmia filter plugin for onion results 2020-10-25 17:59:43 -07:00
a01200356
c3daa08537 [enh] Add onions category with Ahmia, Not Evil and Torch
Xpath engine and results template changed to account for the fact that
archive.org doesn't cache .onions, though some onion engines migth have
their own cache.

Disabled by default. Can be enabled by setting the SOCKS proxies to
wherever Tor is listening and setting using_tor_proxy as True.

Requires Tor and updating packages.

To avoid manually adding the timeout on each engine, you can set
extra_proxy_timeout to account for Tor's (or whatever proxy used) extra
time.
2020-10-25 17:59:05 -07:00
Noémi Ványi
33e139cae6 Let admins lock user preferences 2020-10-25 18:06:18 +01:00
Noémi Ványi
f0278d41fc add ebay enginte to shopping category 2020-10-08 13:20:55 +02:00
Alexandre Flament
bfdad7bc0f [fix] opensearch.xml URL contains method and autocomplete parameters
When the user add searx as a search engine, the browser loads the /opensearch.xml URL without the cookies.
Without the query parameters, the user preferences are ignored (method and autocomplete).

In addition, opensearch.xml is modified to support automatic updates,
see https://developer.mozilla.org/en-US/docs/Web/OpenSearch
2020-10-06 00:54:37 +02:00
Alexandre Flament
9740618227
Merge pull request #2226 from dalf/fix-searx-migration
[fix] migration from github.com/asciimoo/searx to github.com/searx/searx : fix URLs
2020-09-29 12:35:11 +02:00
Qt Resynth
246b8cd1a4
[fix] about.html: fix small inconsistencies in about page (#2219) 2020-09-28 16:56:25 +02:00
Alexandre Flament
f204e4903d [fix] migration from github.com/asciimoo/searx to github.com/searx/searx : fix URLs 2020-09-28 16:44:14 +02:00
Qt Resynth
21dbc7e852 "Egde" → "Edge" 2020-09-22 17:44:32 +02:00
Dalf
78df10fb55 Drop Python 2 (2/n): templates 2020-09-10 10:39:04 +02:00
Noémi Ványi
f0ca1c3483
[enh] Add command line engines: git grep, find, etc. (#2128)
A new "base" engine called command is introduced. It is the foundation for all command line engines for now.
You can use this engine to create your own command line engine.

Add some engines (commented out to make sure no one enables anything accidentally):
* git grep: This engine lets you grep in the searx repo.
* locate: If locate is installed and initialized, you can search on the FS.
* find: You can find files with a specific name from where you started searx.
* pattern search in files: This engine utilizes the command fgrep.
* regex search in files: This engine runs `grep` to find a file based on its contents.
2020-09-08 09:51:53 +02:00
Marc Abonce Seguin
a2430154b9
fix selects in preferences so they look consistent (#2150) 2020-08-27 21:55:47 +02:00
Adam Tauber
30d16e7ee6 [fix] use base_url for prefix of sharing 'currenly saved preferences' - fixes #1249 by @matejc 2020-08-27 14:29:38 +02:00
Adam Tauber
6278538890 [fix] add search language and time range filter to suggestions - fixes #1314 2020-08-27 14:26:38 +02:00
Émilien Devos
a5e6423c39
[fix] opensearch on chromium for android (#2132) 2020-08-18 18:29:58 +02:00
Marc Abonce Seguin
0601f2bb48 add toggle to resize infobox 2020-08-10 00:12:45 -07:00
Marc Abonce Seguin
74270a3fc2 add class for infobox's official url 2020-08-09 20:44:26 -07:00
Marc Abonce Seguin
c9c39b3e79 add engine's name in infobox's header 2020-08-09 15:42:55 -07:00
Marc Abonce Seguin
574e99c4de reduce space between title and url in infobox header 2020-08-09 15:42:55 -07:00
Mohamad Safadieh
1ea35605d1
Use query params for browser autocomplete
Sending query params over GET seems to be the only way to be able to
enable autocomplete in the browser. This commit adds the necessary URL
formatting to opensearch.xml. In order to identify queries coming from
the URL bar (rather than an AJAX request), which requires a different
JSON format and MIME type, the request headers are checked for
"X-Requested-With: XMLHttpRequest" which is added by jQuery request.
2020-08-09 07:59:49 -04:00
Vlad
d83ee1e413 Add clearfix to fix issue 2110 2020-07-31 20:08:45 +03:00
TheEvilSkeleton
925be22d8f
Replaced dash with em in searx description (#1973)
Very small change, but it looks better
2020-07-28 21:54:35 +02:00
Noémi Ványi
223114c575 [fix] refine contrast ratios of texts and borders - #350 2020-07-02 16:24:58 +02:00
Markus Heiser
f14a7add31 Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme 2020-06-30 15:37:39 +02:00
Adam Tauber
c7b75fc818 [fix] rewrite overflow:none as none is an invalid property - $350 2020-06-28 20:44:33 +02:00
Adam Tauber
b51d4ec041 [fix] add aria labels to result links - #350 2020-06-28 20:41:42 +02:00
Noémi Ványi
02c6710564 Make Oscar theme scalable 2020-06-27 16:41:26 +02:00
Markus Heiser
5f201dea7d
Merge branch 'master' into about-opensearch 2020-06-26 08:33:37 +00:00
Adam Tauber
969b4340fd [fix] add label/info to Time range search and Language - #350 2020-06-25 19:50:26 +02:00
Adam Tauber
cc164abdfc [fix] make "Advanced settings" openable and usable with keyboard - #350 2020-06-25 19:50:26 +02:00
Adam Tauber
ec48447361 [fix] change lang attribute of the html to match the current locale - #350 2020-06-25 19:50:26 +02:00
Adam Tauber
6ab569f558 [fix] connect selects and inputs programmatically on the preferences page - #350 2020-06-25 19:50:26 +02:00
Adam Tauber
fce2d49651 [fix] use scope attribute to describe properties in the engine preferences table 2020-06-25 19:50:26 +02:00
Adam Tauber
5ca5286912 [fix] indicate too high max time by e.g. icon not only by colour 2020-06-25 19:50:26 +02:00
Adam Tauber
d418b593bb [fix] do not use h1 element for the logo 2020-06-25 19:50:26 +02:00
Adam Tauber
01ee3a6edd [fix] remove redundant alt texts from images in Videos, Social Media and Music results - #350 2020-06-25 19:50:26 +02:00
Markus Heiser
a059c59cea
Merge branch 'master' into about-opensearch 2020-06-25 05:42:11 +00:00
Adam Tauber
a984afd6a3 [enh] make checkboxes in preferences accessible using keyboard - #350 2020-06-23 21:45:57 +02:00
Adam Tauber
2ff6214a4d [fix] remove alt text which doesnt add extra info - #350 2020-06-23 21:45:57 +02:00
Markus Heiser
1db37a0cc3
Merge branch 'master' into about-opensearch 2020-06-19 04:51:29 +00:00
Markus Heiser
ca1c3bd15d
Merge branch 'master' into csp-oscar-theme 2020-06-19 04:51:02 +00:00
Adam Tauber
08c13daf85 [enh] update opensearch.xml to match major search engines opensearch.xml 2020-06-18 19:38:13 +02:00
Markus Heiser
cc721b5d86 Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme 2020-06-16 10:17:03 +02:00
Markus Heiser
59739a44db
Merge branch 'master' into about-opensearch 2020-06-16 07:37:06 +00:00
Adam Tauber
0dc5bdb6ef [fix] add missing template file 2020-06-15 20:11:12 +02:00
Adam Tauber
4ca0d8cb0f [enh] add translatable strings to javascript - closes #461 2020-06-15 18:31:14 +02:00
Markus Heiser
e088b95e74 Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme 2020-06-10 07:25:44 +02:00
Markus Heiser
cc82303b62
Merge branch 'master' into about-opensearch 2020-06-10 04:55:04 +00:00
Adam Tauber
29960aa1d9 [enh] add official site link to the top of the infobox - closes #1644 2020-06-09 23:49:13 +02:00
Adam Tauber
6c06286251 [enh] add length and author details to youtube videos
closes #775
2020-06-09 20:31:51 +02:00
Adam Tauber
2c6531b233 [enh] add routing directions to osm search - closes #254 2020-06-09 17:18:44 +02:00
Markus Heiser
2b1f73ad49
Merge branch 'master' into about-opensearch 2020-06-09 08:29:48 +00:00
Markus Heiser
d065b9e4fb
Merge branch 'master' into csp-oscar-theme 2020-06-09 08:28:53 +00:00
Adam Tauber
785f0938fd [fix] add link to wikidata entities in infobox - fixes #1097 2020-06-09 01:31:57 +02:00
Adam Tauber
d5e146251f [enh] add subscribe link to rss results - closes #468 2020-06-09 01:05:15 +02:00
Adam Tauber
f0819e8826 [enh] add engine names to results as classes - closes #670 2020-06-09 00:31:52 +02:00
Markus Heiser
434e452d54 Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme 2020-06-04 23:18:22 +02:00
Adam Tauber
de1b08a941 [enh] add unique class for each endpoint - closes #1133 2020-06-04 19:21:15 +02:00
Adam Tauber
c54a0e81ff [enh] add shortcut column to search engines table in preferences - fixes #230 2020-06-03 13:49:20 +02:00
Markus Heiser
b85d845636 Merge branch 'master' of https://github.com/asciimoo/searx into about-opensearch 2020-06-01 09:43:19 +02:00
Markus Heiser
a3431d59d3 Merge branch 'master' of https://github.com/asciimoo/searx into csp-oscar-theme 2020-06-01 09:18:51 +02:00
Adam Tauber
19e32dc686
Merge pull request #1978 from kvch/fix-rtl-in-oscar
Fix Farsi language in Oscar && adjust tables with RTL
2020-05-31 23:45:14 +02:00
Noémi Ványi
a3e15a3df6 Fix Farsi language in Oscar && adjust tables with RTL 2020-05-31 23:44:34 +02:00
Noémi Ványi
d7d89369cb add disable all and allow all engines button to Oscar preferences 2020-05-31 23:39:21 +02:00
resynth1943
e84cdb66ae Add autofocus to all search inputs 2020-05-27 13:49:00 +01:00
Markus Heiser
ad208378bb [fix] oscar theme, remove inline style attributes (CSP compliants)
Inline styles are blocked by default with Content Security Policy (CSP).  Move
the rest of inline styles to CSS and correct the HTML template of the oscar
preference page.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-05-15 10:16:49 +02:00
Markus Heiser
e7788980ad [fix] about page- 'How to set as the default search engine?'
Searx supports OpenSearch, remove the inline JS from the about page.

close: https://github.com/asciimoo/searx/issues/1949
close: https://github.com/asciimoo/searx/issues/1616

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-05-12 14:17:47 +02:00
Dalf
4bb35e7ef5 [fix] template: fix typo in about.html 2020-03-31 16:52:52 +02:00
Markus Heiser
9717521981 Minor improvements of the HTML *about* page
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-26 13:45:37 +01:00