diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-12-29 15:58:18 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-04-15 08:52:11 +0200 |
commit | f637bfc63530c36ff7d92284807f5fff5ff58bf9 (patch) | |
tree | 54d8e77e30f5239f12a0a75f432ec0e23b3413f1 /searx/templates | |
parent | 062d589f865cf736620f4ff5d6a8476dfe980ba7 (diff) | |
download | searxng-f637bfc63530c36ff7d92284807f5fff5ff58bf9.tar.gz searxng-f637bfc63530c36ff7d92284807f5fff5ff58bf9.zip |
[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>
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/oscar/result_templates/default.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index d743f928e..53cfee5cb 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -13,10 +13,10 @@ </div> {%- endif -%} -{%- if result.img_src -%} +{%- if result.img_src or result.thumbnail -%} <div class="container-fluid">{{- "" -}} <div class="row">{{- "" -}} - <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"> + <img src="{{ image_proxify(result.img_src or result.thumbnail) }}" 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"> {%- if result.content %}<p class="result-content col-xs-8 col-sm-8 col-md-8">{{ result.content|safe }}</p>{% endif -%} </div>{{- "" -}} </div> |