Browse Source

[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>
Markus Heiser 4 years ago
parent
commit
f637bfc635
1 changed files with 2 additions and 2 deletions
  1. 2 2
      searx/templates/oscar/result_templates/default.html

+ 2 - 2
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>