blob: 97c53b414723d64f2734c1306f5323551300f5cc [file] [log] [blame]
Nils Diewald5d1ffb42014-05-21 17:45:34 +00001<!DOCTYPE html>
2<html>
3 <head>
4 <title><%= title %></title>
5%= stylesheet '/style.css'
6%= stylesheet '/kwic-3.0.css'
Nils Diewald02df9912014-06-03 16:08:07 +00007%= stylesheet '/fontawesome/font-awesome.min.css'
Nils Diewald5d1ffb42014-05-21 17:45:34 +00008%= javascript '/jquery-2.0.0.min.js'
Nils Diewald02df9912014-06-03 16:08:07 +00009<meta charset="utf-8" />
Nils Diewald5d1ffb42014-05-21 17:45:34 +000010 </head>
11 <body>
Nils Diewald2329e1d2014-06-12 16:07:57 +000012
13<div id="tutorial" style="display: none">
14 <i onclick="closeTutorial()" class="fa fa-toggle-up"></i>
15 <iframe src="about:blank" data-src="<%= url_for(session('tutorial') // 'tutorial') %>"></iframe>
16</div>
Nils Diewald02df9912014-06-03 16:08:07 +000017
18<div id="top">
Nils Diewald2329e1d2014-06-12 16:07:57 +000019%#= image '/img/korap-logo.svg', style => 'position: absolute; z-index: 999'
20%= image '/img/korap-logo-solo.svg', style => 'position: absolute; z-index: 999'
Nils Diewald5d1ffb42014-05-21 17:45:34 +000021%= form_for url_for() => begin
Nils Diewald2329e1d2014-06-12 16:07:57 +000022%= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2']], id => 'ql-field'
Nils Diewald02df9912014-06-03 16:08:07 +000023<br />
Nils Diewald2329e1d2014-06-12 16:07:57 +000024%= search_field 'q', id => 'q-field'
Nils Diewald02df9912014-06-03 16:08:07 +000025<button type="submit" name="action" value="ok"><i class="fa fa-search"></i></button>
26<button type="submit" name="action" value="inspect"><i class="fa fa-code"></i></button>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000027% end
Nils Diewald02df9912014-06-03 16:08:07 +000028
Nils Diewald02df9912014-06-03 16:08:07 +000029<div id="button-right">
Nils Diewald2329e1d2014-06-12 16:07:57 +000030% if (param('q')) {
Nils Diewald02df9912014-06-03 16:08:07 +000031<button type="button" onclick="$('#search > ol').toggleClass('left-aligned right-aligned'); $(this).children('i').toggleClass('fa-align-right fa-align-left')"><i class="fa fa-align-right"></i></button>
Nils Diewald02df9912014-06-03 16:08:07 +000032% }
Nils Diewald2329e1d2014-06-12 16:07:57 +000033<button type="button" onclick="openTutorial()"><i class="fa fa-graduation-cap"></i></button>
34</div>
Nils Diewald02df9912014-06-03 16:08:07 +000035
36</div>
37
38<div id="sidebar" style="padding-top: 90px">
Nils Diewald2329e1d2014-06-12 16:07:57 +000039%= include 'collections'
Nils Diewald02df9912014-06-03 16:08:07 +000040</div>
41
42<div id="search">
Nils Diewald5d1ffb42014-05-21 17:45:34 +000043%= content
Nils Diewald02df9912014-06-03 16:08:07 +000044</div>
45
46%= javascript begin
Nils Diewald2329e1d2014-06-12 16:07:57 +000047
48$("ol > li:not(.active)").on("click", function () {
49 $(this).addClass('active');
50});
51
52function closeSnippet (o) {
53 $(o.parentNode.parentNode).removeClass('active');
54};
55
56function openTutorial (o) {
57 var tut = $("#tutorial");
58 tut.slideDown();
59 var iframe = tut.children("iframe");
60 var src = iframe.attr("data-src");
61 iframe.attr("src", src);
62};
63
64function closeTutorial (o) {
65 $("#tutorial").slideUp();
66};
67
68function useQuery (o) {
69 var q = o.getAttribute("data-query");
70 var ql = o.getAttribute("data-query-language");
71 $("#ql-field").val(ql);
72 $("#q-field").val(q);
73 closeTutorial();
74};
75
76/*
77function requestInfo
78*/
79
80$("code.query.serial,#sidebar").on("click", function () {
Nils Diewald02df9912014-06-03 16:08:07 +000081 $(this).toggleClass('active');
82});
Nils Diewald2329e1d2014-06-12 16:07:57 +000083
84
Nils Diewald02df9912014-06-03 16:08:07 +000085% end
86
Nils Diewald2329e1d2014-06-12 16:07:57 +000087%= notifications 'Alertify'
Nils Diewald5d1ffb42014-05-21 17:45:34 +000088 </body>
89</html>