summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/result_templates/code.html
diff options
context:
space:
mode:
Diffstat (limited to 'searx/templates/oscar/result_templates/code.html')
-rw-r--r--searx/templates/oscar/result_templates/code.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html
new file mode 100644
index 0000000..ba74d03
--- /dev/null
+++ b/searx/templates/oscar/result_templates/code.html
@@ -0,0 +1,18 @@
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
+
+{{ result_header(result, favicons) }}
+{{ result_sub_header(result) }}
+
+{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
+
+{% if result.repository %}<p class="result-content">{{ icon('file') }} <a href="{{ result.repository }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %}>{{ result.repository }}</a></p>{% endif %}
+
+<div dir="ltr">
+{{ result.codelines|code_highlighter(result.code_language)|safe }}
+</div>
+
+{% if rtl %}
+{{ result_footer_rtl(result) }}
+{% else %}
+{{ result_footer(result) }}
+{% endif %}