added the '(...)' sign to result lists

This commit is contained in:
mb@mb 2018-08-31 13:10:55 +02:00
parent 9c69fa4118
commit 8fe9eb912f
4 changed files with 18 additions and 0 deletions

View File

@ -53,6 +53,15 @@ h1, h2, h3{
.result{
margin:10px 0 0 0;
}
#more{
margin:10px 0;
}
#more-descr{
margin:10px 0;
}
#more sup{
color:#800000;
}
.sentence{
margin:10px 0 0 0;
}

View File

@ -23,6 +23,8 @@
<li>{{txt}}</li>
{% endfor %}
<ul>
{% block txtlist %}
{% endblock %}
</div>
{% block results %}
{% endblock %}

View File

@ -1,5 +1,10 @@
{% extends "base.html" %}
{% block title %}{{query}}{% endblock %}
{% block txtlist %}
<div id="more-descr">[*] The algorithm is asked to not return more than 3 sentences from the same manifesto. There are more sentences that match this search query!</div>
{% endblock %}
{% block results %}
<h1>The results for the query "{{query}}" are:</h1>
<div id="results">

View File

@ -137,6 +137,8 @@ def request_results(query):
if done is not 'yes':
sentence = s.replace(query, '<strong style="font-size:{}px;">{}</strong>'.format(value, query))
html = Markup(sentence)
if count == 3:
html = html + Markup('<div id="more">(...)<sup>*</sup></div>')
result_sentences.append(html)
done = 'yes'
results[x]['sentences'] = result_sentences