summaryrefslogtreecommitdiff
path: root/templates/search.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/search.html')
-rw-r--r--templates/search.html22
1 files changed, 16 insertions, 6 deletions
diff --git a/templates/search.html b/templates/search.html
index b99c053..490cf75 100644
--- a/templates/search.html
+++ b/templates/search.html
@@ -34,10 +34,20 @@
</script>
{% endblock %}
{% block content %}
- {% if matches %}
- Matched {{ matches.__len__() }} Book{% if matches.__len__() > 1 %}s{% endif %}
- {% for docnum, matches in matches.items() %}
- <h2 asd="foo"> <a href="{{ url_for("do_book_file", docnum=docnum) }}">book: {{ docnum }}</a> </h2>
+ {% if books %}
+ Matched {{ books.__len__() }} Book{% if books.__len__() > 1 %}s{% endif %}
+ {% for docnum, book in books.items() %}
+ <h2 asd="foo">
+ {{ book['filename'] }}
+ {% if book['title'] %}
+ (<small>
+ {{ book['title'] }}
+ </small>)
+ {% endif %}
+ <a href="{{ url_for("do_book_file", docnum=docnum) }}" title="Download {{docnum}}">
+ ↸
+ </a>
+ </h2>
<div class="book">
<div class="c_frontpage">
<img class="frontpage" src="{{ url_for("do_book_frontpage", docnum=docnum) }}"/>
@@ -47,7 +57,7 @@
</div>
<div class="c_matches">
<div class="matches">
- {% for match in matches %}
+ {% for match in book['matches'] %}
<h3>
<a href="#">Match at page {{ match[2] }}</a>
</h3>
@@ -57,7 +67,7 @@
<div class="toolbar">
<a href="{{ url_for("do_page_file", docnum=match[0]) }}">Download page as PDF</a>
-
- <a href="{{ url_for("do_page_image", docnum=match[0]) }}">Download page as Image</a>
+ <a href="{{ url_for("do_page_image", docnum=match[0], size=1500) }}">Download page as Image</a>
</div>
<div class="excerpt"></div>
</div>