blob: e83d470bc13a6d92174e7522c51081975126a704 [file] [log] [blame]
Nils Diewald5d1ffb42014-05-21 17:45:34 +00001<!DOCTYPE html>
2<html>
Nils Diewald4af3f0b2014-06-25 01:43:17 +00003%= include 'partial/header'
Nils Diewald5d1ffb42014-05-21 17:45:34 +00004 <body>
Nils Diewald2329e1d2014-06-12 16:07:57 +00005
Nils Diewalde99d9042014-11-20 23:36:54 +00006%# -- Background crab
Nils Diewald29c0b1d2014-11-13 21:14:17 +00007% if (!param('q') && current_route eq 'index') {
Nils Diewald25a86442015-03-04 19:56:39 +00008<div id="kalamar-bg"></div>
Nils Diewald29c0b1d2014-11-13 21:14:17 +00009% };
Nils Diewald5cc44002014-11-12 02:19:22 +000010
Nils Diewald7cad8402014-07-08 17:06:56 +000011% my $location;
12% my $search_route;
Nils Diewaldb22abdf2014-06-18 22:57:50 +000013% unless (current_route 'tutorial') {
Nils Diewalddb03fa92014-06-23 13:36:55 +000014<div id="tutorial">
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000015%= javascript begin
16document.write('<a href="' + getTutorialPage().replace(/\?embedded=1/, '') + '" ');
17document.write('target="_blank"><i title="Open in new tab" ');
18document.write('class="fa fa-external-link-square"></i></a>');
19% end
Nils Diewald4af3f0b2014-06-25 01:43:17 +000020 <i onclick="closeTutorial()"
21 title="close"
22 class="fa fa-toggle-up"></i>
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000023 <iframe src="about:blank"></iframe>
Nils Diewald2329e1d2014-06-12 16:07:57 +000024</div>
Nils Diewald7cad8402014-07-08 17:06:56 +000025% if (current_route eq 'match') {
26% $search_route = url_for('search_corpus');
27% $location = 'in corpus <span class="location">' . stash('corpus_id') . '</span>';
28% }
29% else {
30% $search_route = url_for;
31% if (stash('doc_id')) {
32% $location = ' in document <span class="location">' . stash('corpus_id') . '/' . stash('doc_id') . '</span>';
33% }
34% elsif (stash('corpus_id')) {
35% $location = ' in corpus <span class="location">' . stash('corpus_id') . '</span>';
36% }
37% elsif (stash('collection_id')) {
38% $location = ' in collection <span class="location">' . stash('collection_id') . '</span>';
39% };
40% }
Nils Diewalddb03fa92014-06-23 13:36:55 +000041% }
42% else {
43% $search_route = url_for('index');
Nils Diewaldb22abdf2014-06-18 22:57:50 +000044% };
Nils Diewald33e15552014-06-13 19:38:37 +000045
Nils Diewald02df9912014-06-03 16:08:07 +000046<div id="top">
Nils Diewald33ccfb02015-01-21 20:17:23 +000047 <a href="<%= url_for 'index' %>"><h1><span>KorAP - Korpusanalyseplattform der nächsten Generation</span></h1></a>
Nils Diewalddb03fa92014-06-23 13:36:55 +000048
Nils Diewalde2c83812014-11-11 21:13:18 +000049%= form_for $search_route, autocomplete => 'off', begin
Nils Diewald7cad8402014-07-08 17:06:56 +000050 <div id="searchbar">
51%= search_field 'q', id => 'q-field', autofocus => 'autofocus', placeholder => 'Find ...'
52 <button type="submit"><i class="fa fa-search"></i></button>
Nils Diewald0a3f5f92014-12-21 04:25:53 +000053% if (korap_test_port()) {
Nils Diewald7cad8402014-07-08 17:06:56 +000054 <button type="submit" name="action" value="inspect"><i class="fa fa-code"></i></button>
Nils Diewaldb40ddad2014-06-23 15:39:18 +000055% };
Nils Diewaldeca30442014-11-18 20:33:54 +000056 <i onclick="hint.popUp()" class="fa fa-arrow-circle-down show-hint"></i>
Nils Diewald7cad8402014-07-08 17:06:56 +000057 </div>
58 <% if ($location) { %><%== $location %><% } %>
59 with
60 <div class="select">
Nils Diewald7e259592014-11-12 19:04:55 +000061 %= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2'], ['Annis' => 'annis'], ['CQL v1.2' => 'cql']], id => 'ql-field'
Nils Diewald7cad8402014-07-08 17:06:56 +000062 </div>
Nils Diewald02df9912014-06-03 16:08:07 +000063
Nils Diewald02df9912014-06-03 16:08:07 +000064<div id="button-right">
Nils Diewalde99d9042014-11-20 23:36:54 +000065%#
66%# -- The cutoff checkbox
Nils Diewalde8e88052014-11-10 16:32:02 +000067% unless (param('q')) { param(cutoff => 1) };
68%= check_box cutoff => 1, id => 'q-cutoff-field'
Nils Diewald3360bfb2015-01-28 15:08:00 +000069<label for="q-cutoff-field"><span></span>Glimpse</label>
Nils Diewalde99d9042014-11-20 23:36:54 +000070%#
71%# -- The tutorial button
Nils Diewaldb22abdf2014-06-18 22:57:50 +000072% unless (current_route 'tutorial') {
Nils Diewalde99d9042014-11-20 23:36:54 +000073<button type="button" title="Tutorial" onclick="openTutorial()">\
74<i class="fa fa-graduation-cap"></i>\
75</button>
Nils Diewaldb22abdf2014-06-18 22:57:50 +000076% };
Nils Diewalde99d9042014-11-20 23:36:54 +000077%#
78%# -- The Alignment button
Nils Diewald3360bfb2015-01-28 15:08:00 +000079% if (param('q') && (search->total_results // 0) != 0) {
Nils Diewalde99d9042014-11-20 23:36:54 +000080<button type="button" title="Alignment" onclick="toggleAlignment(this)">\
81<i class="fa fa-align-right"></i>\
82</button>
Nils Diewald7cad8402014-07-08 17:06:56 +000083% }
Nils Diewald2329e1d2014-06-12 16:07:57 +000084</div>
Nils Diewalde99d9042014-11-20 23:36:54 +000085%#
Nils Diewald7cad8402014-07-08 17:06:56 +000086% end
Nils Diewald02df9912014-06-03 16:08:07 +000087</div>
88
Nils Diewalde99d9042014-11-20 23:36:54 +000089
Nils Diewald4af3f0b2014-06-25 01:43:17 +000090%= content 'sidebar' => begin
Nils Diewald7cad8402014-07-08 17:06:56 +000091<div id="sidebar">
Nils Diewalde99d9042014-11-20 23:36:54 +000092 %= include 'collections'
Nils Diewald4af3f0b2014-06-25 01:43:17 +000093 <i class="fa fa-bars"></i>
Nils Diewald02df9912014-06-03 16:08:07 +000094</div>
Nils Diewald02df9912014-06-03 16:08:07 +000095% end
96
Nils Diewalde99d9042014-11-20 23:36:54 +000097
Nils Diewald4af3f0b2014-06-25 01:43:17 +000098<main>
99%= content main => begin
Nils Diewald33ccfb02015-01-21 20:17:23 +0000100 <p>KorAP is a Corpus Analysis Platform, serving textual data provided by the <a href="http://www.ids-mannheim.de">Institute for German Language</a>.</p>
101 <p>For information how to search in KorAP, have a look at the <%= link_to 'tutorial', 'tutorial' %>.</p>
Nils Diewald3360bfb2015-01-28 15:08:00 +0000102 <p>Currently the scope of searching is limited to public users - for access to restricted corpora, please visit the <a href="http://korap.ids-mannheim.de/app">first frontend</a>.</p>
Nils Diewald4af3f0b2014-06-25 01:43:17 +0000103% end
104</main>
Nils Diewald33e15552014-06-13 19:38:37 +0000105
Nils Diewald4af3f0b2014-06-25 01:43:17 +0000106%= content 'javascript'
107%= include 'partial/javascript'
Nils Diewaldca01b762014-09-08 02:35:20 +0000108%= notifications 'Alertify', -no_include
Nils Diewald5d1ffb42014-05-21 17:45:34 +0000109 </body>
110</html>