summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/result_templates/code.html
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-12-20 23:33:03 +0100
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-12-20 23:33:03 +0100
commit7adb17452d8c845f46858b4cebe8198988edfdbc (patch)
treec067e862d398de12544c48c3eb64e6401a8bb199 /searx/templates/oscar/result_templates/code.html
parent2e41bfcbdbb762be610ff379380ea2201f544edd (diff)
[enh] add result_templates/code.html
Diffstat (limited to 'searx/templates/oscar/result_templates/code.html')
-rw-r--r--searx/templates/oscar/result_templates/code.html17
1 files changed, 17 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 000000000..d9079a464
--- /dev/null
+++ b/searx/templates/oscar/result_templates/code.html
@@ -0,0 +1,17 @@
+{% from 'oscar/macros.html' import icon %}
+
+<h4 class="result_header">{% if result['favicon'] %}<img width="32" height="32" class="favicon" src="static/{{ theme }}/img/icons/{{ result['favicon'] }}.png" alt="{{ result['favicon'] }}" /> {% endif %}<a href="{{ result.url }}">{{ result.title|safe }}</a></h4>
+
+{% if result.publishedDate %}<time class="text-muted" datetime="{{ result.pubdate }}" >{{ result.publishedDate }}</time>{% endif %}
+<small><a class="text-info" href="https://web.archive.org/web/{{ result.url }}">{{ icon('link') }} {{ _('cached') }}</a></small>
+
+{% 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|safe }}">{{ result.repository }}</a></p>{% endif %}
+
+{{ result.codelines|code_highlighter(result.code_language)|safe }}
+
+<div class="clearfix"></div>
+
+<span class="label label-default pull-right">{{ result.engine }}</span>
+<p class="text-muted">{{ result.pretty_url }}</p>