on master help sign in
[ehn] Add a 'featured result feature'm putting on top of the reasults ddg definitions and wikipedia (ugly html / css)

[ehn] Add a templates for videos, so the thumbnails all have the same side

commitd43bd05582c189d8696d58e22c160399ed0b811d authorpw3t <romain@berthor.fr> dateSun 12 Jan 2014, 18:31 (13 years ago) parenta8ec7fe
2 files changed+2−4
searx/templates/result_templates/videos.html+1−3 searx/webapp.py+1−1
searx/templates/result_templates/videos.html+1−3
@@ -1,12 +1,10 @@
11<div class="result">
2−
32 {% if result['favicon'] %}
43 <div style="float:left; margin:2px;">
5− <img width="18" height="18" src="static/img/icon_{{result['favicon']}}.png" alt="{{result['favicon']}}.png" title="{{result['favicon']}}.png" />
4+ <img width="18" height="18" src="static/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}.ico" title="{{result['favicon']}}.ico" />
65 </div>
76 {% endif %}
87
9−
108 <p>
119 <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
1210 <a href="{{ result.url }}"><img width="300" height="170" src="{{ result.thumbnail }}" title={{ result.title }} alt=" {{ result.title }}"/></a>
searx/webapp.py+1−1
@@ -141,7 +141,7 @@ def index():
141141 result['pretty_url'] = result['url']
142142
143143 for engine in result['engines']:
144− if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter']:
144+ if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter', 'stackoverflow']:
145145 result['favicon'] = engine
146146 if engine in ['wikipedia', 'ddg definitions']:
147147 featured_results.append(result)