blob: 36db1fb6ed61e9556a5384e90c19eb17ea2db87f [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 Diewalddb03fa92014-06-23 13:36:55 +00006% my $search_route = url_for;
Nils Diewaldb22abdf2014-06-18 22:57:50 +00007% unless (current_route 'tutorial') {
Nils Diewalddb03fa92014-06-23 13:36:55 +00008<div id="tutorial">
Nils Diewald4af3f0b2014-06-25 01:43:17 +00009% 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 Diewald2329e1d2014-06-12 16:07:57 +000018</div>
Nils Diewalddb03fa92014-06-23 13:36:55 +000019% }
20% else {
21% $search_route = url_for('index');
Nils Diewaldb22abdf2014-06-18 22:57:50 +000022% };
Nils Diewald33e15552014-06-13 19:38:37 +000023
Nils Diewald02df9912014-06-03 16:08:07 +000024<div id="top">
Nils Diewaldb22abdf2014-06-18 22:57:50 +000025 <a href="<%= url_for 'index' %>"><h1><span>KorAP- Korpusanalyseplattform der nächsten Generation</span></h1></a>
Nils Diewalddb03fa92014-06-23 13:36:55 +000026
Nils Diewalddb03fa92014-06-23 13:36:55 +000027%= form_for $search_route => begin
Nils Diewald2329e1d2014-06-12 16:07:57 +000028%= select_field ql => [[Poliqarp => 'poliqarp'], ['Cosmas II' => 'cosmas2']], id => 'ql-field'
Nils Diewald02df9912014-06-03 16:08:07 +000029<br />
Nils Diewald44a72782014-06-20 16:03:21 +000030%= search_field 'q', id => 'q-field', autofocus => 'autofocus'
Nils Diewald02df9912014-06-03 16:08:07 +000031<button type="submit" name="action" value="ok"><i class="fa fa-search"></i></button>
Nils Diewaldb40ddad2014-06-23 15:39:18 +000032% if (stash('test_port')) {
Nils Diewald02df9912014-06-03 16:08:07 +000033<button type="submit" name="action" value="inspect"><i class="fa fa-code"></i></button>
Nils Diewaldb40ddad2014-06-23 15:39:18 +000034% };
Nils Diewald5d1ffb42014-05-21 17:45:34 +000035% end
Nils Diewald02df9912014-06-03 16:08:07 +000036
Nils Diewald02df9912014-06-03 16:08:07 +000037<div id="button-right">
Nils Diewald2329e1d2014-06-12 16:07:57 +000038% if (param('q')) {
Nils Diewald02df9912014-06-03 16:08:07 +000039<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 +000040% }
Nils Diewaldb22abdf2014-06-18 22:57:50 +000041% unless (current_route 'tutorial') {
Nils Diewald2329e1d2014-06-12 16:07:57 +000042<button type="button" onclick="openTutorial()"><i class="fa fa-graduation-cap"></i></button>
Nils Diewaldb22abdf2014-06-18 22:57:50 +000043% };
Nils Diewald2329e1d2014-06-12 16:07:57 +000044</div>
Nils Diewald02df9912014-06-03 16:08:07 +000045
46</div>
47
Nils Diewald4af3f0b2014-06-25 01:43:17 +000048%= content 'sidebar' => begin
Nils Diewald02df9912014-06-03 16:08:07 +000049<div id="sidebar" style="padding-top: 90px">
Nils Diewald2329e1d2014-06-12 16:07:57 +000050%= include 'collections'
Nils Diewald4af3f0b2014-06-25 01:43:17 +000051 <i class="fa fa-bars"></i>
Nils Diewald02df9912014-06-03 16:08:07 +000052</div>
Nils Diewald02df9912014-06-03 16:08:07 +000053% end
54
Nils Diewald4af3f0b2014-06-25 01:43:17 +000055<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 Diewald33e15552014-06-13 19:38:37 +000062
Nils Diewald4af3f0b2014-06-25 01:43:17 +000063%= content 'javascript'
64%= include 'partial/javascript'
Nils Diewald2329e1d2014-06-12 16:07:57 +000065%= notifications 'Alertify'
Nils Diewald5d1ffb42014-05-21 17:45:34 +000066 </body>
67</html>