Removed Unsplash

Removed Unsplash in order to keep everything simple. (Also the load times were too god damn high)
This commit is contained in:
Kukielka
2018-04-16 12:15:00 +02:00
parent 05247c761f
commit b9dfafa3bd
11 changed files with 49 additions and 209 deletions

View File

@ -9,6 +9,7 @@
return $protocol . $domainName;
}
?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@ -24,45 +25,25 @@
</head>
<body id="homepage">
<div id="bg-overlay">&nbsp;</div>
<!-- Line below is to preload the font when the page loads -->
<span class="fa fa-asterisk" style="opacity: 0;">&nbsp;</span>
<div id="links-wrap" class="menu-item bg">
<center><p>
<?php
echo '<center><p>';
foreach ($config['items'] as $i => $item) {
$icon = $item['icon'];
$link = str_replace("{{cur}}", get_current_url(), $item['link']);
echo '<a href="' . $link . '" title="' . $item['alt'] . '"><i class="fa ' . $icon . ' fa-fw"></i></a>';
}
echo '</p></center>';
?>
</p></center>
</div>
<?php
if ($config['credits'] == true) {
echo '<div id="pic-info-wrap" class="menu-item hidden bg">';
echo ' <span id="pic-info">Picture by <a href="#" id="pic-info-url"></a></span>';
echo '</div>';
}
?>
<script type="text/javascript" src="hp_assets/js/jquery.min.js"></script>
<script type="text/javascript" src="hp_assets/js/main.js"></script>
<script src="hp_assets/js/trianglify.min.js"></script>
<script>
function addTriangleTo(target) {
var dimensions = target.getClientRects()[0];
var pattern = Trianglify({
<?php
if ($config['unsplash_client_id'] != "") {
echo 'x_colors: \'Greys\',';
echo 'y_colors: \'match_x\',';
}
?>
width: dimensions.width,
height: dimensions.height
});
@ -74,16 +55,11 @@
}
var resizeTimer;
$(window).on('resize', function(e) {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
<?php
if ($config['unsplash_client_id'] == "") {
echo 'addTriangleTo(homepage)';
}
?>
}, 400);
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
<?php echo 'addTriangleTo(homepage)'; ?>
}, 400);
});
addTriangleTo(homepage);