[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
This commit is contained in:
		
							parent
							
								
									a8ec7fe6a4
								
							
						
					
					
						commit
						d43bd05582
					
				| @ -1,12 +1,10 @@ | |||||||
| <div class="result"> | <div class="result"> | ||||||
|    |  | ||||||
|   {% if result['favicon'] %} |   {% if result['favicon'] %} | ||||||
|   <div style="float:left; margin:2px;"> |   <div style="float:left; margin:2px;"> | ||||||
|     <img width="18" height="18" src="static/img/icon_{{result['favicon']}}.png" alt="{{result['favicon']}}.png" title="{{result['favicon']}}.png" /> |     <img width="18" height="18" src="static/img/icon_{{result['favicon']}}.ico" alt="{{result['favicon']}}.ico" title="{{result['favicon']}}.ico" /> | ||||||
|   </div> |   </div> | ||||||
|   {% endif %} |   {% endif %} | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|     <p> |     <p> | ||||||
|       <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3> |       <h3 class="result_title"><a href="{{ result.url }}">{{ result.title|safe }}</a></h3> | ||||||
|       <a href="{{ result.url }}"><img width="300" height="170"  src="{{ result.thumbnail }}" title={{ result.title }} alt=" {{ result.title }}"/></a> |       <a href="{{ result.url }}"><img width="300" height="170"  src="{{ result.thumbnail }}" title={{ result.title }} alt=" {{ result.title }}"/></a> | ||||||
|  | |||||||
| @ -141,7 +141,7 @@ def index(): | |||||||
|             result['pretty_url'] = result['url'] |             result['pretty_url'] = result['url'] | ||||||
| 
 | 
 | ||||||
|         for engine in result['engines']: |         for engine in result['engines']: | ||||||
|             if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter']: |             if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter', 'stackoverflow']: | ||||||
|                 result['favicon'] = engine |                 result['favicon'] = engine | ||||||
|             if engine in ['wikipedia', 'ddg definitions']: |             if engine in ['wikipedia', 'ddg definitions']: | ||||||
|                 featured_results.append(result) |                 featured_results.append(result) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user