summaryrefslogtreecommitdiff
path: root/searx/templates
AgeCommit message (Collapse)Author
2021-06-09[enh] openstreetmap / map template: improve resultsAlexandre Flament
implements ideas described in #69 * update the engine * use wikidata * update map.html template
2021-06-02Merge pull request #124 from return42/searx-mergeAlexandre Flament
merge redis offline engine from searx
2021-06-01[mod] remove overpass API callAlexandre Flament
prepare the code the PR #90
2021-06-01[fix] correct kv template formatting and remove internal dataAdam Tauber
Slightly modified merge of commit [ea7ccf24] from searx. [ea7ccf24] https://github.com/searx/searx/commit/ea7ccf24 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-28[enh] add settings option to enable/disable search formatsMarkus Heiser
Access to formats can be denied by settings configuration:: search: formats: [html, csv, json, rss] Closes: https://github.com/searxng/searxng/issues/95 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-22[fix] offline engines: fix templates /stats and /preferencesAlexandre Flament
2021-05-17[fix] bar graph and rename CSS class engine-scores -> engine-scoreMarkus Heiser
- drop #main_stats selector in stats.less - 'engine-score' exists before this PR. - untabify searx/static/themes/__common__/less/stats.less for details see comment at: https://github.com/searxng/searxng/pull/81/files/d93bec7638908cae64530727d4e1539ae10bd144..1204e4f07e932029d66b4674a3474918228459a6#r633571496 Suggested-by: @dalf in commit 1204e4f0 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-17[fix] make /stats more CSP compliant - github issue formMarkus Heiser
Hide textarea from github issue form:: ./__common__/new_issue.html:6: <textarea name="body" style="display: none;">{{- '' -}} BTW: fix indentation. Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-17[fix] make /stats more CSP compliant - oscar themeMarkus Heiser
Replace oscar theme's *styles* (see below) by CSP compliant implementation in ``searx/static/themes/__common__/less/stats.less`` :: ./oscar/stats.html:29: <th scope="col" style="width:20rem;">{{ th_sort('name', _("Engine name")) }}</th> ./oscar/stats.html:30: <th scope="col" style="width:7rem; text-align: right;">{{ th_sort('score', _('Scores')) }}</th> ./oscar/stats.html:33: <th scope="col" style="text-align: right;">{{ th_sort('reliability', _('Reliability')) }}</th> ./oscar/stats.html:38: <td style="text-align: right;"> ./oscar/stats.html:91: <td style="text-align: right;"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td> ./oscar/stats.html:109: <tbody style="padding-top: 1rem;"> ./oscar/stats.html:112: <th scope="row" style="width: 10rem">{{ _('Exception') }}</th><td>{{ error.exception_classname }}</td> ./oscar/stats.html:114: <th scope="row" style="width: 10rem">{{ _('Message') }}</th><td>{{ error.log_message }}</td> ./oscar/stats.html:116: <th scope="row" style="width: 10rem">{{ _('Percentage') }}</th><td style="width: 10rem">{{ error.percentage }}</td> ./oscar/stats.html:121: <span style="border-right: 1px solid gray; padding: 0 1rem 0 0; margin: 0 0 0 0.5rem;">{{ param }}</span> ./oscar/stats.html:138: <th scope="col" style="width: 10rem">{{ _('Failed test') }}</th> Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-17[fix] make /stats more CSP compliant - simple themeMarkus Heiser
Replace simple theme's *styles* (see below) by CSP compliant implementation in ``searx/static/themes/simple/less/stats.less`` :: ./simple/stats.html:26: <table style="max-width: 1280px; margin: 0 auto 0 0;"> ./simple/stats.html:28: <th scope="col" style="width:20rem;">{{ th_sort('name', _("Engine name")) }}</th> ./simple/stats.html:29: <th scope="col" style="width:7rem; text-align: right;">{{ th_sort('score', _('Scores')) }}</th> ./simple/stats.html:32: <th scope="col" style="text-align: right;">{{ th_sort('reliability', _('Reliability')) }}</th> ./simple/stats.html:37: <td style="text-align: right;"> ./simple/stats.html:90: <td style="text-align: right;"> {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }}</td> ./simple/stats.html:106: <table style="max-width: 1280px; margin: 1rem; border: 1px solid gray;"> ./simple/stats.html:107: <tbody style="padding-top: 1rem;"> ./simple/stats.html:110: <th scope="row" style="width: 10rem">{{ _('Exception') }}</th><td>{{ error.exception_classname }}</td> ./simple/stats.html:112: <th scope="row" style="width: 10rem">{{ _('Message') }}</th><td>{{ error.log_message }}</td> ./simple/stats.html:114: <th scope="row" style="width: 10rem">{{ _('Percentage') }}</th><td style="width: 10rem">{{ error.percentage }}</td> ./simple/stats.html:119: <span style="border-right: 1px solid gray; padding: 0 1rem 0 0; margin: 0 0 0 0.5rem;">{{ param }}</span> ./simple/stats.html:136: <th scope="col" style="width: 10rem">{{ _('Failed test') }}</th> Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-17[fix] make /stats more CSP compliant - bar graphMarkus Heiser
Replace bar graph's *styles* (see below) by CSP compliant implementation in ``searx/static/themes/__common__/less/stats.less`` :: ./simple/stats.html:49: <span style="width: calc(max(2px, 100%*{{ (engine_stat.result_count / engine_stats.max_result_count )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./simple/stats.html:57: <span style="width: calc(max(2px, 100%*{{ (engine_stat.http / engine_stats.max_time )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./simple/stats.html:58: <span style="width: calc(100%*{{ engine_stat.processing / engine_stats.max_time |round(3) }})" class="stacked-bar-chart-serie2"></span>{{- "" -}} ./oscar/stats.html:50: <span style="width: calc(max(2px, 100%*{{ (engine_stat.result_count / engine_stats.max_result_count )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./oscar/stats.html:58: <span style="width: calc(max(2px, 100%*{{ (engine_stat.http / engine_stats.max_time )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./oscar/stats.html:59: <span style="width: calc(100%*{{ engine_stat.processing / engine_stats.max_time |round(3) }})" class="stacked-bar-chart-serie2"></span>{{- "" -}} Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-04Merge pull request #55 from searxng/upd-relialibility-columnMarkus Heiser
[themes] /preferences, reliablity: warning icons & error logs link
2021-05-04[mod] option to enable or disable "proxy" button next to each result (#54)Markus Heiser
* [mod] option to enable or disable "proxy" button next to each result Closes: https://github.com/searxng/searxng/issues/51 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Co-authored-by: Alexandre Flament <alex@al-f.net>
2021-05-04[themes] /preferences, reliablity: warning icons & error logs linkAlexandre Flament
When there is at least one errors or one failed checker test: * the warning icon is displayed in the reliability column * the link "View error logs and submit a bug report" is displayed on engine name tooltip. Before: * the warning icon was displayed only when one or more checker test(s) failed. * the link "View error logs and submit a bug report" was not shown when a checker test failed but there were no error.
2021-04-29[mod] UI: engine pref-page, about toolbox: add link to statsMarkus Heiser
In the preference page, in the 'about' toolbox of an engine, add a link to the stats page of the engine, if the engine had one or more errors. Condition is:: reliabilities[<engine.name>].errors Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-29[mod] engine errors: link to the stats to create an github issueAlexandre Flament
2021-04-28[fix] new_issue.html: drop inline style attributes (CSP conformance)Markus Heiser
Inline styles are blocked by default with Content Security Policy (CSP). Move the inline styles from 'new_issue.html' to:: searx/static/themes/__common__/less/new_issue.less Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-25Merge pull request #23 from searxng/metrics-stats-enginesAlexandre Flament
Metrics stats engines
2021-04-25[mod] /stats : detail per engineAlexandre Flament
allow to submit a github issue including the technical details (exceptions, errors, warning, checker result)
2021-04-25[brand] searxng -- fix links to issue tracker & WEB-GUIMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-25[brand] searxng is a fork from searxMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-24[mod] /stats: simple theme implementationAlexandre Flament
2021-04-24[mod] /stats : add reliability column and sort by column linksAlexandre Flament
2021-04-24[mod] update /statsAlexandre Flament
2021-04-22More brandingAlexandre Flament
2021-04-22[enh] themes - add result.metadata to result sub headerMarkus Heiser
Signed-off-by: Markus Heiser <markus@darmarit.de>
2021-04-21fix issues from reviewAlexandre Flament
2021-04-21[mod] oscar: /preferences , engines tab: report engine timesAlexandre Flament
* display the median time instead of the average. * add a "Reliability" column (sum up the metrics and the checker results). * the "selected language", "SafeSearch", "Time range" values are displayed as "broken" when the checker tests fail.
2021-04-21Merge remote-tracking branch 'return42/fix-preference-save'Alexandre Flament
2021-04-19Merge remote-tracking branch 'dalf/oscar-images'Alexandre Flament
2021-04-15[mod] oscar's "default" template should make use of result.thumbnailMarkus Heiser
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-12[fix] https-scheme missing in preferences-pageMarkus Heiser
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-05Merge pull request #2656 from return42/fix-url_forAlexandre Flament
[fix] url_for(..., _external=True) in templates
2021-04-05[fix] url_for(..., _external=True) in templatesMarkus Heiser
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[enh] oscar: image thumbnail layoutAlexandre Flament
Adjust thumbnail sizes to fill the container width
2021-04-04[fix] default_doi_resolver in preferencesMarkus Heiser
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-03-22[mod] preferences: a tooltip is shown when the mouse is over the engine namesAlexandre Flament
2021-03-21Merge pull request #2660 from dalf/upd-translationsAlexandre Flament
[mod] replace /translations.js with an embedded JSON
2021-03-17[mod] oscar: remove spaceAlexandre Flament
* reduce by 15% the uncompressed output (on average) * dos2unix searx/templates/oscar/result_templates/files.html
2021-03-16[mod] replace /translations.js by embedded JSONAlexandre Flament
In webapp.py, there is a new function "get_translations" lists available translations Close #2064
2021-03-13Merge pull request #2346 from dalf/upgrade-oscarAlexandre Flament
[mod] oscar: upgrade dependencies
2021-03-11[mod] oscar: get leaflet and jquery from NPMAlexandre Flament
easy to upgrade (package.json)
2021-03-10[mod] oscar: remove polyfills for Internet ExplorerAlexandre Flament
2021-03-10[mod] theme: remove require-2.1.15.min.jsAlexandre Flament
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-08[mod] by default allow only HTTPS, not HTTPAlexandre Flament
Related to https://github.com/searx/searx/pull/2373
2021-03-06[enh] add ability to send engine data to subsequent requestsAdam Tauber
2021-01-12Merge pull request #2458 from MarcAbonce/hide-links-mobile2Alexandre Flament
Hide links panel in mobile screens
2021-01-11hide links panel in mobile screensMarc Abonce Seguin
2020-12-28[upd] update dependenciesAlexandre Flament
minor change in the oscar theme becase the last version of jinja2 respect more carefully the spaces in the templates
2020-12-18[mod] Makefile: make CONTACT_URL optionalAlexandre Flament