summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authoryvesf <yvesf-git@xapek.org>2010-11-20 01:16:56 +0100
committeryvesf <yvesf-git@xapek.org>2010-11-20 01:16:56 +0100
commit0ae1e5e802871903d73d6542252aa0a8d08fba39 (patch)
tree06b0ef2e53177f724f3f141576364622fdaf1698 /templates
parent6c91093cacd0e4ebcdfd1bca7c79dc906527b94c (diff)
downloadbooksearch-0ae1e5e802871903d73d6542252aa0a8d08fba39.tar.gz
booksearch-0ae1e5e802871903d73d6542252aa0a8d08fba39.zip
web stuff
Diffstat (limited to 'templates')
-rw-r--r--templates/search.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/templates/search.html b/templates/search.html
new file mode 100644
index 0000000..e6bfe07
--- /dev/null
+++ b/templates/search.html
@@ -0,0 +1,30 @@
+<html>
+ <head>
+ <title>{{ objects.__len__() + skip}} matches</title>
+ </head>
+ <body>
+ {% if objects.__len__() == 0 %}
+ No Matches
+ {% else %}
+ {% for obj in objects %}
+ <hr />
+ <h2> {{ obj['title'] }} </h2>
+ <pre> {{ obj['path'] }} </pre>
+ {% autoescape false %}
+ <div>{{ obj['excerpt'] }}</div>
+ {% endautoescape %}
+ <hr />
+ {% endfor %}
+ {% endif %}
+
+ <div>
+ {% if skip > 0 %}
+ <a href="{{ url_for("do_search", term=term, skip=skip-5) }}">Previous 5</a>
+ {% else %}
+ Previous 5
+ {% endif %}
+ -
+ <a href="{{ url_for("do_search", term=term, skip=skip+5) }}">Next 5</a>
+ </div>
+ </body>
+</html>