From 4a195e0b28fdd940e046c442032c816095416fec Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Mon, 5 Jan 2015 02:04:23 +0100 Subject: Integrated media in results + Deezer Engine New "embedded" item for the results, allow to give an iframe to display the media directly in the results. Note that the attributes src of the iframes are not set, but instead data-src is set, allowing to only load the iframe when clicked. Deezer engine based on public API (no key). --- searx/templates/oscar/result_templates/default.html | 12 ++++++++++++ searx/templates/oscar/result_templates/videos.html | 12 ++++++++++++ 2 files changed, 24 insertions(+) (limited to 'searx/templates') diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index 6ab26132e..3e58588cc 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -5,8 +5,20 @@ {% if result.publishedDate %}{% endif %} {{ icon('link') }} {{ _('cached') }} +{% if result.embedded %} + +{% endif %} + {% if result.content %}

{{ result.content|safe }}

{% endif %} +{% if result.embedded %} +
+{% autoescape false %} + {{ result.embedded }} +{% endautoescape %} +
+{% endif %} +
{{ result.engine }} diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html index ef4c5dd83..187f5dfed 100644 --- a/searx/templates/oscar/result_templates/videos.html +++ b/searx/templates/oscar/result_templates/videos.html @@ -5,6 +5,10 @@ {% if result.publishedDate %}{% endif %} {{ icon('link') }} {{ _('cached') }} +{% if result.embedded %} + +{% endif %} +
{{ result.title|striptags }} {{ result.engine }} @@ -12,6 +16,14 @@
+{% if result.embedded %} +
+{% autoescape false %} + {{ result.embedded }} +{% endautoescape %} +
+{% endif %} +
{{ result.engine }} -- cgit v1.2.3