2019-07-10 21:19:51 +02:00
|
|
|
{% extends "base.html" %}
|
2019-07-10 20:39:06 +02:00
|
|
|
{% block title %}- {{ query }}{% endblock %}
|
2019-02-27 10:01:48 +01:00
|
|
|
|
|
|
|
{% block nav %}
|
2019-07-10 20:39:06 +02:00
|
|
|
<div id="print" class="{{ connection }}">
|
|
|
|
<a href="?q={{ query }}&print=now"><button></button></a>
|
2019-02-27 10:01:48 +01:00
|
|
|
</div>
|
2019-03-14 13:19:48 +01:00
|
|
|
<script>
|
|
|
|
(function () {
|
|
|
|
var printing = false,
|
2019-07-10 20:39:06 +02:00
|
|
|
button = document.querySelector('#print button');
|
2019-03-14 13:19:48 +01:00
|
|
|
|
|
|
|
button.addEventListener('click', function (e) {
|
|
|
|
if (!printing) {
|
|
|
|
printing = true;
|
|
|
|
button.classList.add('printing');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
e.preventDefault();
|
|
|
|
alert('Already printing ...');
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})();
|
|
|
|
</script>
|
2019-02-27 10:01:48 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block results %}
|
|
|
|
{% if results == {} %}
|
2019-07-10 20:39:06 +02:00
|
|
|
<div id="notused">
|
|
|
|
This word could not be found.
|
2019-02-27 10:01:48 +01:00
|
|
|
<br>
|
|
|
|
<br>
|
2019-07-10 20:39:06 +02:00
|
|
|
<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>
|
2019-02-27 10:01:48 +01:00
|
|
|
</div>
|
2019-07-10 20:39:06 +02:00
|
|
|
{% else %}
|
2019-02-27 10:01:48 +01:00
|
|
|
<div id="results">
|
2019-07-10 20:39:06 +02:00
|
|
|
<h1>Cross-readings along the axes of <strong class="query">{{ query }}</strong>:</h1>
|
2019-02-27 10:01:48 +01:00
|
|
|
<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 }}
|
2019-07-10 21:19:51 +02:00
|
|
|
<div><a class="contrast" href="/mapping/{{ manifesto.filename }}">◐</a></div>
|
2019-02-27 10:01:48 +01:00
|
|
|
</div>
|
|
|
|
<div class="sentence">{{ sentence }}</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2019-07-10 20:39:06 +02:00
|
|
|
{% if analytics %}
|
|
|
|
{% block suggestions %}
|
|
|
|
<div id="suggestions">
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<h1>SUGGESTIONS</h1>
|
2019-02-27 10:01:48 +01:00
|
|
|
{% if analytics.stemmer %}
|
2019-07-10 20:39:06 +02:00
|
|
|
<div id="similars" class="analytics stemmer">
|
|
|
|
<h2>Similar but not the same to <em>{{ query }}</em>:</h2>
|
|
|
|
{% for word in analytics.stemmer %}
|
2019-07-10 21:19:51 +02:00
|
|
|
<strong class="word"><a href="/?q={{ word }}">{{ word }}</a></strong>
|
2019-07-10 20:39:06 +02:00
|
|
|
{% 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 %}
|
2019-07-10 21:19:51 +02:00
|
|
|
<strong class="word"><a href="/?q={{ word }}">{{ word }}</a></strong>
|
2019-07-10 20:39:06 +02:00
|
|
|
{% endif%}
|
|
|
|
{% endif%}
|
2019-02-27 10:01:48 +01:00
|
|
|
{% endfor%}
|
|
|
|
</div>
|
|
|
|
<br>
|
2019-07-10 20:39:06 +02:00
|
|
|
<br>
|
2019-02-27 10:01:48 +01:00
|
|
|
</div>
|
2019-07-10 20:39:06 +02:00
|
|
|
{% endif%}
|
2019-02-27 10:01:48 +01:00
|
|
|
</div>
|
2019-07-10 20:39:06 +02:00
|
|
|
{% endblock %}
|
|
|
|
{% endif%}
|