new: Add interactive bar script

This commit is contained in:
ngn
2024-03-21 20:10:38 +03:00
parent 275053ddb3
commit 52c619d289
5 changed files with 19 additions and 4 deletions

13
public/bar.js Normal file
View File

@ -0,0 +1,13 @@
const links = [].slice.call(document.getElementById("links").children)
links.sort((a, b) => b.href.length - a.href.length);
for(let i in links){
if(!location.href.startsWith(links[i].href)){
continue
}
links[i].style = `
color: var(--bright-second);
font-weight: 900;
text-decoration: underline;`
break
}

View File

@ -46,7 +46,7 @@ body{
}
.links a{
margin-left: 7px;
margin-left: 12px;
color: var(--bright-main);
font-family: Ubuntu;
font-size: 20px;