From cf8f444e8597bf527ef4bfc691b6d45d5704f77f Mon Sep 17 00:00:00 2001 From: pw3t Date: Sun, 12 Jan 2014 18:31:57 +0100 Subject: [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 --- searx/templates/result_templates/videos.html | 7 +++++++ searx/templates/results.html | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 searx/templates/result_templates/videos.html (limited to 'searx/templates') diff --git a/searx/templates/result_templates/videos.html b/searx/templates/result_templates/videos.html new file mode 100644 index 000000000..97c966e43 --- /dev/null +++ b/searx/templates/result_templates/videos.html @@ -0,0 +1,7 @@ +
+

+

{{ result.title|safe }}

+  {{ result.title }} +

{{ result.url }}

+

+
diff --git a/searx/templates/results.html b/searx/templates/results.html index 4ca36c656..411f84c64 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -9,9 +9,24 @@ {% if suggestions %}
Suggestions: {% for suggestion in suggestions %}
{% endfor %}
{% endif %} + +
Number of results: {{ number_of_results }}
+ {% if featured_results %} +
+ + {% for result in featured_results %} + {% if result['template'] %} + {% include 'result_templates/'+result['template'] %} + {% else %} + {% include 'result_templates/default.html' %} + {% endif %} + {% endfor %} +
+ {% endif %} + {% for result in results %} {% if result['template'] %} {% include 'result_templates/'+result['template'] %} -- cgit v1.2.3 From fdb6fac214c2fb5bdc6c27492bc45c6694483fb4 Mon Sep 17 00:00:00 2001 From: pw3t Date: Mon, 13 Jan 2014 22:24:05 +0100 Subject: [ehn] Add possibility to add icon in results (more ugly html / css, need fix) --- searx/templates/result_templates/default.html | 11 ++++++++++- searx/templates/result_templates/featured_results.html | 10 ++++++++++ searx/templates/results.html | 11 +---------- 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 searx/templates/result_templates/featured_results.html (limited to 'searx/templates') diff --git a/searx/templates/result_templates/default.html b/searx/templates/result_templates/default.html index 48c0775ae..3f2d0f360 100644 --- a/searx/templates/result_templates/default.html +++ b/searx/templates/result_templates/default.html @@ -1,5 +1,14 @@
-

{{ result.title|safe }}

+ + {% if result['favicon'] %} +
+ {{result['favicon']}}.png +
+ {% endif %} + +
+

{{ result.title|safe }}


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

{{ result.pretty_url }}

+
diff --git a/searx/templates/result_templates/featured_results.html b/searx/templates/result_templates/featured_results.html new file mode 100644 index 000000000..4aeddfe24 --- /dev/null +++ b/searx/templates/result_templates/featured_results.html @@ -0,0 +1,10 @@ +
+ {% 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 411f84c64..b35416ffa 100644 --- a/searx/templates/results.html +++ b/searx/templates/results.html @@ -15,16 +15,7 @@ Number of results: {{ number_of_results }} {% if featured_results %} -
- - {% for result in featured_results %} - {% if result['template'] %} - {% include 'result_templates/'+result['template'] %} - {% else %} - {% include 'result_templates/default.html' %} - {% endif %} - {% endfor %} -
+ {% include 'result_templates/featured_results.html' %} {% endif %} {% for result in results %} -- cgit v1.2.3 From a8ec7fe6a4ad86a8eea4aa6be441984bc5ef7e5a Mon Sep 17 00:00:00 2001 From: pw3t Date: Wed, 15 Jan 2014 22:25:10 +0100 Subject: [ehn] add favicons for vimeo, soundcloud, twitter and youtube --- searx/templates/result_templates/default.html | 2 +- searx/templates/result_templates/videos.html | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'searx/templates') diff --git a/searx/templates/result_templates/default.html b/searx/templates/result_templates/default.html index 3f2d0f360..14f527361 100644 --- a/searx/templates/result_templates/default.html +++ b/searx/templates/result_templates/default.html @@ -2,7 +2,7 @@ {% if result['favicon'] %}
- {{result['favicon']}}.png + {{result['favicon']}}.png
{% endif %} diff --git a/searx/templates/result_templates/videos.html b/searx/templates/result_templates/videos.html index 97c966e43..524c99116 100644 --- a/searx/templates/result_templates/videos.html +++ b/searx/templates/result_templates/videos.html @@ -1,4 +1,12 @@
+ + {% if result['favicon'] %} +
+ {{result['favicon']}}.png +
+ {% endif %} + +

{{ result.title|safe }}

 {{ result.title }} -- cgit v1.2.3 From d43bd05582c189d8696d58e22c160399ed0b811d Mon Sep 17 00:00:00 2001 From: pw3t Date: Sun, 12 Jan 2014 18:31:57 +0100 Subject: [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 --- searx/templates/result_templates/videos.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/result_templates/videos.html b/searx/templates/result_templates/videos.html index 524c99116..ae6d8f16c 100644 --- a/searx/templates/result_templates/videos.html +++ b/searx/templates/result_templates/videos.html @@ -1,12 +1,10 @@
- {% if result['favicon'] %}
- {{result['favicon']}}.png + {{result['favicon']}}.ico
{% endif %} -

{{ result.title|safe }}

 {{ result.title }} -- cgit v1.2.3 From 91057682b5f813200ffd887fcb0747aa344dfa0e Mon Sep 17 00:00:00 2001 From: pw3t Date: Mon, 13 Jan 2014 22:24:05 +0100 Subject: [ehn] Add possibility to add icon in results (more ugly html / css, need fix) --- searx/templates/result_templates/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/templates') diff --git a/searx/templates/result_templates/default.html b/searx/templates/result_templates/default.html index 14f527361..ab6d469b4 100644 --- a/searx/templates/result_templates/default.html +++ b/searx/templates/result_templates/default.html @@ -2,7 +2,7 @@ {% if result['favicon'] %}
- {{result['favicon']}}.png + {{result['favicon']}}.ico
{% endif %} -- cgit v1.2.3 From 380b440a55ba3b8ec1430843226fa6b4b0dfe289 Mon Sep 17 00:00:00 2001 From: pw3t Date: Thu, 16 Jan 2014 21:58:18 +0100 Subject: [fix] replace the png icons by ico's, minor chnage in the html --- searx/templates/result_templates/featured_results.html | 10 ---------- searx/templates/results.html | 3 --- 2 files changed, 13 deletions(-) delete mode 100644 searx/templates/result_templates/featured_results.html (limited to 'searx/templates') 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'] %} -- cgit v1.2.3