4.2 KiB
4.2 KiB
{% macro icon(action) -%}
{%- endmacro %}
{% macro draw_favicon(favicon) -%}
{%- endmacro %}
{%- macro result_link(url, title, classes='') -%}
{{ title }}
{%- endmacro -%}
{% macro result_header(result, favicons) -%}
{%- endmacro %}
{% macro support_toggle(supports) -%}
{% if supports %}
{{ _("supported") }}
{% else %}
{{ _("not supported") }}
{% endif %}
{%- endmacro %}
{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{% if result.url %}{{ result_link(result.url, result.title|safe) }}{% else %}{{ result.title|safe}}{% endif %}
{%- 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 -%}
{%- if result.url -%}
{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}
{%- endif -%}
{%- if proxify -%}
{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}
{%- endif -%}
{%- if result.pretty_url -%}
{{ result.pretty_url }}
{%- endif -%}
{%- endmacro %}
{% macro result_footer_rtl(result) -%}
{{- "" -}}
{% for engine in result.engines -%}
{{ engine }}
{%- endfor %}
{%- if result.url -%}
{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}
{%- endif -%}
{% if proxify -%}
{{ result_link(proxify(result.url), icon('sort') + _('proxied'), "text-info") }}
{%- endif %}
{%- if result.pretty_url -%}
{{ result.pretty_url }}
{%- endif %}
{%- endmacro %}
{% macro preferences_item_header(info, label, rtl) -%}
{% if rtl %}
{{ label }}
{{ info }}
{% endif %}
{%- endmacro %}
{% macro checkbox_toggle(id, blocked) -%}
{% else %}
{{ info }}
{{ label }}
{% else %}
{% endif %}
{%- endmacro %}
{% macro preferences_item_footer(info, label, rtl) -%}
{% if rtl %}