style: Updated navbar title animation
This commit is contained in:
parent
cffb1d0d00
commit
9b39f7478a
@ -4,34 +4,37 @@ let interval = null;
|
||||
let interval2 = null;
|
||||
let interval3 = null;
|
||||
|
||||
document.querySelector(".hacker").onmouseover = event => {
|
||||
|
||||
window.onload = (event) => {
|
||||
|
||||
target = document.querySelector(".navbar-brand");
|
||||
let iteration = 0;
|
||||
let old = event.target.innerText;
|
||||
console.log(old);
|
||||
let final = "NATHAN.WOODBURN/";
|
||||
clearInterval(interval);
|
||||
|
||||
interval = setInterval(() => {
|
||||
event.target.innerText = event.target.innerText
|
||||
target.innerText = target.innerText
|
||||
.split("")
|
||||
.map((letter, index) => {
|
||||
if(index < iteration) {
|
||||
return old[index];
|
||||
return final[index];
|
||||
}
|
||||
|
||||
return letters[Math.floor(Math.random() * 41)]
|
||||
})
|
||||
.join("");
|
||||
|
||||
if(iteration >= old.length){
|
||||
if(iteration >= final.length){
|
||||
clearInterval(interval);
|
||||
}
|
||||
|
||||
iteration += 1 / 3;
|
||||
}, 30);
|
||||
}
|
||||
document.querySelector(".hacker2").onmouseover = event => {
|
||||
};
|
||||
|
||||
document.querySelector(".copyright").onmouseover = event => {
|
||||
let iteration2 = 0;
|
||||
let old2 = event.target.innerText;
|
||||
let old2 = "Copyright © Nathan Woodburn 2023";
|
||||
console.log(old2);
|
||||
clearInterval(interval2);
|
||||
|
||||
@ -54,28 +57,28 @@ document.querySelector(".hacker2").onmouseover = event => {
|
||||
iteration2 += 1/3;
|
||||
}, 10);
|
||||
}
|
||||
document.querySelector(".hacker3").onmouseover = event => {
|
||||
let iteration3 = 0;
|
||||
let old3 = event.target.innerText;
|
||||
console.log(old3);
|
||||
clearInterval(interval3);
|
||||
// document.querySelector(".hacker3").onmouseover = event => {
|
||||
// let iteration3 = 0;
|
||||
// let old3 = event.target.innerText;
|
||||
// console.log(old3);
|
||||
// clearInterval(interval3);
|
||||
|
||||
interval3 = setInterval(() => {
|
||||
event.target.innerText = event.target.innerText
|
||||
.split("")
|
||||
.map((letter, index3) => {
|
||||
if(index3 < iteration3) {
|
||||
return old3[index3];
|
||||
}
|
||||
// interval3 = setInterval(() => {
|
||||
// event.target.innerText = event.target.innerText
|
||||
// .split("")
|
||||
// .map((letter, index3) => {
|
||||
// if(index3 < iteration3) {
|
||||
// return old3[index3];
|
||||
// }
|
||||
|
||||
return letters[Math.floor(Math.random() * 41)]
|
||||
})
|
||||
.join("");
|
||||
// return letters[Math.floor(Math.random() * 41)]
|
||||
// })
|
||||
// .join("");
|
||||
|
||||
if(iteration3 >= old3.length){
|
||||
clearInterval(interval3);
|
||||
}
|
||||
// if(iteration3 >= old3.length){
|
||||
// clearInterval(interval3);
|
||||
// }
|
||||
|
||||
iteration3 += 1 / 3;
|
||||
}, 10);
|
||||
}
|
||||
// iteration3 += 1 / 3;
|
||||
// }, 10);
|
||||
// }
|
@ -45,7 +45,7 @@ height="0" width="0" style="display: none;visibility: hidden;"></iframe></noscri
|
||||
<!-- End Google Tag Manager (noscript) --><script src="https://nathan.woodburn/handshake.js" domain="nathan.woodburn"></script>
|
||||
<script src="https://nathan.woodburn/https.js"></script>
|
||||
<nav class="navbar navbar-light navbar-expand-md fixed-top" id="mainNav">
|
||||
<div class="container"><a class="navbar-brand hacker" href="/#">Nathan.Woodburn/</a><button data-bs-toggle="collapse" class="navbar-toggler navbar-toggler-right" data-bs-target="#navbarResponsive" type="button" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation" value="Menu"><i class="fa fa-bars"></i></button>
|
||||
<div class="container"><a class="navbar-brand" href="/#">Nathan.Woodburn/</a><button data-bs-toggle="collapse" class="navbar-toggler navbar-toggler-right" data-bs-target="#navbarResponsive" type="button" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation" value="Menu"><i class="fa fa-bars"></i></button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item nav-link"><a class="nav-link" href="/">Home</a></li>
|
||||
@ -151,7 +151,7 @@ height="0" width="0" style="display: none;visibility: hidden;"></iframe></noscri
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p>This site is also available on <a href="https://learn.namebase.io/" target="_blank">Handshake</a> at <a href="https://nathan.woodburn" target="_blank">https://nathan.woodburn/</a></p>
|
||||
<p class="hacker2">Copyright © Nathan Woodburn 2023</p>
|
||||
<p class="copyright">Copyright © Nathan Woodburn 2023</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user