diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-11-29 16:27:16 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-11-29 21:10:13 +0100 |
commit | eff08844987eb184ea67a0a96d2ca4089f72f2d9 (patch) | |
tree | 1bd30a72016e9f085b89823483e4eb5660e01e91 /searx/static/themes/simple/gruntfile.js | |
parent | 0311eba538df589bc11a4d76d3c94b104c5b764d (diff) | |
download | searxng-eff08844987eb184ea67a0a96d2ca4089f72f2d9.tar.gz searxng-eff08844987eb184ea67a0a96d2ca4089f72f2d9.zip |
[simple] ImageLayout.watch: `img_load_error.svg` if img load fails
Show default image `img/img_load_error.svg` when image can't be loaded.
----
Some words about class ImageLayout:
The https://github.com/searxng/searxng/blob/master/searx/static/themes/simple/js/searxng.js is build by a grunt task ..
https://github.com/searxng/searxng/blob/d0e21a01b4e14df905f25445a3f6bcbec481671c/searx/static/themes/simple/gruntfile.js#L91-L93
The `/__common__/js/*.js` concats also https://github.com/searxng/searxng/blob/master/searx/static/themes/__common__/js/image_layout.js where a modified copy of the of the "Google-image-layout" (`ImageLayout`) is implemented [1][2][3].
[1] https://ptgamr.github.io/2014-09-12-google-image-layout/
[2] https://ptgamr.github.io/google-image-layout/src/google-image-layout.js
[3] https://github.com/ptgamr/google-image-layout/tree/master
----
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/static/themes/simple/gruntfile.js')
-rw-r--r-- | searx/static/themes/simple/gruntfile.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/static/themes/simple/gruntfile.js b/searx/static/themes/simple/gruntfile.js index b7501c732..762ba1087 100644 --- a/searx/static/themes/simple/gruntfile.js +++ b/searx/static/themes/simple/gruntfile.js @@ -164,8 +164,8 @@ module.exports = function(grunt) { favicon: { files: { 'img/favicon.png': '<%= _brand %>/searxng-wordmark.svg', - 'img/searxng.png': '<%= _brand %>/searxng.svg' - + 'img/searxng.png': '<%= _brand %>/searxng.svg', + 'img/img_load_error.svg': '<%= _brand %>/img_load_error.svg' } } }, |