various cross-reading prototypes
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.

51 lines
1.2 KiB

{% extends "base.html" %}
{% block title %}{{query}}{% endblock %}
{% block txtlist %}
{% endblock %}
{% block results %}
<h1>The results for the query "{{query}}" are:</h1>
<div id="results">
{% if results == {} %}
<div>That word is not used in any of the files.</div>
{% else %}
{% for _, document in results.items() %}
{% for line in document.html %}
<div class="result">
<!-- <div class="ascii">
✄█▀▀ █▀▀█ █░░ █░░ <br>
✄█░░ █▄▄█ █░░ █░░ <br>
✄▀▀▀ ▀░░▀ ▀▀▀ ▀▀▀ <br>
</div> -->
{% set name = document.filename.replace('.txt', '') %}
<h2><a href="/document/{{ name }}">{{ document.name }}</a></h2>
<div class="line">{{ line }}</div>
</div>
{% endfor %}
{% endfor %}
{% endif %}
</div>
{% if analytics %}
<hr>
<div id="analytics">
<!-- <h1>ANALYTICS</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>
{% else %}
<div>None</div>
{% endif%}
</div>
{% endif%}
{% endblock %}