From d810763107733cec017b8688c0350dff527f2ed1 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Mon, 22 Dec 2014 16:07:02 +0100 Subject: [enh] remove repeating codeparts inside the oscar template --- searx/templates/oscar/macros.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'searx/templates/oscar/macros.html') diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index f61de2015..1dc696341 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -1,3 +1,28 @@ + {% macro icon(action) -%} {%- endmacro %} + + + +{% macro draw_favicon(favicon) -%} + {{ favicon }} +{%- endmacro %} + + +{% macro result_header(result) -%} +

{% if result.favicon %}{{ draw_favicon(result.favicon) }} {% endif %}{{ result.title|safe }}

+{%- endmacro %} + + +{% macro result_sub_header(result) -%} + {% if result.publishedDate %}{% endif %} + {{ icon('link') }} {{ _('cached') }} +{%- endmacro %} + + +{% macro result_footer(result) -%} +
+ {{ result.engine }} +

{{ result.pretty_url }}

+{%- endmacro %} -- cgit v1.2.3