4 KiB
4 KiB
{% from 'beetroot/icons.html' import icon_small %}
{% macro draw_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) -%}
{{- result_open_link(result.url, "url_wrapper") -}}
{%- for part in get_pretty_url(result.parsed_url) -%}
{{- part -}}
{%- endfor %}
{{- result_close_link() -}}
{%- if result.img_src %}{{ result_open_link(result.url) }}{{ result_close_link() }}{% endif -%}
{%- if result.thumbnail %}{{ result_open_link(result.url) }}{{ result_close_link() }}{% endif -%}
{%- endmacro -%}
{%- macro tabs_open() -%}
{{ result_link(result.url, result.title|safe) }}
{%- endmacro -%} {%- macro result_sub_header(result) -%} {%- if result.publishedDate %}{% endif -%} {%- if result.length %}{{ _('Length') }}: {{ result.length }}
{% endif -%}
{%- if result.author %}{{ _('Author') }}: {{ result.author }}
{% endif -%}
{%- if result.metadata %}{{ result.metadata|safe }}
{% endif -%}
{%- endmacro -%}
{%- macro result_sub_footer(result, proxify) -%}
{% for engine in result.engines %}{{ engine }}{% endfor %}
{{ result_link(cache_url + result.url, icon_small('ellipsis-vertical-outline') + _('cached'), "cache_link") }} {% if proxify and proxify_results %} {{ result_link(proxify(result.url), icon('link') + _('proxied'), "proxyfied_link") }} {% endif %}
{{- '' -}}
{{- '' -}}
{%- endmacro -%}
{%- macro result_footer(result) -%}
{%- endmacro -%}
{%- macro tab_header(name, id, label, checked) -%}
{%- endmacro -%}
{%- macro tab_footer() -%}
{%- endmacro -%}
{%- macro tabs_close() -%}
{%- endmacro -%}
{%- macro checkbox_onoff(name, checked) -%}
{%- endmacro -%}
{%- macro checkbox(name, checked, disabled) -%}
{%- if checked == '?' -%}
{{- icon_small('warning') -}}
{%- else -%}
{%- endif -%}
{%- endmacro -%}