2017-02-20 13:57:52 +00:00
|
|
|
<?php
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
$config = json_decode(file_get_contents("config.json"), true);
|
|
|
|
|
|
|
|
function get_current_url() {
|
|
|
|
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
|
2018-04-16 09:15:14 +01:00
|
|
|
$domainName = $_SERVER['SERVER_NAME'];
|
|
|
|
return $protocol . $domainName;
|
2017-02-20 13:57:52 +00:00
|
|
|
}
|
|
|
|
?>
|
2018-04-16 11:15:00 +01:00
|
|
|
|
2017-02-20 13:57:52 +00:00
|
|
|
<!DOCTYPE HTML>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
2018-04-13 12:04:09 +01:00
|
|
|
<title><?= $config['title']; ?></title>
|
2017-02-20 13:57:52 +00:00
|
|
|
|
2018-04-13 12:04:09 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2017-02-20 13:57:52 +00:00
|
|
|
|
2018-04-16 09:15:14 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="hp_assets/css/fontawesome-all.min.css" />
|
2018-04-13 12:04:09 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="hp_assets/css/bootstrap.min.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="hp_assets/css/main.css" />
|
|
|
|
|
|
|
|
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
|
2017-02-20 13:57:52 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body id="homepage">
|
2018-04-16 11:45:44 +01:00
|
|
|
<span class="fa fa-asterisk" style="opacity: 0;"></span>
|
2017-02-20 13:57:52 +00:00
|
|
|
<div id="links-wrap" class="menu-item bg">
|
2018-04-16 11:15:00 +01:00
|
|
|
<center><p>
|
2017-02-20 13:57:52 +00:00
|
|
|
<?php
|
|
|
|
foreach ($config['items'] as $i => $item) {
|
|
|
|
$icon = $item['icon'];
|
|
|
|
$link = str_replace("{{cur}}", get_current_url(), $item['link']);
|
|
|
|
|
2018-04-16 13:28:30 +01:00
|
|
|
echo '<a href="' . $link . '" title="' . $item['alt'] . '"><i class="' . $icon . ' fa-fw"></i></a>';
|
2017-02-20 13:57:52 +00:00
|
|
|
}
|
|
|
|
?>
|
2018-04-16 11:15:00 +01:00
|
|
|
</p></center>
|
2017-02-20 13:57:52 +00:00
|
|
|
</div>
|
2018-04-13 12:04:09 +01:00
|
|
|
|
2017-02-20 13:57:52 +00:00
|
|
|
<script type="text/javascript" src="hp_assets/js/jquery.min.js"></script>
|
2018-04-13 12:04:09 +01:00
|
|
|
<script src="hp_assets/js/trianglify.min.js"></script>
|
|
|
|
<script>
|
|
|
|
function addTriangleTo(target) {
|
|
|
|
var dimensions = target.getClientRects()[0];
|
|
|
|
var pattern = Trianglify({
|
|
|
|
width: dimensions.width,
|
|
|
|
height: dimensions.height
|
|
|
|
});
|
2018-04-16 11:45:44 +01:00
|
|
|
|
2018-04-13 12:04:09 +01:00
|
|
|
target.style['background-image'] = 'url(' + pattern.png() + ')';
|
|
|
|
target.style['background-size'] = 'cover';
|
|
|
|
target.style['-webkit-background-size'] = 'cover';
|
|
|
|
target.style['-moz-background-size'] = 'cover';
|
|
|
|
target.style['-o-background-size'] = 'cover';
|
|
|
|
}
|
|
|
|
|
|
|
|
var resizeTimer;
|
|
|
|
$(window).on('resize', function(e) {
|
2018-04-16 11:15:00 +01:00
|
|
|
clearTimeout(resizeTimer);
|
|
|
|
resizeTimer = setTimeout(function() {
|
|
|
|
<?php echo 'addTriangleTo(homepage)'; ?>
|
|
|
|
}, 400);
|
2018-04-13 12:04:09 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
addTriangleTo(homepage);
|
|
|
|
</script>
|
2017-02-20 13:57:52 +00:00
|
|
|
</body>
|
|
|
|
</html>
|