From ae99f9070c7d96385aaea6d5f3d56cab8d2b3f46 Mon Sep 17 00:00:00 2001 From: misnyo Date: Fri, 8 Sep 2017 20:33:14 +0200 Subject: [fix] static path fixed in templates and webapp, line endings fixed --- searx/templates/oscar/macros.html | 175 +++++++++++++++++++------------------- 1 file changed, 87 insertions(+), 88 deletions(-) (limited to 'searx/templates/oscar/macros.html') diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index e71091e70..c35a19158 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -1,88 +1,87 @@ - -{% macro icon(action) -%} - -{%- endmacro %} - - - -{% macro draw_favicon(favicon) -%} - {{ favicon }} -{%- endmacro %} - -{%- macro result_link(url, title, classes='') -%} -{{ title }} -{%- endmacro -%} - - -{% macro result_header(result, favicons) -%} -

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

-{%- endmacro %} - - -{% macro result_sub_header(result) -%} - {% if result.publishedDate %}{% endif %} - {% if result.magnetlink %} • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}{% endif %} - {% if result.torrentfile %} • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}{% endif %} -{%- endmacro %} - - -{% macro result_footer(result) -%} -
-
- {% for engine in result.engines %} - {{ engine }} - {% endfor %} - {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} - {% if proxify %} - {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} - {% endif %} -
- -{%- endmacro %} - - -{% macro result_footer_rtl(result) -%} -
- {% for engine in result.engines %} - {{ engine }} - {% endfor %} - {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} - {% if proxify %} - {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} - {% endif %} - -{%- endmacro %} - -{% macro preferences_item_header(info, label, rtl) -%} - {% if rtl %} -
- - {{ info }} -
- {% else %} -
- -
- {% endif %} -{%- endmacro %} - -{% macro preferences_item_footer(info, label, rtl) -%} - {% if rtl %} -
-
- {% else %} -
- {{ info }} -
- {% endif %} -{%- endmacro %} - -{% macro checkbox_toggle(id, blocked) -%} -
- - -
-{%- endmacro %} + +{% macro icon(action) -%} + +{%- endmacro %} + + +{% macro draw_favicon(favicon) -%} + {{ favicon }} +{%- endmacro %} + +{%- macro result_link(url, title, classes='') -%} +{{ title }} +{%- endmacro -%} + + +{% macro result_header(result, favicons) -%} +

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

+{%- endmacro %} + + +{% macro result_sub_header(result) -%} + {% if result.publishedDate %}{% endif %} + {% if result.magnetlink %} • {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}{% endif %} + {% if result.torrentfile %} • {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}{% endif %} +{%- endmacro %} + + +{% macro result_footer(result) -%} +
+
+ {% for engine in result.engines %} + {{ engine }} + {% endfor %} + {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} + {% if proxify %} + {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} + {% endif %} +
+ +{%- endmacro %} + + +{% macro result_footer_rtl(result) -%} +
+ {% for engine in result.engines %} + {{ engine }} + {% endfor %} + {{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }} + {% if proxify %} + {{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }} + {% endif %} + +{%- endmacro %} + +{% macro preferences_item_header(info, label, rtl) -%} + {% if rtl %} +
+ + {{ info }} +
+ {% else %} +
+ +
+ {% endif %} +{%- endmacro %} + +{% macro preferences_item_footer(info, label, rtl) -%} + {% if rtl %} +
+
+ {% else %} +
+ {{ info }} +
+ {% endif %} +{%- endmacro %} + +{% macro checkbox_toggle(id, blocked) -%} +
+ + +
+{%- endmacro %} -- cgit v1.2.3 From 47ee15f5cee81ac1c68c07592349caecd2bf137a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Fri, 6 Oct 2017 21:50:59 +0200 Subject: preferences: make supported/not supported labels Also, Time range support display was missing from RTL locales. Now it is fixed. Closes #558 --- searx/templates/oscar/macros.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'searx/templates/oscar/macros.html') diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index c35a19158..6235bcc62 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -85,3 +85,15 @@ {%- endmacro %} + +{% macro support_toggle(supports) -%} + {% if supports %} + + {{ _("supported") }} + + {% else %} + + {{ _("not supported") }} + + {% endif %} +{%- endmacro %} -- cgit v1.2.3 From 904a8e7e3f62b32c117ecddfeae39ef3f5e47d1f Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 18 Oct 2017 23:44:11 -0400 Subject: Remove extra / in url_for parameter for oscar theme The `filename` parameter of the `url_for` function doesn't need a leading `/`, or else the resulting URL features a double-slash `//` that throws off searx 0.12.0 with Apache 2.4.25 on Debian, resulting in missing favicons. --- searx/templates/oscar/macros.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/templates/oscar/macros.html') diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index 6235bcc62..0ff957521 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -5,7 +5,7 @@ {% macro draw_favicon(favicon) -%} - {{ favicon }} + {{ favicon }} {%- endmacro %} {%- macro result_link(url, title, classes='') -%} -- cgit v1.2.3