mirror of
https://github.com/michivonah/website-v2.git
synced 2025-12-22 20:46:29 +01:00
Update index.html
This commit is contained in:
parent
67df1538c7
commit
0782a26db1
1 changed files with 28 additions and 2 deletions
30
index.html
30
index.html
|
|
@ -284,11 +284,11 @@
|
|||
<script>
|
||||
// Loading
|
||||
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
|
||||
age(16, 09, 2005);
|
||||
toggleSocialmedia();
|
||||
// AOS.init({disable: 'mobile'});
|
||||
});
|
||||
|
||||
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>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue