You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
2.4 KiB
104 lines
2.4 KiB
{% extends "base.html" %}
|
|
{% block title %}- {{ query }}{% endblock %}
|
|
|
|
{% block printbutton %}
|
|
<div id="print" class="{{ connection }}">
|
|
<a href="?q={{ query }}&print=now"><button></button></a>
|
|
</div>
|
|
<script>
|
|
(function () {
|
|
var printing = false,
|
|
button = document.querySelector('#print button');
|
|
|
|
button.addEventListener('click', function (e) {
|
|
if (!printing) {
|
|
printing = true;
|
|
button.classList.add('printing');
|
|
}
|
|
else {
|
|
e.preventDefault();
|
|
alert('Already printing ...');
|
|
}
|
|
})
|
|
})();
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block results %}
|
|
{% if results == {} %}
|
|
<div id="notused">
|
|
This word could not be found.
|
|
<br>
|
|
<br>
|
|
<div>
|
|
Please note that ...
|
|
<br>
|
|
<br>
|
|
... the cross-reader can only search for one word
|
|
<br>
|
|
... "-" or "_" are understood as spaces
|
|
<br>
|
|
... search results are not case sensitive
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div id="results">
|
|
<h1>Cross-readings along the axes of <strong class="query">{{ query }}</strong>:</h1>
|
|
<div class="results">
|
|
{% for x, manifesto in results.items() %}
|
|
{% for sentence in manifesto.html %}
|
|
<div id="{{ x }}_{{ loop.index }}" class="result">
|
|
<div class="title">
|
|
{{ manifesto.name }}
|
|
<div><a class="contrast" href="/mapping/{{ manifesto.filename }}">◐</a></div>
|
|
</div>
|
|
<div class="sentence">{{ sentence }}</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% if analytics %}
|
|
{% block suggestions %}
|
|
<div id="suggestions">
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<h1>SUGGESTIONS</h1>
|
|
{% if analytics.stemmer %}
|
|
<div id="similars" class="analytics stemmer">
|
|
<h2>Similar but not the same to <em>{{ query }}</em>:</h2>
|
|
{% for word in analytics.stemmer %}
|
|
<strong class="word"><a href="/?q={{ word }}">{{ word }}</a></strong>
|
|
{% endfor%}
|
|
</div>
|
|
<br>
|
|
{% endif%}
|
|
|
|
{% if analytics.suggestions %}
|
|
<div class="suggestions tfidf">
|
|
<h1>Also specific to <em>{{ results[0]['name'] }}</em>: <br></h1>
|
|
<div class="">
|
|
{% for word, idf in analytics.suggestions %}
|
|
{% if loop.index < 50 %}
|
|
{% if word == query %}
|
|
<strong class="word">{{ word }}</strong>
|
|
{% else %}
|
|
<strong class="word"><a href="/?q={{ word }}">{{ word }}</a></strong>
|
|
{% endif%}
|
|
{% endif%}
|
|
{% endfor%}
|
|
</div>
|
|
<br>
|
|
<br>
|
|
</div>
|
|
{% else %}
|
|
<div>None</div>
|
|
{% endif%}
|
|
</div>
|
|
{% endblock %}
|
|
{% endif%}
|
|
|