Nils Diewald | 5e48546 | 2015-05-07 20:33:04 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title><%= title() // loc('korap_desc') %></title> |
| 5 | <meta charset="utf-8" /> |
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=false, user-scalable=no" /> |
Akron | b302518 | 2015-05-27 23:02:44 +0200 | [diff] [blame] | 7 | <link href="<%= stash 'prefix' %>/favicon.ico" rel="shortcut icon" type="image/x-icon" /> |
Nils Diewald | 705b74a | 2015-05-07 23:57:34 +0000 | [diff] [blame] | 8 | <link href="<%= stash 'prefix' %>/css/kalamar-<%= $Kalamar::VERSION %>.css" type="text/css" rel="stylesheet" /> |
Nils Diewald | 845282c | 2015-05-14 07:53:03 +0000 | [diff] [blame] | 9 | %= javascript begin |
| 10 | window.KorAP = window.KorAP || {}; |
| 11 | % my $api = url_for('index'); |
| 12 | % $api =~ s!/$!!; |
| 13 | KorAP.URL = '<%== $api %>'; |
| 14 | % end |
Nils Diewald | e2647aa | 2015-05-08 00:54:45 +0000 | [diff] [blame] | 15 | <script src="<%= (stash('prefix') // '') . '/js/' . loc('jsFile', 'kalamar-' . $Kalamar::VERSION . '-en.js') %>" async="async"></script> |
Nils Diewald | 5e48546 | 2015-05-07 20:33:04 +0000 | [diff] [blame] | 16 | </head> |
| 17 | % my $embedded = 0; |
| 18 | % $embedded = 1 if stash('embedded'); |
| 19 | <body<% if ($embedded) { %> class="embedded"<% } %>> |
| 20 | <div id="kalamar-bg"></div> |
| 21 | |
| 22 | % unless ($embedded) { |
Akron | 27ae9ec | 2015-06-23 00:43:21 +0200 | [diff] [blame] | 23 | %= include 'partial/header' |
Nils Diewald | 5e48546 | 2015-05-07 20:33:04 +0000 | [diff] [blame] | 24 | % } |
| 25 | |
Akron | 3cd391e | 2017-03-29 23:42:54 +0200 | [diff] [blame] | 26 | % unless (user_auth) { # user not logged in |
Akron | 189b359 | 2016-01-04 20:56:46 +0100 | [diff] [blame] | 27 | % content_for 'sidebar', begin |
Akron | 2e3d377 | 2017-04-14 16:20:40 +0200 | [diff] [blame] | 28 | % if (flash('handle_or_email') && !param('handle_or_email')) { |
| 29 | % param(handle_or_email => flash('handle_or_email')); |
| 30 | % }; |
Akron | 189b359 | 2016-01-04 20:56:46 +0100 | [diff] [blame] | 31 | <fieldset> |
Akron | e8235be | 2016-06-27 11:02:18 +0200 | [diff] [blame] | 32 | %= form_for 'login', begin |
Akron | 741b2b1 | 2017-04-13 22:15:59 +0200 | [diff] [blame] | 33 | <legend><span><%= loc 'login' %></span></legend> |
| 34 | %= text_field 'handle_or_email', placeholder => loc('email') |
Akron | 189b359 | 2016-01-04 20:56:46 +0100 | [diff] [blame] | 35 | <div> |
Akron | 741b2b1 | 2017-04-13 22:15:59 +0200 | [diff] [blame] | 36 | %= password_field 'pwd', placeholder => loc('pwd') |
Akron | 189b359 | 2016-01-04 20:56:46 +0100 | [diff] [blame] | 37 | <button type="submit"><span><%= loc 'go' %></span></button> |
| 38 | </div> |
Akron | e8235be | 2016-06-27 11:02:18 +0200 | [diff] [blame] | 39 | % end |
| 40 | <ul> |
| 41 | <li><%= link_to loc('register') => 'register' %></li> |
| 42 | <li><%= link_to loc('pwdforgotten') => 'pwd_forgotten' %></li> |
| 43 | </ul> |
Akron | 189b359 | 2016-01-04 20:56:46 +0100 | [diff] [blame] | 44 | </fieldset> |
| 45 | % end |
| 46 | % } |
| 47 | |
Nils Diewald | 5e48546 | 2015-05-07 20:33:04 +0000 | [diff] [blame] | 48 | % my $aside = content_for('sidebar'); |
| 49 | <aside tabindex="0" class="<% unless (length($aside) > 0) { %>off<% } elsif (stash('sidebar_active')) { %>active<% } %>"> |
| 50 | <div> |
Akron | 27ae9ec | 2015-06-23 00:43:21 +0200 | [diff] [blame] | 51 | %= $aside |
Nils Diewald | 5e48546 | 2015-05-07 20:33:04 +0000 | [diff] [blame] | 52 | </div> |
| 53 | </aside> |
| 54 | |
| 55 | <main<% if (stash 'main_class') { %> class="<%= stash 'main_class' %>"<% } %>> |
| 56 | %= content |
| 57 | </main> |
| 58 | |
| 59 | % unless ($embedded) { |
| 60 | <footer> |
| 61 | <a href="http://korap.ids-mannheim.de/"><%= loc 'about' %></a> |
| 62 | <%= doc_link_to 'V '. $Kalamar::VERSION, 'korap', 'kalamar' %> |
| 63 | </footer> |
Nils Diewald | 5e48546 | 2015-05-07 20:33:04 +0000 | [diff] [blame] | 64 | % }; |
Akron | 27ae9ec | 2015-06-23 00:43:21 +0200 | [diff] [blame] | 65 | %= notifications 'Kalamar::Plugin::Notifications' |
Nils Diewald | 5e48546 | 2015-05-07 20:33:04 +0000 | [diff] [blame] | 66 | </body> |
| 67 | </html> |