summaryrefslogtreecommitdiff
path: root/searx/templates/simple/result_templates/code.html
blob: 7d2c8ff7934bbaf9580a8b81cf5036994d78bc59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{% from 'simple/macros.html' import result_header, result_sub_header, result_sub_footer, result_footer with context %}

{{ result_header(result, favicons, image_proxify) -}}
{{- result_sub_header(result) -}}

{%- if result.content -%}
  <p class="content">
    {{- result.content|safe -}}
  </p>
{%- endif -%}
{%- if result.repository -%}
  <p class="content">{{- '' -}}
    {{ _('repo') }}: {{- ' ' -}}
    <a href="{{ result.repository|safe }}"{{- ' ' -}}
       {% if results_on_new_tab %}
         target="_blank" {{- ' ' -}}
         rel="noopener noreferrer"
       {%- else -%}
         rel="noreferrer"
       {%- endif -%}
       >
       {{- result.repository -}}
    </a>{{- '' -}}
  </p>
{%- endif -%}

<div dir="ltr" class="codelines">
    {{- result.codelines|code_highlighter(result.code_language)|safe -}}
</div>

{{- result_sub_footer(result, proxify) -}}
{{- result_footer(result) -}}