Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 3 | %= include 'partial/header' |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 4 | <body> |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 5 | |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 6 | %# -- Background crab |
Nils Diewald | 29c0b1d | 2014-11-13 21:14:17 +0000 | [diff] [blame] | 7 | % if (!param('q') && current_route eq 'index') { |
| 8 | <div id="crab-bg"></div> |
| 9 | % }; |
Nils Diewald | 5cc4400 | 2014-11-12 02:19:22 +0000 | [diff] [blame] | 10 | |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 11 | % my $location; |
| 12 | % my $search_route; |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 13 | % unless (current_route 'tutorial') { |
Nils Diewald | db03fa9 | 2014-06-23 13:36:55 +0000 | [diff] [blame] | 14 | <div id="tutorial"> |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 15 | %= javascript begin |
| 16 | document.write('<a href="' + getTutorialPage().replace(/\?embedded=1/, '') + '" '); |
| 17 | document.write('target="_blank"><i title="Open in new tab" '); |
| 18 | document.write('class="fa fa-external-link-square"></i></a>'); |
| 19 | % end |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 20 | <i onclick="closeTutorial()" |
| 21 | title="close" |
| 22 | class="fa fa-toggle-up"></i> |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 23 | <iframe src="about:blank"></iframe> |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 24 | </div> |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 25 | % 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 Diewald | db03fa9 | 2014-06-23 13:36:55 +0000 | [diff] [blame] | 41 | % } |
| 42 | % else { |
| 43 | % $search_route = url_for('index'); |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 44 | % }; |
Nils Diewald | 33e1555 | 2014-06-13 19:38:37 +0000 | [diff] [blame] | 45 | |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 46 | <div id="top"> |
Nils Diewald | 33ccfb0 | 2015-01-21 20:17:23 +0000 | [diff] [blame] | 47 | <a href="<%= url_for 'index' %>"><h1><span>KorAP - Korpusanalyseplattform der nächsten Generation</span></h1></a> |
Nils Diewald | db03fa9 | 2014-06-23 13:36:55 +0000 | [diff] [blame] | 48 | |
Nils Diewald | e2c8381 | 2014-11-11 21:13:18 +0000 | [diff] [blame] | 49 | %= form_for $search_route, autocomplete => 'off', begin |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 50 | <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 Diewald | 0a3f5f9 | 2014-12-21 04:25:53 +0000 | [diff] [blame] | 53 | % if (korap_test_port()) { |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 54 | <button type="submit" name="action" value="inspect"><i class="fa fa-code"></i></button> |
Nils Diewald | b40ddad | 2014-06-23 15:39:18 +0000 | [diff] [blame] | 55 | % }; |
Nils Diewald | eca3044 | 2014-11-18 20:33:54 +0000 | [diff] [blame] | 56 | <i onclick="hint.popUp()" class="fa fa-arrow-circle-down show-hint"></i> |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 57 | </div> |
| 58 | <% if ($location) { %><%== $location %><% } %> |
| 59 | with |
| 60 | <div class="select"> |
Nils Diewald | 7e25959 | 2014-11-12 19:04:55 +0000 | [diff] [blame] | 61 | %= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2'], ['Annis' => 'annis'], ['CQL v1.2' => 'cql']], id => 'ql-field' |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 62 | </div> |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 63 | |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 64 | <div id="button-right"> |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 65 | %# |
| 66 | %# -- The cutoff checkbox |
Nils Diewald | e8e8805 | 2014-11-10 16:32:02 +0000 | [diff] [blame] | 67 | % unless (param('q')) { param(cutoff => 1) }; |
| 68 | %= check_box cutoff => 1, id => 'q-cutoff-field' |
| 69 | <label for="q-cutoff-field"><span></span>Quick</label> |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 70 | %# |
| 71 | %# -- The tutorial button |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 72 | % unless (current_route 'tutorial') { |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 73 | <button type="button" title="Tutorial" onclick="openTutorial()">\ |
| 74 | <i class="fa fa-graduation-cap"></i>\ |
| 75 | </button> |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 76 | % }; |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 77 | %# |
| 78 | %# -- The Alignment button |
| 79 | % if (param('q') && (stash('search.totalResults') // 0) != 0) { |
| 80 | <button type="button" title="Alignment" onclick="toggleAlignment(this)">\ |
| 81 | <i class="fa fa-align-right"></i>\ |
| 82 | </button> |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 83 | % } |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 84 | </div> |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 85 | %# |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 86 | % end |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 87 | </div> |
| 88 | |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 89 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 90 | %= content 'sidebar' => begin |
Nils Diewald | 7cad840 | 2014-07-08 17:06:56 +0000 | [diff] [blame] | 91 | <div id="sidebar"> |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 92 | %= include 'collections' |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 93 | <i class="fa fa-bars"></i> |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 94 | </div> |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 95 | % end |
| 96 | |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 97 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 98 | <main> |
| 99 | %= content main => begin |
Nils Diewald | 33ccfb0 | 2015-01-21 20:17:23 +0000 | [diff] [blame] | 100 | <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> |
| 102 | <p style="font-style: italic">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 Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 103 | % end |
| 104 | </main> |
Nils Diewald | 33e1555 | 2014-06-13 19:38:37 +0000 | [diff] [blame] | 105 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 106 | %= content 'javascript' |
| 107 | %= include 'partial/javascript' |
Nils Diewald | ca01b76 | 2014-09-08 02:35:20 +0000 | [diff] [blame] | 108 | %= notifications 'Alertify', -no_include |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 109 | </body> |
| 110 | </html> |