diff --git a/searx/templates/courgette/result_templates/code.html b/searx/templates/courgette/result_templates/code.html index 953617e8..d6dbd5ed 100644 --- a/searx/templates/courgette/result_templates/code.html +++ b/searx/templates/courgette/result_templates/code.html @@ -1,11 +1,11 @@ -
-

{% if result['favicon'] %}{{result['favicon']}}{% endif %}{{ result.title|safe }}

- {% if result.publishedDate %}{{ result.publishedDate }}{% endif %} -

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

- {% if result.repository %}

{{ result.repository }}

{% endif %} -
- {{ result.codelines|code_highlighter(result.code_language)|safe }} -
- -

{{ result.pretty_url }}‎

-
+
+

{{ result.title|safe }}

+ {% if result.publishedDate %}{{ result.publishedDate }}{% endif %} +

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

+ {% if result.repository %}

{{ result.repository }}

{% endif %} +
+ {{ result.codelines|code_highlighter(result.code_language)|safe }} +
+ +

{{ result.pretty_url }}‎

+
diff --git a/searx/templates/legacy/result_templates/code.html b/searx/templates/legacy/result_templates/code.html index 9e3ed20a..fee6c822 100644 --- a/searx/templates/legacy/result_templates/code.html +++ b/searx/templates/legacy/result_templates/code.html @@ -1,11 +1,11 @@ -
-

{% if result['favicon'] %}{{result['favicon']}}{% endif %}{{ result.title|safe }}

-

{{ result.pretty_url }}‎ {{ _('cached') }}

- {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} -

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

- {% if result.repository %}

{{ result.repository }}

{% endif %} - -
- {{ result.codelines|code_highlighter(result.code_language)|safe }} -
-
+
+

{{ result.title|safe }}

+

{{ result.pretty_url }}‎ {{ _('cached') }}

+ {% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %} +

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

+ {% if result.repository %}

{{ result.repository }}

{% endif %} + +
+ {{ result.codelines|code_highlighter(result.code_language)|safe }} +
+
diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index e71091e7..c35a1915 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 %} diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html index 76c53a63..88350368 100644 --- a/searx/templates/simple/macros.html +++ b/searx/templates/simple/macros.html @@ -8,9 +8,8 @@ {%- endmacro %} - {% macro draw_favicon(favicon) -%} - {{ favicon }} + {{ favicon }} {%- endmacro %} {% macro result_open_link(url, classes='') -%} diff --git a/searx/webapp.py b/searx/webapp.py index 3afdbefd..0751fb98 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -792,7 +792,8 @@ def opensearch(): @app.route('/favicon.ico') def favicon(): return send_from_directory(os.path.join(app.root_path, - 'static/themes', + static_path, + 'themes', get_current_theme_name(), 'img'), 'favicon.png',