From b91b77e335c0b0f2dca2b261c64414c96fdb2412 Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Sat, 27 Sep 2014 14:44:34 +0200 Subject: [PATCH] oscar template: improve result page * add paging support * add suggestion panel * add links panel --- searx/static/oscar/css/oscar.css | 14 +++++- searx/templates/oscar/results.html | 80 ++++++++++++++++++++++++++++-- 2 files changed, 88 insertions(+), 6 deletions(-) diff --git a/searx/static/oscar/css/oscar.css b/searx/static/oscar/css/oscar.css index b3e42f607..b0c0c7344 100644 --- a/searx/static/oscar/css/oscar.css +++ b/searx/static/oscar/css/oscar.css @@ -15,7 +15,7 @@ body { bottom: 0; width: 100%; /* Set the fixed height of the footer here */ - height: 40px; + height: 60px; } input[type=checkbox]:checked ~ .label_hide_if_checked { @@ -51,3 +51,15 @@ input[type=checkbox]:not(:checked) ~ .label_hide_if_not_checked { max-height: 128px; min-height: 128px; } + +.suggestion_item { + margin: 2px 5px; +} + +.result_download { + margin-right: 5px; +} + +#pagination { + margin-top: 30px; +} diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index fde65c883..f4364ed48 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -5,18 +5,88 @@

{{ _('Search results') }}

{% include 'oscar/search.html' %} - + {% for result in results %}
{% set index = loop.index %} {% if result.template %}{% include 'oscar/result_templates/'+result['template'] %}{% else %}{% include 'oscar/result_templates/default.html' %}{% endif %}
{% endfor %} - +
- -
+ + {% if paging %} + +
+ {% endif %} + + + + {% if suggestions %} +
+ +
+ {% for suggestion in suggestions %} + + {% endfor %} +
+
+ {% endif %} + +
+ +
+
+
+ + +
+
+ + +
+ {% for output_type in ('csv', 'json', 'rss') %} +
+ + + {% for category in selected_categories %}{% endfor %} + + +
+ {% endfor %} +
+
+
+ + {% endblock %}