From f34ac58752b3857468d01c79d7bc3409e8b03fe3 Mon Sep 17 00:00:00 2001 From: Dalf Date: Tue, 6 Aug 2019 11:41:16 +0200 Subject: [mod] tidy oscar HTML output --- .../templates/oscar/result_templates/default.html | 62 ++++++++-------- searx/templates/oscar/result_templates/images.html | 85 +++++++++------------- 2 files changed, 67 insertions(+), 80 deletions(-) (limited to 'searx/templates/oscar/result_templates') diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index 3ed0f3122..885cbbfa8 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -1,31 +1,31 @@ -{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context %} - -{{ result_header(result, favicons) }} -{{ result_sub_header(result) }} - -{% if result.embedded %} - -{% endif %} - -{% if result.embedded %} -
- {{ result.embedded|safe }} -
-{% endif %} - -{% if result.img_src %} -
-
-{{ 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) }} -{% else %} -{{ result_footer(result) }} -{% endif %} +{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context %} + +{{- result_header(result, favicons) -}} +{{- result_sub_header(result) -}} + +{%- if result.embedded -%} + +{%- endif -%} + +{%- if result.embedded -%} +
+ {{ result.embedded|safe }} +
+{%- endif -%} + +{%- if result.img_src -%} +
+
+{{ 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) }} +{%- else -%} +{{ result_footer(result) }} +{%- endif -%} diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index b3292f448..8985a9f4e 100644 --- a/searx/templates/oscar/result_templates/images.html +++ b/searx/templates/oscar/result_templates/images.html @@ -1,49 +1,36 @@ -{% from 'oscar/macros.html' import draw_favicon %} - - - {{ result.title|striptags }} - - - +{%- from 'oscar/macros.html' import draw_favicon -%} + +{{- "" -}} + {{ result.title|striptags }}{{- "" -}} + +{{- "" -}} -- cgit v1.2.3