Browse Source

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

pw3t 11 years ago
parent
commit
d43bd05582
2 changed files with 2 additions and 4 deletions
  1. 1
    3
      searx/templates/result_templates/videos.html
  2. 1
    1
      searx/webapp.py

+ 1
- 3
searx/templates/result_templates/videos.html View File

@@ -1,12 +1,10 @@
1 1
 <div class="result">
2
-  
3 2
   {% if result['favicon'] %}
4 3
   <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" />
6 5
   </div>
7 6
   {% endif %}
8 7
 
9
-
10 8
     <p>
11 9
       <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3>
12 10
       <a href="{{ result.url }}"><img width="300" height="170"  src="{{ result.thumbnail }}" title={{ result.title }} alt=" {{ result.title }}"/></a>

+ 1
- 1
searx/webapp.py View File

@@ -141,7 +141,7 @@ def index():
141 141
             result['pretty_url'] = result['url']
142 142
 
143 143
         for engine in result['engines']:
144
-            if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter']:
144
+            if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter', 'stackoverflow']:
145 145
                 result['favicon'] = engine
146 146
             if engine in ['wikipedia', 'ddg definitions']:
147 147
                 featured_results.append(result)