100 lines
5.4 KiB
Plaintext
100 lines
5.4 KiB
Plaintext
% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Let's Upload that FIle</title>
|
|
<meta charset="utf-8">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<link rel="icon" type="image/png" href="<%= url_for('/img/favicon.png') %>">
|
|
<link rel="icon" sizes="128x128" href="<%= url_for('/img/lufi128.png') %>">
|
|
<link rel="icon" sizes="196x196" href="<%= url_for('/img/lufi196.png') %>">
|
|
<link rel="apple-touch-icon" href="<%= url_for('/img/lufi60.png') %>">
|
|
<link rel="apple-touch-icon" sizes="76x76" href="<%= url_for('/img/lufi76.png') %>">
|
|
<link rel="apple-touch-icon" sizes="120x120" href="<%= url_for('/img/lufi120.png') %>">
|
|
<link rel="apple-touch-icon" sizes="152x152" href="<%= url_for('/img/lufi152.png') %>">
|
|
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="<%= url_for('/img/lufi128.png') %>">
|
|
%= stylesheet '/css/materialize.min.css'
|
|
%= stylesheet '/css/lufi.css'
|
|
%= javascript begin
|
|
function confirmExit() {
|
|
console.log(i18n.confirmExit);
|
|
return i18n.confirmExit;
|
|
}
|
|
|
|
// Is the browser IE?
|
|
var isIE = /*@cc_on!@*/false || !!document.documentMode;
|
|
|
|
// If the browser is IE, add readAsBinaryString function and store the data
|
|
if (isIE == true){
|
|
if (FileReader.prototype.readAsBinaryString === undefined) {
|
|
FileReader.prototype.readAsBinaryString = function (fileData) {
|
|
var binary = "";
|
|
var pt = this;
|
|
var reader = new FileReader();
|
|
reader.onload = function (e) {
|
|
var bytes = new Uint8Array(reader.result);
|
|
var length = bytes.byteLength;
|
|
for (var i = 0; i < length; i++) {
|
|
binary += String.fromCharCode(bytes[i]);
|
|
}
|
|
//pt.result - readonly so assign content to another property
|
|
pt.content = binary;
|
|
$(pt).trigger('onloadend');
|
|
}
|
|
reader.readAsArrayBuffer(fileData);
|
|
}
|
|
}
|
|
}
|
|
% end
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
</head>
|
|
<body>
|
|
<nav class="cyan">
|
|
<div class="nav-wrapper container">
|
|
<a href="<%= url_for('/') %>" class="brand-logo"> <img src="<%= url_for('/img/lufi-min.png') %>" alt="logo"> Lufi</a>
|
|
<a href="#" data-activates="mobile-demo" class="button-collapse"><i class="mdi-navigation-menu"></i></a>
|
|
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
|
% if ((!defined(config('ldap')) && !defined(config('htpasswd'))) || is_user_authenticated()) {
|
|
<li<%== ' class="active"' if (current_route eq 'index') %>><a href="<%= url_for('/') %>"><%= l('Upload files') %></a></li>
|
|
<li<%== ' class="active"' if (current_route eq 'files') %>><a href="<%= url_for('/files') %>"><%= l('My files') %></a></li>
|
|
% } else {
|
|
<li><a href="<%= url_for('/login') %>"><%= l('Signin') %></a></li>
|
|
% }
|
|
<li<%== ' class="active"' if (current_route eq 'about') %>><a href="<%= url_for('/about') %>"><%= l('About') %></a></li>
|
|
% if ((defined(config('ldap')) || defined(config('htpasswd'))) && is_user_authenticated()) {
|
|
<li><a href="<%= url_for('/logout') %>"><%= l('Logout') %></a></li>
|
|
% }
|
|
</ul>
|
|
<ul id="mobile-demo" class="side-nav">
|
|
% if ((!defined(config('ldap')) && !defined(config('htpasswd'))) || is_user_authenticated()) {
|
|
<li<%== ' class="active"' if (current_route eq 'index') %>><a href="<%= url_for('/') %>"><%= l('Upload files') %></a></li>
|
|
<li<%== ' class="active"' if (current_route eq 'files') %>><a href="<%= url_for('/files') %>"><%= l('My files') %></a></li>
|
|
% } else {
|
|
<li><a href="<%= url_for('/login') %>"><%= l('Signin') %></a></li>
|
|
% }
|
|
<li<%== ' class="active"' if (current_route eq 'about') %>><a href="<%= url_for('/about') %>"><%= l('About') %></a></li>
|
|
% if ((defined(config('ldap')) || defined(config('htpasswd'))) && is_user_authenticated()) {
|
|
<li><a href="<%= url_for('/logout') %>"><%= l('Logout') %></a></li>
|
|
% }
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<div class="container">
|
|
%= javascript '/js/jquery-2.1.1.min.js'
|
|
%= javascript '/js/lufi-common.js'
|
|
<%= content %>
|
|
</div>
|
|
% if (defined(config('piwik_img'))) {
|
|
<img src="<%== config('piwik_img') %>" style="border:0" alt="" />
|
|
% }
|
|
%= javascript '/js/materialize.js'
|
|
%= javascript begin
|
|
$(document).ready(function() {
|
|
$(".button-collapse").sideNav();
|
|
});
|
|
%end
|
|
</body>
|
|
</html>
|