From 4f4cb1caca37c28cd8a8e58e259d41569d3290a7 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sun, 19 Jan 2014 22:58:50 +0100 Subject: [PATCH] [enh] results favico handling --- searx/engines/dailymotion.py | 1 - searx/static/css/style.css | 3 ++- searx/templates/result_templates/default.html | 6 ++---- searx/templates/result_templates/videos.html | 6 ++---- searx/templates/results.html | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/searx/engines/dailymotion.py b/searx/engines/dailymotion.py index 655485957..f8768ff53 100644 --- a/searx/engines/dailymotion.py +++ b/searx/engines/dailymotion.py @@ -1,7 +1,6 @@ from urllib import urlencode from lxml import html from json import loads -from cgi import escape categories = ['videos'] locale = 'en_US' diff --git a/searx/static/css/style.css b/searx/static/css/style.css index 83d281806..3d3f46036 100644 --- a/searx/static/css/style.css +++ b/searx/static/css/style.css @@ -79,7 +79,6 @@ a { text-decoration: none; color: #1a11be; } a:visited { color: #7b11be; } .result { margin: 19px 0 18px 0; padding: 0; max-width: 55em; clear: both; } -.result:hover { background: #e8e7e6; } .result_title { margin-bottom: 0; } .result h3 { font-size: 1em; word-wrap:break-word; margin: 5px 0 1px 0; padding: 0 } .result .content { font-size: 0.8em; margin: 0; padding: 0; max-width: 54em; word-wrap:break-word; line-height: 1.24; } @@ -201,3 +200,5 @@ tr:hover td { background: #DDDDDD; } .result img { max-width: 90%; width: auto; height: auto } } + +.favicon { float: left; margin-right: 4px; } diff --git a/searx/templates/result_templates/default.html b/searx/templates/result_templates/default.html index ab6d469b4..d06a4598a 100644 --- a/searx/templates/result_templates/default.html +++ b/searx/templates/result_templates/default.html @@ -1,13 +1,11 @@
{% if result['favicon'] %} -
- {{result['favicon']}}.ico -
+ {% endif %}
-

{{ result.title|safe }}


+

{{ result.title|safe }}

{% if result.content %}{{ result.content|safe }}
{% endif %}

{{ result.pretty_url }}

diff --git a/searx/templates/result_templates/videos.html b/searx/templates/result_templates/videos.html index ae6d8f16c..d3391f0d3 100644 --- a/searx/templates/result_templates/videos.html +++ b/searx/templates/result_templates/videos.html @@ -1,13 +1,11 @@
{% if result['favicon'] %} -
- {{result['favicon']}}.ico -
+ {% endif %}

{{ result.title|safe }}

-  {{ result.title }} +  {{ result.title }}

{{ result.url }}

diff --git a/searx/templates/results.html b/searx/templates/results.html index be40900c3..0fb9250ca 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -9,7 +9,7 @@ {% if suggestions %}
Suggestions: {% for suggestion in suggestions %}
{% endfor %}
{% endif %} - +
Number of results: {{ number_of_results }}