[enh] add image proxy to image results

This commit is contained in:
Adam Tauber 2015-01-16 16:26:48 +01:00
parent 01143f48c5
commit a1bf02e652
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
<div class="image_result"> <div class="image_result">
<p> <p>
<a href="{{ result.img_src }}"><img src="{{ result.img_src }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a> <a href="{{ result.img_src }}"><img src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}"/></a>
<span class="url"><a href="{{ result.url }}" class="small_font">{{ _('original context') }}</a></span> <span class="url"><a href="{{ result.url }}" class="small_font">{{ _('original context') }}</a></span>
</p> </p>
</div> </div>

View file

@ -1,6 +1,6 @@
<div class="image_result"> <div class="image_result">
<p> <p>
<a href="{{ result.img_src }}"><img src="{{ result.img_src }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a> <a href="{{ result.img_src }}"><img src="{{ image_proxify(result.img_src) }}" title="{{ result.title|striptags }}" alt="{{ result.title|striptags }}" /></a>
<span class="url"><a href="{{ result.url }}" class="small_font">{{ _('original context') }}</a></span> <span class="url"><a href="{{ result.url }}" class="small_font">{{ _('original context') }}</a></span>
</p> </p>
</div> </div>

View file

@ -1,7 +1,7 @@
{% from 'oscar/macros.html' import draw_favicon %} {% from 'oscar/macros.html' import draw_favicon %}
<a href="{{ result.img_src }}" data-toggle="modal" data-target="#modal-{{ index }}"> <a href="{{ result.img_src }}" data-toggle="modal" data-target="#modal-{{ index }}">
<img src="{{ result.img_src }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="img-thumbnail"> <img src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="img-thumbnail">
</a> </a>
<div class="modal fade" id="modal-{{ index }}" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal fade" id="modal-{{ index }}" tabindex="-1" role="dialog" aria-hidden="true">