| <!DOCTYPE html> |
| <html> |
| <head> |
| <title><%= title() // loc('korap_desc') %></title> |
| <meta charset="utf-8" /> |
| <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" /> |
| <link href="<%= stash 'prefix' %>/favicon.ico" rel="shortcut icon" type="image/x-icon" /> |
| <link href="<%= stash 'prefix' %>/css/kalamar-<%= $Kalamar::VERSION %>.css" type="text/css" rel="stylesheet" /> |
| %= javascript begin |
| window.KorAP = window.KorAP || {}; |
| % my $api = url_for('index'); |
| % $api =~ s!/$!!; |
| KorAP.URL = '<%== $api %>'; |
| % end |
| <script src="<%= (stash('prefix') // '') . '/js/' . loc('jsFile', 'kalamar-' . $Kalamar::VERSION . '-en.js') %>" async="async"></script> |
| </head> |
| % my $embedded = 0; |
| % $embedded = 1 if stash('embedded'); |
| <body<% if ($embedded) { %> class="embedded"<% } %>> |
| <div id="kalamar-bg"></div> |
| |
| % unless ($embedded) { |
| %= include 'partial/header' |
| % } |
| |
| % if (!user_auth && stash('auth_support')) { # user not logged in |
| % content_for 'sidebar', begin |
| % if (flash('handle_or_email') && !param('handle_or_email')) { |
| % param(handle_or_email => flash('handle_or_email')); |
| % }; |
| <fieldset> |
| %= form_for 'login', begin |
| <legend><span><%= loc 'login' %></span></legend> |
| %= text_field 'handle_or_email', placeholder => loc('email') |
| <div> |
| %= password_field 'pwd', placeholder => loc('pwd') |
| <button type="submit"><span><%= loc 'go' %></span></button> |
| </div> |
| % end |
| %# <ul> |
| %# <li><%= link_to loc('register') => 'register' %></li> |
| %# <li><%= link_to loc('pwdforgotten') => 'pwd_forgotten' %></li> |
| %# </ul> |
| </fieldset> |
| % end |
| % } |
| |
| % my $aside = content_for('sidebar'); |
| <aside tabindex="0" class="<% unless (length($aside) > 0) { %>off<% } elsif (stash('sidebar_active')) { %>active<% } %>"> |
| <div> |
| %= $aside |
| </div> |
| </aside> |
| |
| <main<% if (stash 'main_class') { %> class="<%= stash 'main_class' %>"<% } %>> |
| %= content |
| </main> |
| |
| % unless ($embedded) { |
| <footer> |
| <a href="http://korap.ids-mannheim.de/"><%= loc 'about' %></a> |
| <%= doc_link_to 'V '. $Kalamar::VERSION, 'korap', 'kalamar' %> |
| </footer> |
| % }; |
| %= notifications 'Kalamar::Plugin::Notifications' |
| </body> |
| </html> |