blob: 763ac989c87cb5ef726c543bdc77419d31237c49 [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" />
Nils Diewald845282c2015-05-14 07:53:03 +00009 %= javascript begin
10 window.KorAP = window.KorAP || {};
11 % my $api = url_for('index');
12 % $api =~ s!/$!!;
13 KorAP.URL = '<%== $api %>';
14% end
Nils Diewalde2647aa2015-05-08 00:54:45 +000015 <script src="<%= (stash('prefix') // '') . '/js/' . loc('jsFile', 'kalamar-' . $Kalamar::VERSION . '-en.js') %>" async="async"></script>
Nils Diewald5e485462015-05-07 20:33:04 +000016 </head>
17% my $embedded = 0;
18% $embedded = 1 if stash('embedded');
Akronae8f31c2017-11-28 18:05:52 +010019 <body class="no-js<% if ($embedded) { %> embedded<% } %>">
20 <script>document.body.classList.remove('no-js');</script>
Nils Diewald5e485462015-05-07 20:33:04 +000021 <div id="kalamar-bg"></div>
22
Akron50eb8412017-08-31 17:02:13 +020023% if (!$embedded && !user_auth && stash('auth_support')) { # user not logged in
Akron189b3592016-01-04 20:56:46 +010024% content_for 'sidebar', begin
Akron2e3d3772017-04-14 16:20:40 +020025% if (flash('handle_or_email') && !param('handle_or_email')) {
26% param(handle_or_email => flash('handle_or_email'));
27% };
Akron189b3592016-01-04 20:56:46 +010028<fieldset>
Akronae8f31c2017-11-28 18:05:52 +010029 %= form_for 'login', class => 'login', begin
Akron741b2b12017-04-13 22:15:59 +020030 <legend><span><%= loc 'login' %></span></legend>
Akron2670f5b2017-05-31 17:54:07 +020031 %= text_field 'handle_or_email', placeholder => loc('userormail')
Akron189b3592016-01-04 20:56:46 +010032 <div>
Akron741b2b12017-04-13 22:15:59 +020033 %= password_field 'pwd', placeholder => loc('pwd')
Akron189b3592016-01-04 20:56:46 +010034 <button type="submit"><span><%= loc 'go' %></span></button>
35 </div>
Akron2670f5b2017-05-31 17:54:07 +020036 % end
37 <p><%= loc 'loginExplanation' %></p>
Akrone5ef4e02017-04-19 17:07:52 +020038%# <ul>
39%# <li><%= link_to loc('register') => 'register' %></li>
40%# <li><%= link_to loc('pwdforgotten') => 'pwd_forgotten' %></li>
41%# </ul>
Akron50eb8412017-08-31 17:02:13 +020042
Akron189b3592016-01-04 20:56:46 +010043</fieldset>
44% end
45% }
46
Nils Diewald5e485462015-05-07 20:33:04 +000047 % my $aside = content_for('sidebar');
48 <aside tabindex="0" class="<% unless (length($aside) > 0) { %>off<% } elsif (stash('sidebar_active')) { %>active<% } %>">
49 <div>
Akron27ae9ec2015-06-23 00:43:21 +020050 %= $aside
Nils Diewald5e485462015-05-07 20:33:04 +000051 </div>
52 </aside>
53
Akron4751da62017-06-07 22:37:10 +020054 % unless ($embedded) {
55 %= include 'partial/header'
56 % }
57
Nils Diewald5e485462015-05-07 20:33:04 +000058 <main<% if (stash 'main_class') { %> class="<%= stash 'main_class' %>"<% } %>>
59 %= content
60 </main>
61
62 % unless ($embedded) {
63 <footer>
64 <a href="http://korap.ids-mannheim.de/"><%= loc 'about' %></a>
65 <%= doc_link_to 'V '. $Kalamar::VERSION, 'korap', 'kalamar' %>
66 </footer>
Nils Diewald5e485462015-05-07 20:33:04 +000067 % };
Akron27ae9ec2015-06-23 00:43:21 +020068 %= notifications 'Kalamar::Plugin::Notifications'
Nils Diewald5e485462015-05-07 20:33:04 +000069 </body>
70</html>