This commit is contained in:
Kukielka 2018-04-20 12:42:53 +02:00
parent 4fa25fda8f
commit e6476d577f
21 changed files with 23 additions and 34 deletions

View File

@ -4,7 +4,6 @@ html {
} }
body { body {
font-family: sans-serif;
z-index: 1; z-index: 1;
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -12,17 +11,18 @@ body {
background-attachment: fixed; background-attachment: fixed;
} }
.bg { .itemlist {
border-radius: 6px; border-radius: 6px;
background-color: rgba(0, 0, 0, .4); background-color: rgba(0, 0, 0, .4);
padding: 20px; padding: 20px;
box-sizing: border-box;
} }
.bg a { .itemlist a {
color: #fff; color: #fff;
} }
#links-wrap { #wrapper {
font-size: 80px; font-size: 80px;
position: fixed; position: fixed;
left: 50%; left: 50%;
@ -38,27 +38,27 @@ body {
overflow-y: scroll; overflow-y: scroll;
} }
#links-wrap a { #wrapper a {
transition: .3s all; transition: .3s all;
} }
#links-wrap a:hover { #wrapper a:hover {
color: #c4c4c4; color: #c4c4c4;
} }
#links-wrap .link { #wrapper .link {
display: inline-block; display: inline-block;
width: 33%; width: 33%;
float: left; float: left;
text-align: center; text-align: center;
} }
#links-wrap::-webkit-scrollbar { #wrapper::-webkit-scrollbar {
width: 10px; width: 10px;
background-color: transparent; background-color: transparent;
} }
#links-wrap::-webkit-scrollbar-thumb { #wrapper::-webkit-scrollbar-thumb {
border-radius: 6px; border-radius: 6px;
-webkit-box-shadow: inset 0 0 3px rgba(0,0,0,.4); -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,.4);
background-color: rgba(255,255,255,.2); background-color: rgba(255,255,255,.2);

View File

Before

Width:  |  Height:  |  Size: 500 KiB

After

Width:  |  Height:  |  Size: 500 KiB

View File

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

Before

Width:  |  Height:  |  Size: 410 KiB

After

Width:  |  Height:  |  Size: 410 KiB

View File

@ -1,46 +1,35 @@
<?php <?php
session_start(); session_start();
$config = json_decode(file_get_contents("config.json"), true); $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://";
$domainName = $_SERVER['SERVER_NAME'];
return $protocol . $domainName;
}
?> ?>
<!DOCTYPE HTML> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title><?= $config['title']; ?></title> <title><?= $config['title']; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="hp_assets/css/fontawesome-all.min.css" /> <link rel="stylesheet" type="text/css" href="common/css/fontawesome-all.min.css" />
<link rel="stylesheet" type="text/css" href="hp_assets/css/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="common/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="hp_assets/css/main.css" /> <link rel="stylesheet" type="text/css" href="common/css/main.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head> </head>
<body id="homepage"> <body id="homepage">
<span class="fa fa-asterisk" style="opacity: 0;"></span> <span class="fa fa-asterisk" style="opacity: 0;"></span>
<div id="links-wrap" class="menu-item bg"> <div id="wrapper" class="itemlist">
<center><p> <center><p>
<?php <?php
foreach ($config['items'] as $i => $item) { foreach ($config['items'] as $i => $item) {
$icon = $item['icon']; echo '<a href="'.$item['link'].'" title="'.$item['alt'].'"><i class="'.$item['icon'].' fa-fw"></i></a>';
$link = str_replace("{{cur}}", get_current_url(), $item['link']);
echo '<a href="' . $link . '" title="' . $item['alt'] . '"><i class="' . $icon . ' fa-fw"></i></a>';
} }
?> ?>
</p></center> </p></center>
</div> </div>
<script type="text/javascript" src="hp_assets/js/jquery.min.js"></script> <script type="text/javascript" src="common/js/jquery.min.js"></script>
<script src="hp_assets/js/trianglify.min.js"></script> <script src="common/js/trianglify.min.js"></script>
<script> <script>
function addTriangleTo(target) { function addTriangleTo(target) {
var dimensions = target.getClientRects()[0]; var dimensions = target.getClientRects()[0];
@ -58,10 +47,10 @@
var resizeTimer; var resizeTimer;
$(window).on('resize', function(e) { $(window).on('resize', function(e) {
clearTimeout(resizeTimer); clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() { resizeTimer = setTimeout(function() {
<?php echo 'addTriangleTo(homepage)'; ?> addTriangleTo(homepage);
}, 400); }, 400);
}); });
addTriangleTo(homepage); addTriangleTo(homepage);