<!DOCTYPE html>
<html lang="en">
    <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Geluksproject</title>
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
    <link
      rel="stylesheet"
      href="https://bootswatch.com/4/journal/bootstrap.min.css"
    />    <link rel="stylesheet" href="/css/style.css">
    </head>
    <body>
      <nav
      class="navbar navbar-light"
      id="normal-nav"
      >
      <a class="navbar-brand ms-3" id="brand-name" href="/">Geluksproject</a>
      <div id="right-nav">
          <!-- <a class="nav-link" id="normal-nav-button" href="/about">Over ons</a> -->
          <a class="nav-link" id="normal-nav-button" href="/forum/1">Forum</a>
          <a class="nav-link" id="normal-nav-button" href="#">Lessen</a>
<% if(typeof user != 'undefined') { %>
        <li class="nav-item dropdown" style="list-style-type: none;">
          <a class="btn dropdown-toggle"
          id="nav-dropdown" 
          href="#" id="navbarDropdownMenuLink" 
          data-toggle="dropdown"
          aria-haspopup="true" 
          aria-expanded="false">
            <%= user.username %> 
          </a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
            <a class="dropdown-item" href="/users/profile/<%= user.id %>">Profiel</a>
            <a class="dropdown-item" href="/users/favorites">Favorieten</a>
            <a class="dropdown-item" href="/users/logout">Uitloggen</a>
          </div>
        </li>
<% } else { %>
      <a class="nav-link" href="/users/register/" id="normal-nav-button">Aanmelden</a>
      <a
        class="btn me-3"
        href="/users/login"
        id="nav-login"
        >Login</a
      >
<% }; %>
</div>
</nav>
  <%- body %>
  <footer class="text-center text-lg-start bg-light text-muted mt-5">
    </section>
    <div
      class="text-center p-4"
      style="background-color: rgba(0, 0, 0, 0.05)"
    >
      Â© 2021 Copyright:
      Geluksproject
    </div>
  </footer>
  <script
  src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
  integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
  crossorigin="anonymous"
></script>
<script
  src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
  integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
  crossorigin="anonymous"
></script>
<script
  src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
  integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
  crossorigin="anonymous"
></script>
<% if (typeof pagenr != 'undefined') { %>
  <script>
    function myFunction(e) {
      e.preventDefault()
      var text = document.getElementById('keyword').value;
      if (e.which == 13) {
        window.location.replace(`/forum/1?${new URLSearchParams({keyword: text}).toString()}`);
      } else {
        document.getElementById('keyword').value = text + String.fromCharCode(e.which);
      }
    }
  </script>
<% } %>
  </body>
</html>