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 | db03fa9 | 2014-06-23 13:36:55 +0000 | [diff] [blame] | 6 | % my $search_route = url_for; |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 7 | % unless (current_route 'tutorial') { |
Nils Diewald | db03fa9 | 2014-06-23 13:36:55 +0000 | [diff] [blame] | 8 | <div id="tutorial"> |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 9 | % my $tut_page = url_for(session('tutorial') || 'tutorial'); |
| 10 | <a href="<%= $tut_page %>" |
| 11 | target="_blank"><i title="Open in new tab" |
| 12 | class="fa fa-external-link-square"></i></a> |
| 13 | <i onclick="closeTutorial()" |
| 14 | title="close" |
| 15 | class="fa fa-toggle-up"></i> |
| 16 | <iframe src="about:blank" |
| 17 | data-src="<%= $tut_page->query([embedded => 1]) %>"></iframe> |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 18 | </div> |
Nils Diewald | db03fa9 | 2014-06-23 13:36:55 +0000 | [diff] [blame] | 19 | % } |
| 20 | % else { |
| 21 | % $search_route = url_for('index'); |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 22 | % }; |
Nils Diewald | 33e1555 | 2014-06-13 19:38:37 +0000 | [diff] [blame] | 23 | |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 24 | <div id="top"> |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 25 | <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] | 26 | |
Nils Diewald | db03fa9 | 2014-06-23 13:36:55 +0000 | [diff] [blame] | 27 | %= form_for $search_route => begin |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 28 | %= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2']], id => 'ql-field' |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 29 | <br /> |
Nils Diewald | 44a7278 | 2014-06-20 16:03:21 +0000 | [diff] [blame] | 30 | %= search_field 'q', id => 'q-field', autofocus => 'autofocus' |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 31 | <button type="submit" name="action" value="ok"><i class="fa fa-search"></i></button> |
Nils Diewald | b40ddad | 2014-06-23 15:39:18 +0000 | [diff] [blame] | 32 | % if (stash('test_port')) { |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 33 | <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] | 34 | % }; |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 35 | % end |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 36 | |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 37 | <div id="button-right"> |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 38 | % if (param('q')) { |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 39 | <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 Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 40 | % } |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 41 | % unless (current_route 'tutorial') { |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 42 | <button type="button" onclick="openTutorial()"><i class="fa fa-graduation-cap"></i></button> |
Nils Diewald | b22abdf | 2014-06-18 22:57:50 +0000 | [diff] [blame] | 43 | % }; |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 44 | </div> |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 45 | |
| 46 | </div> |
| 47 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 48 | %= content 'sidebar' => begin |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 49 | <div id="sidebar" style="padding-top: 90px"> |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 50 | %= include 'collections' |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 51 | <i class="fa fa-bars"></i> |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 52 | </div> |
Nils Diewald | 02df991 | 2014-06-03 16:08:07 +0000 | [diff] [blame] | 53 | % end |
| 54 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 55 | <main> |
| 56 | %= content main => begin |
| 57 | <p>This is the alternative KorAP Frontend.</p> |
| 58 | <p>The primary goal is to serve as a testbed for the query serialization and for different flavours of user interfaces.</p> |
| 59 | <p>Search capabilities are limited to the demo user.</p> |
| 60 | % end |
| 61 | </main> |
Nils Diewald | 33e1555 | 2014-06-13 19:38:37 +0000 | [diff] [blame] | 62 | |
Nils Diewald | 4af3f0b | 2014-06-25 01:43:17 +0000 | [diff] [blame] | 63 | %= content 'javascript' |
| 64 | %= include 'partial/javascript' |
Nils Diewald | 2329e1d | 2014-06-12 16:07:57 +0000 | [diff] [blame] | 65 | %= notifications 'Alertify' |
Nils Diewald | 5d1ffb4 | 2014-05-21 17:45:34 +0000 | [diff] [blame] | 66 | </body> |
| 67 | </html> |