added a couple more templates for different views
This commit is contained in:
parent
1241cf1aca
commit
d4e3b7c34a
@ -7,7 +7,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="logo">
|
||||
<a href="{{ url_for('index')}}"><img src="{{ url_for('static', filename='images/Grrrrrrrrrrls.svg')}}"></a>
|
||||
<a href="{{ url_for('index')}}"><img src="{{ url_for('static', filename='images/searrrrrrrrrrch.svg')}}"></a>
|
||||
</div>
|
||||
<div id="search">
|
||||
<form action="" method="GET">
|
||||
@ -15,7 +15,7 @@
|
||||
<input id="submit" type="submit" value="➜"/>
|
||||
</form>
|
||||
</div>
|
||||
<div>(<a href="{{ url_for('lists')}}">lists</a>, <a href="{{ url_for('ordered')}}">ordered</a>)</div>
|
||||
<div>(<a href="{{ url_for('lists')}}">lists</a>, <a href="{{ url_for('ordered')}}">ordered</a>, <a href="{{ url_for('ordered_all')}}">ordered.all</a>)</div>
|
||||
<div id="txt-list">
|
||||
<p>Searching through <em>and calculating words of</em> the following txt documents:</p>
|
||||
|
||||
|
18
templates/ordered.all.html
Normal file
18
templates/ordered.all.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% block txtlist %}
|
||||
{% endblock %}
|
||||
|
||||
{% block results %}
|
||||
<h1>ordered.all</h1>
|
||||
<div id="results" class="ordered all">
|
||||
<!-- {{results}} -->
|
||||
{% for item in results %}
|
||||
<span class="{{files[item[2]]}}">
|
||||
<strong style="font-size:{{item[0] * 50000}}%;"><a href="{{ url_for('index')}}?q={{item[1]}}">{{item[1]}}</a></strong>
|
||||
</span>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
</div>
|
||||
{% endblock %}
|
20
templates/ordered.html
Normal file
20
templates/ordered.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{% endblock %}
|
||||
|
||||
{% block txtlist %}
|
||||
{% endblock %}
|
||||
|
||||
{% block results %}
|
||||
<h1>lists</h1>
|
||||
<div id="results" class="ordered">
|
||||
{% for manifesto, words in results.items()|sort %}
|
||||
<span class="manifesto">
|
||||
<h2 class="black">{{manifesto}}</h2>
|
||||
{% for value, word in words %}
|
||||
<strong style="font-size:{{value * 50000}}%;"><a href="{{ url_for('index')}}?q={{word}}">{{word}}</a></strong>
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
</div>
|
||||
{% endblock %}
|
@ -2,7 +2,7 @@
|
||||
{% 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>
|
||||
<div id="more-descr">[<span class="asterix">*</span>] 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 %}
|
||||
|
27
templates/results_lists.html
Normal file
27
templates/results_lists.html
Normal file
@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{query}}{% endblock %}
|
||||
|
||||
{% block txtlist %}
|
||||
<div id="more-descr">[<span class="asterix">*</span>] 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" class="lists">
|
||||
{% if results == {} %}
|
||||
<div>That word is not used in any of the manifesto's.</div>
|
||||
{% else %}
|
||||
{% for _, manifesto in results.items() %}
|
||||
<span class="result">
|
||||
<h2 class="title">{{manifesto.name}}</h2>
|
||||
<span class="list">
|
||||
{% for i in range(manifesto.tf) %}
|
||||
<strong style="font-size:{{manifesto.tfidf * 10000}}px;">{{query}}</strong>
|
||||
{% endfor %}
|
||||
</span>
|
||||
</span>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user