Update index.html

This commit is contained in:
Michi 2022-05-15 11:18:26 +02:00 committed by GitHub
parent 67df1538c7
commit 0782a26db1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -284,11 +284,11 @@
<script> <script>
// Loading // Loading
window.addEventListener('load', () => { window.addEventListener('load', () => {
// Code here document.getElementById('scroll-top').style.display = "none";
//document.getElementById('scroll-top').style.display = "none";
// Instagram: https://www.instagram.com/vompictures/?__a=1 // Instagram: https://www.instagram.com/vompictures/?__a=1
age(16, 09, 2005); age(16, 09, 2005);
toggleSocialmedia(); toggleSocialmedia();
// AOS.init({disable: 'mobile'});
}); });
document.getElementById('scroll-top').addEventListener("click", function(){ document.getElementById('scroll-top').addEventListener("click", function(){
@ -367,6 +367,32 @@
} }
} }
window.addEventListener('scroll', function(e) {
var navbar = document.getElementById('navbar');
var scrollTop = document.getElementById('scroll-top');
if(this.scrollY > 20){
navbar.style.background = "var(--theme1)";
navbar.style.color = "#fff";
scrollTop.style.display = "flex";
}
else{
if(window.innerWidth <= 640){
if(document.getElementById('navbar-links').style.display == "block"){
navbar.style.background = "var(--theme1)";
scrollTop.style.display = "none";
}
else{
navbar.style.background = "transparent";
scrollTop.style.display = "none";
}
}
else{
navbar.style.background = "transparent";
scrollTop.style.display = "none";
}
}
});
</script> </script>
</body> </body>
</html> </html>