{% macro excerptWithHighlight(index, unsafe_excerpt, q) %} {% set modified_excerpt = unsafe_excerpt %} {% if index > 0 %} {% set modified_excerpt = '...' ~ modified_excerpt %} {% endif %} {% set modified_excerpt = modified_excerpt ~ '...' %} {% set text = modified_excerpt|hl(q) %}
{{ text|raw }}
{% endmacro %} {% import _self as macros %} {% set subtitle = file.getSubtitle() %} {% set meta = file.getMeta(search_query) %} {% set title = file.getTitleHtml() %} {% if not title %} {% set title = file.getTitle()|hl(search_query) %} {% endif %}
{{ svg(file.getIcon()~'_20') }}
{{ title|raw }} {% if file.type == 'folder' and file.isTargetBlank() %} {{ svg('arrow_up_right_out_square_outline_12') }} {% endif %} {% if subtitle %} {{ subtitle }} {% endif %} {% if meta.inline %} {%- for item in meta.items -%}
{{ item|raw }}
{%- endfor -%} {% endif %}
{% if meta.items and not meta.inline %}
{%- for item in meta.items -%}
{{ item|raw }}
{%- endfor -%}
{% endif %} {% if text_excerpts[file.getId()] %} {{ macros.excerptWithHighlight(text_excerpts[file.getId()]['index'], text_excerpts[file.getId()]['excerpt'], search_query) }} {% endif %}