From a6f20caf32af463b57a026ee7cb7ed6317db6b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Mon, 23 Sep 2019 17:14:32 +0200 Subject: add initial support for offline engines && command engine --- searx/templates/oscar/macros.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'searx/templates/oscar/macros.html') diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index 0ff957521..5f6463642 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -14,7 +14,7 @@ {% macro result_header(result, favicons) -%} -

{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result_link(result.url, result.title|safe) }}

+

{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe) }}{% else %}{{ result.title|safe}}{% endif %}

{%- endmacro %} @@ -31,12 +31,16 @@ {% for engine in result.engines %} {{ engine }} {% endfor %} + {% if result.url %} {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} + {% endif %} {% if proxify %} {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} {% endif %} +{% if result.pretty_url %} +{% endif %} {%- endmacro %} @@ -45,11 +49,15 @@ {% for engine in result.engines %} {{ engine }} {% endfor %} + {% if result.url %} {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} + {% endif %} {% if proxify %} {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} {% endif %} + {% if result.pretty_url %} + {% endif %} {%- endmacro %} {% macro preferences_item_header(info, label, rtl) -%} -- cgit v1.2.3 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 --- searx/templates/oscar/macros.html | 46 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'searx/templates/oscar/macros.html') diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index 5f6463642..d2d1dc643 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -26,38 +26,38 @@ {% macro result_footer(result) -%} -
+
{{- "" -}}
- {% for engine in result.engines %} - {{ engine }} - {% endfor %} - {% if result.url %} - {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} - {% endif %} - {% if proxify %} - {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} - {% endif %} -
-{% if result.pretty_url %} - -{% endif %} + {%- for engine in result.engines -%} + {{ engine }} + {%- endfor -%} + {%- if result.url -%} + {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} + {%- endif -%} + {%- if proxify -%} + {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} + {%- endif -%} + + {%- if result.pretty_url -%} + + {%- endif -%} {%- endmacro %} {% macro result_footer_rtl(result) -%} -
- {% for engine in result.engines %} +
{{- "" -}} + {% for engine in result.engines -%} {{ engine }} - {% endfor %} - {% if result.url %} + {%- endfor %} + {%- if result.url -%} {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} - {% endif %} - {% if proxify %} + {%- endif -%} + {% if proxify -%} {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} - {% endif %} - {% if result.pretty_url %} + {%- endif %} + {%- if result.pretty_url -%} - {% endif %} + {%- endif %} {%- endmacro %} {% macro preferences_item_header(info, label, rtl) -%} -- cgit v1.2.3