diff --git a/Rules b/Rules index 146f9c0..c9cfd14 100644 --- a/Rules +++ b/Rules @@ -55,7 +55,7 @@ compile '/quiz.md' do layout '/quiz.*' layout '/default.*' layout '/base.*' - write ext: 'html' + write '/quiz/index.html' end compile '/search.html.erb' do diff --git a/layouts/homepage.erb b/layouts/homepage.erb index 891174d..82272a2 100644 --- a/layouts/homepage.erb +++ b/layouts/homepage.erb @@ -18,7 +18,7 @@ <div> <p>Durf Doen wil je helpen de vereniging te vinden waar jij je thuis zal voelen.</p> <div class="quizSpotlight"> - <a href="quiz.html">Doe de test</a> + <a href="/quiz/">Doe de test</a> </div> </div> </div> @@ -39,7 +39,7 @@ <div class="randomVerenigingWrapper"> <a href="https://zeus.ugent.be"> <section class="randomVereniging"> - <div class="randomVereniging_imageWrapper"><img loading=lazy src="https://zinc.zeus.gent" alt="logo van zeus %>" height="100"></div> + <div class="randomVereniging_imageWrapper"><img loading=lazy src="https://zinc.zeus.gent" alt="logo van Zeus WPI" height="100"></div> <hr class="randomVereniging_hr"> <h3>Zeus WPI</h3> <p>Speciaal voor mensen zonder JavaScript</p> diff --git a/layouts/partials/navbar.erb b/layouts/partials/navbar.erb index d2409d7..9a45c23 100644 --- a/layouts/partials/navbar.erb +++ b/layouts/partials/navbar.erb @@ -29,7 +29,11 @@ <script> const nav_links = document.querySelectorAll(".nav-link"); nav_links.forEach(nav_link => { - if (nav_link.getAttribute("href") === window.location.pathname) { + if (nav_link.getAttribute("href") === "/") { + if (window.location.pathname === "/") { + nav_link.classList.add("active_link"); + } + } else if (window.location.pathname.startsWith(nav_link.getAttribute("href"))) { nav_link.classList.add("active_link"); } })