diff options
author | Brock Vojkovic <github@vojk.au> | 2024-08-11 08:39:46 +0000 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-10-05 08:18:28 +0200 |
commit | e17d7632d0ed8284c218f65604ab5fa5d4b8ff81 (patch) | |
tree | 720692ebe4c8087f6c928d28f79bae5040a85605 /searx/templates/simple/macros.html | |
parent | 3e747d0491b23f9431ce6ccc79875233614e165a (diff) | |
download | searxng-e17d7632d0ed8284c218f65604ab5fa5d4b8ff81.tar.gz searxng-e17d7632d0ed8284c218f65604ab5fa5d4b8ff81.zip |
[feat] add favicons to result urls
Diffstat (limited to 'searx/templates/simple/macros.html')
-rw-r--r-- | searx/templates/simple/macros.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html index f7af553b6..418f85227 100644 --- a/searx/templates/simple/macros.html +++ b/searx/templates/simple/macros.html @@ -21,9 +21,29 @@ {% macro result_header(result, favicons, image_proxify) -%} <article class="result {% if result['template'] %}result-{{ result.template|replace('.html', '') }}{% else %}result-default{% endif %} {% if result['category'] %}category-{{ result['category'] }}{% endif %}{% for e in result.engines %} {{ e }}{% endfor %}"> {{- result_open_link(result.url, "url_wrapper") -}} + {% if not rtl %} + {%- if favicon_resolver != "" %} + <div class="favicon"> + <img + alt="{{ result.parsed_url.netloc }}" + src="{{ favicon_proxify(result.parsed_url.netloc) }}" + > + </div> + {%- endif -%} + {%- endif -%} {%- for part in get_pretty_url(result.parsed_url) -%} <span class="url_o{{loop.index}}"><span class="url_i{{loop.index}}">{{- part -}}</span></span> {%- endfor %} + {% if rtl %} + {%- if favicon_resolver != "" %} + <div class="favicon"> + <img + alt="{{ result.parsed_url.netloc }}" + src="{{ favicon_proxify(result.parsed_url.netloc) }}" + > + </div> + {%- endif -%} + {%- endif -%} {{- result_close_link() -}} {%- if result.thumbnail %}{{ result_open_link(result.url) }}<img class="thumbnail" src="{{ image_proxify(result.thumbnail) }}" title="{{ result.title|striptags }}" loading="lazy">{{ result_close_link() }}{% endif -%} <h3>{{ result_link(result.url, result.title|safe) }}</h3> |