mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[feat] add favicons to result urls
This commit is contained in:
parent
44a06190bb
commit
0e5ca5c95a
15 changed files with 247 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue