From c36c935b03cc87ddfcac5ce3ded333be73387a7a Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sun, 5 Oct 2014 15:29:21 +0200 Subject: oscar template: add infobox --- searx/templates/oscar/infobox.html | 28 ++++++++++++++++++++++++++++ searx/templates/oscar/results.html | 14 ++++++++------ 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 searx/templates/oscar/infobox.html (limited to 'searx/templates') diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html new file mode 100644 index 000000000..541da8ba7 --- /dev/null +++ b/searx/templates/oscar/infobox.html @@ -0,0 +1,28 @@ +
+
+

{{ infobox.infobox }}

+
+
+ {% if infobox.img_src %}{% endif %} + {% if infobox.content %}

{{ infobox.content }}

{% endif %} + + {% if infobox.attributes %} + + {% for attribute in infobox.attributes %} + + + + + {% endfor %} +
{{ attribute.label }}{{ attribute.value }}
+ {% endif %} + + {% if infobox.urls %} +
+ {% for url in infobox.urls %} +

{{ url.title }}

+ {% endfor %} +
+ {% endif %} +
+
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 6b02dc7bd..0bf4914b4 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -47,9 +47,7 @@ {% if suggestions %}
-

- {{ _('Suggestions') }} -

+

{{ _('Suggestions') }}

{% for suggestion in suggestions %} @@ -64,9 +62,7 @@
-

- {{ _('Links') }} -

+

{{ _('Links') }}

@@ -91,6 +87,12 @@
+ {% if infoboxes %} + {% for infobox in infoboxes %} + {% include 'oscar/infobox.html' %} + {% endfor %} + {% endif %} +
{% endblock %} -- cgit v1.2.3