libremiami-search/searx/templates/simple/macros.html

3.7 KiB
Raw Blame History

{% macro icon(action) -%} {%- endmacro %} {% macro icon_small(action) -%} {%- endmacro %} {% macro draw_favicon(favicon) -%} {{ favicon }} {%- endmacro %} {% macro result_open_link(url, classes='') -%} {%- endmacro %} {%- macro result_close_link() -%} {%- endmacro %} {%- macro result_link(url, title, classes='') -%} {{ result_open_link(url, classes) }}{{ title }}{{ result_close_link() }} {%- endmacro -%} {% macro result_header(result, favicons, image_proxify) -%}
{%- if result.img_src %}{{ result_open_link(result.url) }}{{ result.title|striptags }}{{ result_close_link() }}{% endif -%} {%- if result.thumbnail %}{{ result_open_link(result.url) }}{{ result.title|striptags }}{{ result_close_link() }}{% endif -%}

{{ result_link(result.url, result.title|safe) }}

{%- endmacro -%} {%- macro result_sub_header(result) -%} {% if result.publishedDate %}{% endif %} {%- endmacro -%} {%- macro result_sub_footer(result, proxify) -%}
{% for engine in result.engines %}{{ engine }}{% endfor %}
{{- '' -}}

{{ result.pretty_url }}{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "cache_link") }} {% if proxify %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}

{{- '' -}}
{{- '' -}} {%- endmacro -%} {%- macro result_footer(result) -%}
{%- endmacro -%} {%- macro tabs_open() -%}
{%- endmacro -%} {%- macro tab_header(name, id, label) -%}
{%- endmacro -%} {%- macro tab_footer() -%}
{%- endmacro -%} {%- macro tabs_close() -%}
{%- endmacro -%} {%- macro checkbox_onoff(name, checked) -%}
{{- '' -}} {{- '' -}} {{- '' -}}
{%- endmacro -%} {%- macro checkbox(name, checked, readonly, disabled) -%}
{{- '' -}} {{- '' -}} {{- '' -}}
{%- endmacro -%}