From 63d68c8e0fe353af38c5b9b7bdd11b2bcf61346c Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Thu, 21 Apr 2016 15:10:08 +0200 Subject: [PATCH 1/2] [enh] add img_src to default result template --- searx/templates/oscar/result_templates/default.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index fc61b8ce0..cd2351e28 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -13,7 +13,12 @@ {% endif %} -{% if result.content %}

{{ result.content|safe }}

{% endif %} +
+
+{% if result.img_src %}{{ result.title|striptags }}{% endif %} +{% if result.content %}

{{ result.content|safe }}

{% endif %} +
+
{% if rtl %} {{ result_footer_rtl(result) }} From 1833a8b1b8da7f8edcc2b76d945347ab77629d31 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Thu, 21 Apr 2016 15:13:26 +0200 Subject: [PATCH 2/2] [fix] use old system if there is no img_src --- searx/templates/oscar/result_templates/default.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index cd2351e28..f283693c3 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -13,12 +13,16 @@ {% endif %} +{% if result.img_src %}
-{% if result.img_src %}{{ result.title|striptags }}{% endif %} +{{ result.title|striptags }} {% if result.content %}

{{ result.content|safe }}

{% endif %}
+{% else %} +{% if result.content %}

{{ result.content|safe }}

{% endif %} +{% endif %} {% if rtl %} {{ result_footer_rtl(result) }}