From 380b440a55ba3b8ec1430843226fa6b4b0dfe289 Mon Sep 17 00:00:00 2001 From: pw3t Date: Thu, 16 Jan 2014 21:58:18 +0100 Subject: [PATCH] [fix] replace the png icons by ico's, minor chnage in the html --- searx/engines/mediawiki.py | 6 ------ searx/static/css/style.css | 7 ------- searx/templates/result_templates/featured_results.html | 10 ---------- searx/templates/results.html | 3 --- searx/webapp.py | 3 --- 5 files changed, 29 deletions(-) delete mode 100644 searx/templates/result_templates/featured_results.html diff --git a/searx/engines/mediawiki.py b/searx/engines/mediawiki.py index 19b4406b5..00ad0f106 100644 --- a/searx/engines/mediawiki.py +++ b/searx/engines/mediawiki.py @@ -18,9 +18,3 @@ def response(resp): return [{'url': url + 'wiki/' + quote(result['title'].replace(' ', '_').encode('utf-8')), 'title': result['title']} for result in res[:int(number_of_results)]] - if not len(res): - return results - for result in res[:int(number_of_results)]: - results.append({'url': url + 'wiki/' + quote(result['title'].replace(' ', '_').encode('utf-8')), 'title': result['title'], 'favicon':'wikipedia'}) - return results - diff --git a/searx/static/css/style.css b/searx/static/css/style.css index 868f2f813..83d281806 100644 --- a/searx/static/css/style.css +++ b/searx/static/css/style.css @@ -151,13 +151,6 @@ tr:hover td { background: #DDDDDD; } #result_count { font-size: 0.8em; margin: 2px 0 2px 0; padding: 0 } -#fr { padding: 2px 6px; -display: inline-block; -background: #ECF0F1; -border-radius: 4px; -border: 1px solid #3498DB;; -width:55em;} - #suggestions { position: absolute; left: 54em; width: 12em; margin: 0 2px 5px 5px; padding: 0 2px 2px 2px; } #suggestions span { display: block; font-size: 0.8em; margin: 0 2px 10px 2px; padding: 0; } #suggestions form { display: block; } diff --git a/searx/templates/result_templates/featured_results.html b/searx/templates/result_templates/featured_results.html deleted file mode 100644 index 4aeddfe24..000000000 --- a/searx/templates/result_templates/featured_results.html +++ /dev/null @@ -1,10 +0,0 @@ -
- {% for result in featured_results %} - - {% if result['template'] %} - {% include 'result_templates/'+result['template'] %} - {% else %} - {% include 'result_templates/default.html' %} - {% endif %} - {% endfor %} -
diff --git a/searx/templates/results.html b/searx/templates/results.html index b35416ffa..be40900c3 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -14,9 +14,6 @@
Number of results: {{ number_of_results }}
- {% if featured_results %} - {% include 'result_templates/featured_results.html' %} - {% endif %} {% for result in results %} {% if result['template'] %} diff --git a/searx/webapp.py b/searx/webapp.py index bc534d36b..07db95452 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -144,9 +144,6 @@ def index(): for engine in result['engines']: if engine in ['wikipedia', 'youtube', 'vimeo', 'soundcloud', 'twitter', 'stackoverflow', 'github']: result['favicon'] = engine - if engine in ['wikipedia', 'ddg definitions']: - featured_results.append(result) - results.remove(result) if request_data.get('format') == 'json': return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json')