2017-02-20 13:57:52 +00:00
|
|
|
<?php
|
|
|
|
session_start();
|
|
|
|
$config = json_decode(file_get_contents("config.json"), true);
|
|
|
|
?>
|
2018-04-16 11:15:00 +01:00
|
|
|
|
2018-04-20 11:42:53 +01:00
|
|
|
<!DOCTYPE html>
|
2017-02-20 13:57:52 +00:00
|
|
|
<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-20 11:42:53 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
2017-02-20 13:57:52 +00:00
|
|
|
|
2018-04-20 11:42:53 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="common/css/fontawesome-all.min.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="common/css/bootstrap.min.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="common/css/main.css" />
|
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
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>
|
2018-04-20 11:42:53 +01:00
|
|
|
<div id="wrapper" class="itemlist">
|
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) {
|
2018-04-20 11:42:53 +01:00
|
|
|
echo '<a href="'.$item['link'].'" title="'.$item['alt'].'"><i class="'.$item['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
|
|
|
|
2018-04-20 11:42:53 +01:00
|
|
|
<script type="text/javascript" src="common/js/jquery.min.js"></script>
|
|
|
|
<script src="common/js/trianglify.min.js"></script>
|
2018-04-13 12:04:09 +01:00
|
|
|
<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-20 11:42:53 +01:00
|
|
|
clearTimeout(resizeTimer);
|
|
|
|
resizeTimer = setTimeout(function() {
|
|
|
|
addTriangleTo(homepage);
|
|
|
|
}, 400);
|
2018-04-13 12:04:09 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
addTriangleTo(homepage);
|
|
|
|
</script>
|
2017-02-20 13:57:52 +00:00
|
|
|
</body>
|
|
|
|
</html>
|