Slim frontend for API and serialization tests
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
new file mode 100644
index 0000000..db12d43
--- /dev/null
+++ b/templates/layouts/default.html.ep
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title><%= title %></title>
+%= stylesheet '/style.css'
+%= stylesheet '/kwic-3.0.css'
+%= javascript '/jquery-2.0.0.min.js'
+ </head>
+ <body>
+ <h1><%= title %></h1>
+%= form_for url_for() => begin
+%= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2']]
+%= search_field 'q'
+%= submit_button
+% end
+%= content
+ </body>
+</html>
diff --git a/templates/search.html.ep b/templates/search.html.ep
new file mode 100644
index 0000000..be515f8
--- /dev/null
+++ b/templates/search.html.ep
@@ -0,0 +1,48 @@
+% layout 'default', title 'KorAP';
+% use JSON::XS;
+
+
+%= search begin
+<div style="clear: both">
+<p class="found"><span class="pagination">
+% my $url = url_with->query(['p' => '{page}']);
+% my $pages = (stash('search.totalResults') / (stash('search.itemsPerPage') || 1));
+% $pages = $pages < 0 ? 0 : $pages;
+<%= pagination(stash('search.startPage'), $pages, $url); %></span>
+Found <span id="total-results"><%= format_thousands(stash('search.totalResults')) %> matches</span>
+% if (stash 'search.bm.hit') {
+ in <%= stash 'search.bm.hit' %> (<%= stash 'search.bm.result' %>)
+% }
+</p>
+</div>
+
+
+%= notifications
+
+
+% if (stash('search.query')) {
+<code><span>JSON-LD Query</span><pre>
+% my $json = JSON::XS->new->pretty;
+%= $json->encode(stash('search.query'))
+</pre></span></code>
+% }
+
+
+<ol class="left-aligned">
+%= search_hits begin
+ <li>
+%# ID, title, corpusID, author, pubDate, textClass
+<%== $_->{snippet} %>
+ </li>
+% end
+</ol>
+% end
+
+
+<script>
+<!--
+$("li,code").on("click", function () {
+ $(this).toggleClass('active');
+});
+-->
+</script>