new: Add interactive bar script
This commit is contained in:
13
public/bar.js
Normal file
13
public/bar.js
Normal 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
|
||||
}
|
@ -46,7 +46,7 @@ body{
|
||||
}
|
||||
|
||||
.links a{
|
||||
margin-left: 7px;
|
||||
margin-left: 12px;
|
||||
color: var(--bright-main);
|
||||
font-family: Ubuntu;
|
||||
font-size: 20px;
|
||||
|
Reference in New Issue
Block a user