blob: c34f35f1727bb4eb73d4f4ad9ca305e94e7b506d [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'
Nils Diewald33e15552014-06-13 19:38:37 +00006%= stylesheet '/kwic-4.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 Diewald33e15552014-06-13 19:38:37 +00009%= javascript '/translatehtml.js'
Nils Diewald02df9912014-06-03 16:08:07 +000010<meta charset="utf-8" />
Nils Diewald5d1ffb42014-05-21 17:45:34 +000011 </head>
12 <body>
Nils Diewald2329e1d2014-06-12 16:07:57 +000013
14<div id="tutorial" style="display: none">
15 <i onclick="closeTutorial()" class="fa fa-toggle-up"></i>
Nils Diewald33e15552014-06-13 19:38:37 +000016 <iframe src="about:blank" data-src="<%= url_for(session('tutorial') || 'tutorial') %>"></iframe>
Nils Diewald2329e1d2014-06-12 16:07:57 +000017</div>
Nils Diewald02df9912014-06-03 16:08:07 +000018
Nils Diewald33e15552014-06-13 19:38:37 +000019
Nils Diewald02df9912014-06-03 16:08:07 +000020<div id="top">
Nils Diewald33e15552014-06-13 19:38:37 +000021 <h1><span>KorAP- Korpusanalyseplattform der nächsten Generation</span></h1>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000022%= form_for url_for() => begin
Nils Diewald2329e1d2014-06-12 16:07:57 +000023%= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2']], id => 'ql-field'
Nils Diewald02df9912014-06-03 16:08:07 +000024<br />
Nils Diewald2329e1d2014-06-12 16:07:57 +000025%= search_field 'q', id => 'q-field'
Nils Diewald02df9912014-06-03 16:08:07 +000026<button type="submit" name="action" value="ok"><i class="fa fa-search"></i></button>
27<button type="submit" name="action" value="inspect"><i class="fa fa-code"></i></button>
Nils Diewald5d1ffb42014-05-21 17:45:34 +000028% end
Nils Diewald02df9912014-06-03 16:08:07 +000029
Nils Diewald02df9912014-06-03 16:08:07 +000030<div id="button-right">
Nils Diewald2329e1d2014-06-12 16:07:57 +000031% if (param('q')) {
Nils Diewald02df9912014-06-03 16:08:07 +000032<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 +000033% }
Nils Diewald2329e1d2014-06-12 16:07:57 +000034<button type="button" onclick="openTutorial()"><i class="fa fa-graduation-cap"></i></button>
35</div>
Nils Diewald02df9912014-06-03 16:08:07 +000036
37</div>
38
39<div id="sidebar" style="padding-top: 90px">
Nils Diewald2329e1d2014-06-12 16:07:57 +000040%= include 'collections'
Nils Diewald02df9912014-06-03 16:08:07 +000041</div>
42
Nils Diewald33e15552014-06-13 19:38:37 +000043
44%# <div>
45%#= javascript begin
46%# translateTable();
47%# end
48%# </div>
49
Nils Diewald02df9912014-06-03 16:08:07 +000050<div id="search">
Nils Diewald5d1ffb42014-05-21 17:45:34 +000051%= content
Nils Diewald02df9912014-06-03 16:08:07 +000052</div>
53
54%= javascript begin
Nils Diewald2329e1d2014-06-12 16:07:57 +000055
56$("ol > li:not(.active)").on("click", function () {
57 $(this).addClass('active');
58});
59
60function closeSnippet (o) {
61 $(o.parentNode.parentNode).removeClass('active');
62};
63
Nils Diewald33e15552014-06-13 19:38:37 +000064
65function showTable (o) {
66 var match = o.parentNode.parentNode;
67 var corpusID = match.getAttribute('data-corpus-id');
68 var docID = match.getAttribute('data-doc-id');
69 var matchID = match.getAttribute('data-match-id');
70 jQuery.getJSON('/corpus/' + corpusID + '/' + docID + '/' + matchID);
71};
72
Nils Diewald2329e1d2014-06-12 16:07:57 +000073function openTutorial (o) {
74 var tut = $("#tutorial");
75 tut.slideDown();
76 var iframe = tut.children("iframe");
77 var src = iframe.attr("data-src");
78 iframe.attr("src", src);
79};
80
81function closeTutorial (o) {
82 $("#tutorial").slideUp();
83};
84
85function useQuery (o) {
86 var q = o.getAttribute("data-query");
87 var ql = o.getAttribute("data-query-language");
88 $("#ql-field").val(ql);
89 $("#q-field").val(q);
90 closeTutorial();
91};
92
Nils Diewald2329e1d2014-06-12 16:07:57 +000093$("code.query.serial,#sidebar").on("click", function () {
Nils Diewald02df9912014-06-03 16:08:07 +000094 $(this).toggleClass('active');
95});
Nils Diewald2329e1d2014-06-12 16:07:57 +000096
97
Nils Diewald02df9912014-06-03 16:08:07 +000098% end
99
Nils Diewald33e15552014-06-13 19:38:37 +0000100
Nils Diewald2329e1d2014-06-12 16:07:57 +0000101%= notifications 'Alertify'
Nils Diewald5d1ffb42014-05-21 17:45:34 +0000102 </body>
103</html>