summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-01-17 19:21:09 +0100
committerCqoicebordel <Cqoicebordel@users.noreply.github.com>2015-01-17 19:21:09 +0100
commitcb4a3fe598707fc42f86ea3f7bcf517dcd4db660 (patch)
treef5ee1ea08f2b491c58806e236664c23389b8ff21 /searx/templates
parentedd9d311809d8f6eab5109f9cd899e7989bb42d5 (diff)
Add thumbnails in images results
- Modify engines to create/fetch an URL for the thumbnails - Modify themes to show thumbnails instead of full images. In Courgette, the result is not very beautiful. Should we change it ?
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/courgette/result_templates/images.html2
-rw-r--r--searx/templates/default/result_templates/images.html2
-rw-r--r--searx/templates/oscar/result_templates/images.html4
3 files changed, 4 insertions, 4 deletions
diff --git a/searx/templates/courgette/result_templates/images.html b/searx/templates/courgette/result_templates/images.html
index bf2a686ac..6a4d7ae83 100644
--- a/searx/templates/courgette/result_templates/images.html
+++ b/searx/templates/courgette/result_templates/images.html
@@ -1,6 +1,6 @@
<div class="image_result">
<p>
- <a href="{{ result.img_src }}"><img src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
+ <a href="{{ result.img_src }}"><img src="{{ image_proxify(result.thumbnail_src) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
<span class="url"><a href="{{ result.url }}" class="small_font">{{ _('original context') }}</a></span>
</p>
</div>
diff --git a/searx/templates/default/result_templates/images.html b/searx/templates/default/result_templates/images.html
index d6a0f84a1..7f209030f 100644
--- a/searx/templates/default/result_templates/images.html
+++ b/searx/templates/default/result_templates/images.html
@@ -1,6 +1,6 @@
<div class="image_result">
<p>
- <a href="{{ result.img_src }}"><img src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
+ <a href="{{ result.img_src }}"><img src="{{ image_proxify(result.thumbnail_src) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
<span class="url"><a href="{{ result.url }}" class="small_font">{{ _('original context') }}</a></span>
</p>
</div>
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html
index 155c24153..7051bb737 100644
--- a/searx/templates/oscar/result_templates/images.html
+++ b/searx/templates/oscar/result_templates/images.html
@@ -1,7 +1,7 @@
{% from 'oscar/macros.html' import draw_favicon %}
<a href="{{ result.img_src }}" data-toggle="modal" data-target="#modal-{{ index }}">
- <img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="img-thumbnail">
+ <img src="{{ image_proxify(result.thumbnail_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="img-thumbnail">
</a>
<div class="modal fade" id="modal-{{ index }}" tabindex="-1" role="dialog" aria-hidden="true">
@@ -12,7 +12,7 @@
<h4 class="modal-title">{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result.title|striptags }}</h4>
</div>
<div class="modal-body">
- <img class="img-responsive center-block" src="{{ result.img_src }}" alt="{{ result.title }}">
+ <img class="img-responsive center-block" src="{{ result.thumbnail_src }}" alt="{{ result.title|striptags }}">
{% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
</div>
<div class="modal-footer">