From 24410ce6bef0f3567ef49d0136c6d81f594f4a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20P?= Date: Fri, 30 Jul 2021 13:23:02 +0200 Subject: [PATCH] Add logos in footer; test for active link... --- css/main.css | 2 +- index.html | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/css/main.css b/css/main.css index 761ec83..5494d94 100644 --- a/css/main.css +++ b/css/main.css @@ -114,6 +114,6 @@ footer p { font-size: 0.7rem; margin-top: 1rem; } -#benef { +.logos { max-height: 70px; } \ No newline at end of file diff --git a/index.html b/index.html index 51e8549..dd8f4d5 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,8 @@
@@ -41,16 +42,16 @@ Array.from(navlinks).forEach(element => { 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'); } /** - * @todo Take / location into account for Home! - */ - let homeRE = new RegExp(/https?:\S+\/$/); - if (homeRE.test(window.location.href)) { - navlinks[0].setAttribute('class', 'active'); - } + let homeRE = new RegExp(/https?:\S+\/$/); + if (homeRE.test(window.location.href)) { + navlinks[0].setAttribute('class', 'active'); + } + */ }); });