durfdoen-2.0/layouts/partials/navbar.erb
2020-09-09 21:54:22 +02:00

22 lines
620 B
Text

<nav>
<img src="/assets/OmdatHetDurfDoenLogoSuckt.png" alt="" class="logo">
<ul>
<% for i in navigables %>
<li><%= link_to(i[:naam], i, class: "nav_link") %></li>
<% end %>
<script>
const nav_links = document.querySelectorAll(".nav_link");
nav_links.forEach(nav_link => {
if (nav_link.getAttribute("href") === window.location.pathname) {
nav_link.classList.add("active_link");
}
})
</script>
</ul>
<div>
<form action="/search.html">
<input type="search" name="q" placeholder="Zoek vereniging, convent …">
</form>
</div>
</nav>