Added page layout, fixed page list, updated style

This commit is contained in:
2017-09-24 17:21:29 +02:00
parent aaceec4e1a
commit 3d1ade5ea7
9 changed files with 524 additions and 153 deletions
+29
View File
@@ -0,0 +1,29 @@
/*
Makes
*/
document.addEventListener("DOMContentLoaded", function(event) {
var img = document.getElementById('main-background');
if(isLoaded(img)) {
var width = img.clientWidth;
var height = img.clientHeight;
if(width > (height * 1.50)) {
img.className += ' landscape';
}
} else {
img.onload = function () {
var width = img.clientWidth;
var height = img.clientHeight;
if(width > (height * 1.50)) {
img.className += ' landscape';
}
}
}
});
function isLoaded(img) {
return img.complete && typeof(img.naturalHeight) !== 'undefined' && img.naturalHeight !== 0;
}