diff --git a/_includes/master/head.html b/_includes/master/head.html index b69d180..d240a31 100644 --- a/_includes/master/head.html +++ b/_includes/master/head.html @@ -5,5 +5,6 @@ + \ No newline at end of file diff --git a/_includes/master/header.html b/_includes/master/header.html index 837983c..d2b401e 100644 --- a/_includes/master/header.html +++ b/_includes/master/header.html @@ -16,4 +16,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/assets/js/scroll-header.js b/assets/js/scroll-header.js new file mode 100644 index 0000000..2830691 --- /dev/null +++ b/assets/js/scroll-header.js @@ -0,0 +1,18 @@ +window.onscroll = function() {headerScroll()}; + +function headerScroll() { + var scrollTop = document.body.scrollTop || document.documentElement.scrollTop; + + if (scrollTop > 0 && scrollTop < 60) { + document.querySelector('#for-banner').style.opacity = '1'; + } + if (scrollTop > 60 && scrollTop < 5000) { + document.querySelector('#for-banner').style.opacity = '0'; + } + if (scrollTop > 0 && scrollTop < 129) { + document.querySelector('hb').style.backgroundColor = 'transparent'; + } + if (scrollTop > 130 && scrollTop < 5000) { + document.querySelector('hb').style.backgroundColor = 'var(--blue)'; + } +}