Add logos in footer; test for active link...

This commit is contained in:
Nicolò P 2021-07-30 13:23:02 +02:00
parent 157a875352
commit 24410ce6be
2 changed files with 10 additions and 9 deletions

View File

@ -114,6 +114,6 @@ footer p {
font-size: 0.7rem; font-size: 0.7rem;
margin-top: 1rem; margin-top: 1rem;
} }
#benef { .logos {
max-height: 70px; max-height: 70px;
} }

View File

@ -31,7 +31,8 @@
<main></main> <main></main>
<footer class="roboto"> <footer class="roboto">
<p id="copy">&copy; Avviso pubblico Beni Culturali e Turismo POR FESR Lazio 2014-2020</p> <p id="copy">&copy; Avviso pubblico Beni Culturali e Turismo POR FESR Lazio 2014-2020</p>
<p><img src="img/FESR_BARRA_BENEFICIARI_DEF.jpg" id="benef" alt="Loghi enti beneficiari"></p> <p><img src="img/loghi_ispc_potlach.png" class="logos" alt="Loghi ISPC Potlach"></p>
<p><img src="img/FESR_BARRA_BENEFICIARI_DEF.jpg" class="logos" alt="Loghi enti beneficiari"></p>
</footer> </footer>
</body> </body>
<!-- MOOOVE AWAAAAAYY --> <!-- MOOOVE AWAAAAAYY -->
@ -41,16 +42,16 @@
Array.from(navlinks).forEach(element => { Array.from(navlinks).forEach(element => {
let ref = element.href.substr(element.href.lastIndexOf('/'), element.href.length); let ref = element.href.substr(element.href.lastIndexOf('/'), element.href.length);
if (window.location.href.includes(ref)) {
if (window.location.href.includes(ref) || element.href === 'index.html') {
element.setAttribute('class', 'active'); element.setAttribute('class', 'active');
} }
/** /**
* @todo Take / location into account for Home! let homeRE = new RegExp(/https?:\S+\/$/);
*/ if (homeRE.test(window.location.href)) {
let homeRE = new RegExp(/https?:\S+\/$/); navlinks[0].setAttribute('class', 'active');
if (homeRE.test(window.location.href)) { }
navlinks[0].setAttribute('class', 'active'); */
}
}); });
}); });