Base design finished & content

This commit is contained in:
2017-07-13 15:22:43 +02:00
parent 050d446960
commit 9fe6157707
11 changed files with 584 additions and 117 deletions

View File

@ -13,31 +13,22 @@
var $postContent = $(".post-content");
$postContent.fitVids();
$(".scroll-down").arctic_scroll();
$(".scroll-up").arctic_scroll();
$(".menu-button, .nav-cover, .nav-close").on("click", function(e){
e.preventDefault();
$("body").toggleClass("nav-opened nav-closed");
var scrollTarget = (window.innerHeight * 0.30);
// Don't hide this earlier (in CSS) for SEO reasons
$('.hidden-content').hide();
// On scroll, check if the height is passed, and if so, trigger.
$(document).scroll(function(e){
if (window.scrollY >= scrollTarget) {
$('#scroll-arrow').hide(200);
$('.hidden-content').fadeIn(100);
} else if (window.scrollY < scrollTarget) {
$('.hidden-content').fadeOut(200);
$('#scroll-arrow').show(200);
}
});
var object = $('.homepage-top-header');
var toggleHeight = 1442;
if (object !== null) {
$(document).scroll(function(e){
if (window.scrollY >= (toggleHeight - 100)) {
object.show(300);
} else if (window.scrollY < toggleHeight) {
object.hide(300);
}
});
}
var animateobject = $('.top-header-animate');
if (animateobject !== null) {
animateobject.show(200);
}
});
// Arctic Scroll by Paul Adam Davis