logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 33969ca670408a6b049c68db76460ba09d4ea032
parent: e50a72b0e34a0c9d5d377f19dafcf717876ab6b0
Author: asciimoo <asciimoo@gmail.com>
Date:   Wed, 13 Nov 2013 19:35:32 +0100

[enh] suggestion rendering

Diffstat:

searx/static/css/style.css | 3+++
searx/templates/results.html | 9++++++---
2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/searx/static/css/style.css b/searx/static/css/style.css @@ -136,3 +136,6 @@ tr:hover td { background: #DDDDDD; } } #results { margin-left: 10px; margin-top: 10px; } + +#suggestions { max-width: 50em;} +#suggestions span { padding: 2px 6px; margin: 2px 4px; font-size: 0.8em; display: inline-block; background: #E4E4E4; border-radius: 4px; } diff --git a/searx/templates/results.html b/searx/templates/results.html @@ -5,9 +5,12 @@ {% include 'search.html' %} </div> <div id="results"> -<div> - Number of results: {{ number_of_results }} -</div> + {% if suggestions %} + <div id="suggestions">Suggestions: {% for suggestion in suggestions %}<span>{{ suggestion }}</span>{% endfor %}</div> + {% endif %} + <div> + Number of results: {{ number_of_results }} + </div> {% for result in results %} {% if result['template'] %} {% include 'result_templates/'+result['template'] %}