From 7adb17452d8c845f46858b4cebe8198988edfdbc Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 20 Dec 2014 23:33:03 +0100 Subject: [enh] add result_templates/code.html --- searx/templates/oscar/result_templates/code.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 searx/templates/oscar/result_templates/code.html (limited to 'searx/templates/oscar/result_templates/code.html') 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 %} + +

{% if result['favicon'] %}{{ result['favicon'] }} {% endif %}{{ result.title|safe }}

+ +{% if result.publishedDate %}{% endif %} +{{ icon('link') }} {{ _('cached') }} + +{% if result.content %}

{{ result.content|safe }}

{% endif %} + +{% if result.repository %}

{{ icon('file') }} {{ result.repository }}

{% endif %} + +{{ result.codelines|code_highlighter(result.code_language)|safe }} + +
+ +{{ result.engine }} +

{{ result.pretty_url }}

-- cgit v1.2.3 From d810763107733cec017b8688c0350dff527f2ed1 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Mon, 22 Dec 2014 16:07:02 +0100 Subject: [enh] remove repeating codeparts inside the oscar template --- searx/templates/oscar/result_templates/code.html | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'searx/templates/oscar/result_templates/code.html') diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html index d9079a464..236834d0a 100644 --- a/searx/templates/oscar/result_templates/code.html +++ b/searx/templates/oscar/result_templates/code.html @@ -1,9 +1,7 @@ -{% from 'oscar/macros.html' import icon %} +{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %} -

{% if result['favicon'] %}{{ result['favicon'] }} {% endif %}{{ result.title|safe }}

- -{% if result.publishedDate %}{% endif %} -{{ icon('link') }} {{ _('cached') }} +{{ result_header(result) }} +{{ result_sub_header(result) }} {% if result.content %}

{{ result.content|safe }}

{% endif %} @@ -11,7 +9,4 @@ {{ result.codelines|code_highlighter(result.code_language)|safe }} -
- -{{ result.engine }} -

{{ result.pretty_url }}

+{{ result_footer(result) }} -- cgit v1.2.3