mirror of
https://github.com/alexankitty/Myrient-Search-Engine.git
synced 2026-01-15 16:33:15 -03:00
Highlight the selected page
This commit is contained in:
@@ -48,4 +48,7 @@
|
||||
.footer-text{
|
||||
margin: 0;
|
||||
}
|
||||
.selected{
|
||||
color: rgb(255, 189, 51)!important;
|
||||
}
|
||||
</style>
|
||||
@@ -14,4 +14,13 @@
|
||||
<a class="nav-link text-white" href="/settings">Settings</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</nav>
|
||||
|
||||
<script defer>
|
||||
const aTags = document.querySelectorAll('a')
|
||||
aTags.forEach(aTag => {
|
||||
if(aTag.getAttribute('href') == window.location.pathname){
|
||||
aTag.classList.add('selected')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user