Commit Graph

33 Commits (master)

Author SHA1 Message Date
Markus Heiser b424ee255e [mod] paper.html: simplify template by using result_link macro
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser 3198c906af [mod] paper.html: add links to doi resolver
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Alexandre Flament d6446be38f [mod] science category: various update of about PR 1705 2 years ago
Alexandre FLAMENT 5ba831d6a8 Add paper.html result template 2 years ago
Alexandre Flament 7f30ac37e9 map.html: display the intended text for the links instead of the URL
For example display "Tokyo (en)" instead of https://en.wikipedia.org/wiki/Tokyo
2 years ago
Markus Heiser 88f62cf0df [fix] clean up templates / remove import of result_footer_rtl macro
A macro named 'result_footer_rtl' does not exists.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Alexandre FLAMENT 0063427309 Template images.html: lazy by JS the full size image
Remove lazy loading by browser / width / height:
JS is required to display this HTML fragment anyway.

Simplify the HTML template.
2 years ago
mrpaulblack 392c9c4243 [simple theme] add products.html template 2 years ago
mrpaulblack 169f8d9988 [simple theme] add netloc to image result articles 2 years ago
Markus Heiser 16d05ca285 [mod] simple theme: define a '.show-content-button'
With LESS function '.show-content-button' all the *Show-Media* links becomes
bottons.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser 7352c6bc79 [mod] templates: rename field for <iframe> URL to iframe_src
Rename result field data_src to iframe_src

Suggested-by: @dalf https://github.com/searxng/searxng/pull/882#issuecomment-1037997402
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser 98cab4cf75 [mod] result_templates/default.html replace embedded HTML by data_src audio_src
Embedded HTML breaks SearXNG architecture.  To modularize, HTML is generated in
the templates (oscar & simple) and result parameter 'embedded' is replaced by
'data_src' (and 'audio_src'), an URL for embedded content (<iframe>).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser 46e131fdad [mod] result_templates/videos.html: replace embedded HTML by data_src
Embedded HTML breaks SearXNG architecture.  To modularize, HTML is generated in
the templates (oscar & simple) and result parameter 'embedded' is replaced by
'data_src', an URL for embedded content (<iframe>).

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser c416464949 [fix] lazy loading of <img> tags
Images should include dimension attributes.  Without `width` and `height`
specified, image dimensions are 0×0 pixels at first.  ...  In this case the
browser determines that all of them are visible to the user and decides to load
everything [1].

In CSS the `width` is set to a value and the `height` is unsed to scale the image
proportional in both dimensions.

[1] https://web.dev/browser-level-image-lazy-loading/#images-should-include-dimension-attributes
[2] https://caniuse.com/loading-lazy-attr

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser c7bb6945d1 [fix] simple theme: img tile, shows duplicate information on screen
Remove global title attribute from img tag[1][2] .  In the image result, the
title is already shown from span class title::

    <span class="title">{{ result.title|striptags }}</span>

See commit: 8fbffb1409

    [fix] simple-theme templates: polish HTML <img> elements

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
[2] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title

Reported-by: @dalf https://github.com/searxng/searxng/pull/545#issuecomment-980531215
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 8fbffb1409 [fix] simple-theme templates: polish HTML <img> elements
- <img> [1] element does not have an end tag, no need for a leading `/>`
- add global attribute title[2] to result_templates/images.html (result-images-source)
- in jinja macro 'macro result_header' remove duplicate of class="image"
- in jinja macro 'macro result_header' remove alt attribute (fix [3])::

    alt="{{ result.title|striptags }}"

  the result.title is already shown in::

    <h3>{{ result_link(result.url, result.title|safe) }}</h3>

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
[2] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title
[3] https://github.com/searxng/searxng/issues/523

Closes: https://github.com/searxng/searxng/issues/523
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament c4caa52989
fix PR #535
Use the "empty_element" CSS class.
3 years ago
Markus Heiser f57a9f425d [simple template] format default string 'italic'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
mrpaulblack 047d0ac6d6 [simple template] return a default string if there is no description 3 years ago
MrPaulBlack 566dfe3330 [simple theme] update to ion icons 5 and drop webfont
* update from ionicons-npm to ionicons ver.5
* drop the webfont built by grunt for icons
* built icons.html template for inlining icons with jinja2 into html
* update icon to use mostly the outline version
* add icons to categories and do not display them on mobile to save space
* remove all legacy ion icon font files from simple theme
* icons.html is added in this commit since make statc.build.restore requires git to know the file already
* cleanup error-dialog
3 years ago
Alexandre Flament 3167d645e8 [fix] simple theme: fix open in a new tab preference 3 years ago
Alexandre Flament fd374d6322 [enh] simple theme: image detail
When an image is selected, the detail with the full size image is displayed
on the right side of the screen (or full screen on tablet and phone).

When Javascript is disabled, the thumbnail is a linked to the full size image,
as it was before.

When the image proxy is enabled, the full size image is also proxied,
in consequence this commit increases the bandwidth usage of instances.

The detail can be closed by the close button or the Esc key.
It is possible to go to the next and previous images using the j and k keys
or the button on the top right of the screen.
3 years ago
Alexandre Flament 74b0830362 SearXNG: simple theme 3 years ago
Markus Heiser ad528c706e [fix] make result template map more CSP compliant - simple & oscar
Add osm-map-box in::

    searx/static/themes/__common__/less/result_templates.less

Replaced sty= in files::

    ./oscar/result_templates/map.html:64:        <div style="height:300px; width:100%; margin: 10px 0;" id="osm-map-{{ index }}"></div>
    ./simple/result_templates/map.html:65:    <div id="result-map-{{ index }}" class="invisible"><div id="osm-map-{{ index }}" style="height:300px; width:100%; margin: 10px 0;" ></div></div>

Reported-by: https://github.com/searxng/searxng/issues/57
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 12af3b39db [fix] make simple/result_templates/map.html more CSP compliant [1]
[1] https://github.com/searxng/searxng/issues/57

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament c75425655f [enh] openstreetmap / map template: improve results
implements ideas described in #69

* update the engine
* use wikidata
* update map.html template
3 years ago
Alexandre Flament 7457f3fe40
Merge pull request #124 from return42/searx-merge
merge redis offline engine from searx
3 years ago
Alexandre Flament a89b823f8d [mod] remove overpass API call
prepare the code the PR #90
3 years ago
Adam Tauber e33858d6ef [fix] correct kv template formatting and remove internal data
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>
3 years ago
Marc Abonce Seguin 9299355570 add seedpeer again 5 years ago
Noémi Ványi a6f20caf32 add initial support for offline engines && command engine 5 years ago
Alex 3ba0d0516e simple theme update
- npm package update
- apply #1226
- implement vim help dialog
- display cookies and search URL with preferences
- allow to enable / disable Open Access DOI rewrite
- add a clear text button on the left of the search button
- implement #1011 : the HTML title page is not set when using POST
- remove searx/static/themes/simple/img/loader.gif
- use full width when only there are only images as result
6 years ago
Alexandre Flament 10a24bdc2c [enh] add simple theme (WIP) 7 years ago