pve-manager/PVE/TouchIndex.pm
Dominik Csapak 0dd9c0b75c update favicon, add homescreen icon
this updates the favicon to 64px and the new logo
and adds a 128px image for apple/android homescreen

also we add the relevant html meta link tags
for apple/android homescreen icons

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-13 08:56:53 +02:00

48 lines
1.4 KiB
Perl

package PVE::TouchIndex;
use strict;
use warnings;
sub get_index {
my ($lang, $username, $csrftoken, $console, $nodename) = @_;
my $page = <<_EOD;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>$nodename - Proxmox Virtual Environment</title>
<link rel="icon" sizes="128x128" href="/pve2/images/logo-128.png" />
<link rel="apple-touch-icon" sizes="128x128" href="/pve2/images/logo-128.png" />
<link rel="stylesheet" type="text/css" href="/pve2/touch/resources/css/sencha-touch.css" />
<link rel="stylesheet" type="text/css" href="/pve2/touch/resources/css/pve.css" />
_EOD
my $langfile = "/usr/share/pve-manager/locale/pve-lang-${lang}.js";
if (-f $langfile) {
$page .= "<script type='text/javascript' src='/pve2/locale/pve-lang-${lang}.js'></script>";
} else {
$page .= '<script type="text/javascript">function gettext(buf) { return buf; }</script>';
}
$page .= <<_EOD;
<script type="text/javascript" src="/pve2/touch/sencha-touch-all-debug.js"></script>
<script type="text/javascript" src="/pve2/touch/pvemanager-mobile.js"></script>
<script type="text/javascript">
if (typeof(PVE) === 'undefined') PVE = {};
PVE.UserName = '$username'
PVE.CSRFPreventionToken = '$csrftoken';
</script>
</head>
<body>
</body>
</html>
_EOD
return $page;
}
1;