summaryrefslogtreecommitdiff
path: root/searx/templates/simple/result_templates/code.html
diff options
context:
space:
mode:
Diffstat (limited to 'searx/templates/simple/result_templates/code.html')
-rw-r--r--searx/templates/simple/result_templates/code.html27
1 files changed, 23 insertions, 4 deletions
diff --git a/searx/templates/simple/result_templates/code.html b/searx/templates/simple/result_templates/code.html
index 3fe429caa..7d2c8ff79 100644
--- a/searx/templates/simple/result_templates/code.html
+++ b/searx/templates/simple/result_templates/code.html
@@ -2,12 +2,31 @@
{{ result_header(result, favicons, image_proxify) -}}
{{- result_sub_header(result) -}}
-{%- if result.content %}{{ result.content|safe }}{% endif %}</p>
+
+{%- if result.content -%}
+ <p class="content">
+ {{- result.content|safe -}}
+ </p>
+{%- endif -%}
{%- if result.repository -%}
-<p class="content"><a href="{{ result.repository|safe }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>
+ <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>{{- '' -}}
+</div>
+
{{- result_sub_footer(result, proxify) -}}
-{{ result_footer(result) }}
+{{- result_footer(result) -}}