This commit is contained in:
Midgard 2020-09-15 21:41:04 +02:00 committed by ajuvercr
parent c6b32af484
commit ea019a5c4e
3 changed files with 8 additions and 4 deletions

2
Rules
View file

@ -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

View file

@ -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>

View file

@ -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");
}
})