Fix bug for home active link; enter button hover
This commit is contained in:
parent
01cc8fff4d
commit
3d35886051
@ -66,6 +66,9 @@ header {
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
#title button:hover {
|
||||
background-color: rgba(254, 254, 254, 0.25);
|
||||
}
|
||||
/* ---- Navbar ----- */
|
||||
.active {
|
||||
color: #fff;font-weight:bold;
|
||||
|
@ -15,7 +15,7 @@
|
||||
<img src="img/InnovaPatrimonio_logo_transparent_bg_150x98.png" alt="Logo InnovaPatrimonio" id="logo">
|
||||
</div>
|
||||
<div class="column col-5" id="links">
|
||||
<a href="index.html" title="Torna alla home page">Home</a>
|
||||
<a href="/" title="Torna alla home page">Home</a>
|
||||
<a href="progetto.html" title="Vai alla descrizione del progetto">Il progetto</a>
|
||||
<a href="itinerario.html" title="Vai all'itinerario">L'itinerario</a>
|
||||
<a href="news.html" title="Leggi news ed eventi">News & Eventi</a>
|
||||
@ -44,6 +44,12 @@
|
||||
if (window.location.href.includes(ref)) {
|
||||
element.setAttribute('class', 'active');
|
||||
}
|
||||
/**
|
||||
* @todo Take / location into account for Home!
|
||||
*/
|
||||
if (window.location.href = '/') {
|
||||
navlinks[0].setAttribute('class', 'active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user