blob: 9d9640bcbdf5057c830476c755cfd67d5e36d5ea [file] [log] [blame]
Nils Diewald5e485462015-05-07 20:33:04 +00001<!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" />
Akronb3025182015-05-27 23:02:44 +02007 <link href="<%= stash 'prefix' %>/favicon.ico" rel="shortcut icon" type="image/x-icon" />
Nils Diewald705b74a2015-05-07 23:57:34 +00008 <link href="<%= stash 'prefix' %>/css/kalamar-<%= $Kalamar::VERSION %>.css" type="text/css" rel="stylesheet" />
Akron4036d542018-02-12 13:17:09 +01009%= javascript begin
Nils Diewald845282c2015-05-14 07:53:03 +000010 window.KorAP = window.KorAP || {};
11 % my $api = url_for('index');
12 % $api =~ s!/$!!;
13 KorAP.URL = '<%== $api %>';
14% end
Akron4036d542018-02-12 13:17:09 +010015
16% if ($c->app->mode eq 'development') {
Akrona68559c2018-02-13 15:02:18 +010017 <script data-main="/js/src/app/devel" src="/js/lib/require.js" async="async"></script>
Akron4036d542018-02-12 13:17:09 +010018% } else {
Nils Diewalde2647aa2015-05-08 00:54:45 +000019 <script src="<%= (stash('prefix') // '') . '/js/' . loc('jsFile', 'kalamar-' . $Kalamar::VERSION . '-en.js') %>" async="async"></script>
Akron4036d542018-02-12 13:17:09 +010020% };
Nils Diewald5e485462015-05-07 20:33:04 +000021 </head>
22% my $embedded = 0;
23% $embedded = 1 if stash('embedded');
Akronae8f31c2017-11-28 18:05:52 +010024 <body class="no-js<% if ($embedded) { %> embedded<% } %>">
25 <script>document.body.classList.remove('no-js');</script>
Nils Diewald5e485462015-05-07 20:33:04 +000026 <div id="kalamar-bg"></div>
27
Akron50eb8412017-08-31 17:02:13 +020028% if (!$embedded && !user_auth && stash('auth_support')) { # user not logged in
Akron189b3592016-01-04 20:56:46 +010029% content_for 'sidebar', begin
Akron2e3d3772017-04-14 16:20:40 +020030% if (flash('handle_or_email') && !param('handle_or_email')) {
31% param(handle_or_email => flash('handle_or_email'));
32% };
Akron189b3592016-01-04 20:56:46 +010033<fieldset>
Akronae8f31c2017-11-28 18:05:52 +010034 %= form_for 'login', class => 'login', begin
Akron741b2b12017-04-13 22:15:59 +020035 <legend><span><%= loc 'login' %></span></legend>
Akron15158e02018-03-19 12:42:46 +010036 %= csrf_field
Akron2670f5b2017-05-31 17:54:07 +020037 %= text_field 'handle_or_email', placeholder => loc('userormail')
Akron429aeda2018-03-19 16:02:29 +010038 %= hidden_field fwd => $c->url_with
Akron189b3592016-01-04 20:56:46 +010039 <div>
Akron741b2b12017-04-13 22:15:59 +020040 %= password_field 'pwd', placeholder => loc('pwd')
Akron189b3592016-01-04 20:56:46 +010041 <button type="submit"><span><%= loc 'go' %></span></button>
42 </div>
Akron2670f5b2017-05-31 17:54:07 +020043 % end
Akron28cab562018-04-23 13:52:22 +020044 <p><%== loc 'loginExplanation' %></p>
Akrone5ef4e02017-04-19 17:07:52 +020045%# <ul>
46%# <li><%= link_to loc('register') => 'register' %></li>
47%# <li><%= link_to loc('pwdforgotten') => 'pwd_forgotten' %></li>
48%# </ul>
Akron50eb8412017-08-31 17:02:13 +020049
Akron189b3592016-01-04 20:56:46 +010050</fieldset>
51% end
52% }
53
Nils Diewald5e485462015-05-07 20:33:04 +000054 % my $aside = content_for('sidebar');
55 <aside tabindex="0" class="<% unless (length($aside) > 0) { %>off<% } elsif (stash('sidebar_active')) { %>active<% } %>">
56 <div>
Akron27ae9ec2015-06-23 00:43:21 +020057 %= $aside
Nils Diewald5e485462015-05-07 20:33:04 +000058 </div>
59 </aside>
60
Akron4751da62017-06-07 22:37:10 +020061 % unless ($embedded) {
62 %= include 'partial/header'
63 % }
Akrond1741ae2017-11-29 09:58:53 +010064
65
66 <noscript>
67 <p id="activate"><%= loc 'activateJS' %></p>
68 </noscript>
Akron4751da62017-06-07 22:37:10 +020069
Nils Diewald5e485462015-05-07 20:33:04 +000070 <main<% if (stash 'main_class') { %> class="<%= stash 'main_class' %>"<% } %>>
71 %= content
72 </main>
73
74 % unless ($embedded) {
75 <footer>
76 <a href="http://korap.ids-mannheim.de/"><%= loc 'about' %></a>
77 <%= doc_link_to 'V '. $Kalamar::VERSION, 'korap', 'kalamar' %>
78 </footer>
Nils Diewald5e485462015-05-07 20:33:04 +000079 % };
Akron27ae9ec2015-06-23 00:43:21 +020080 %= notifications 'Kalamar::Plugin::Notifications'
Nils Diewald5e485462015-05-07 20:33:04 +000081 </body>
82</html>