navbar.ejs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <nav class="navbar navbar-expand-lg navbar-light bg-light">
  2. <a class="navbar-brand" href="/">
  3. <img class="invert" alt="James Peret" src="/images/jamesperet-logo-white.png">
  4. </a>
  5. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  6. <span class="navbar-toggler-icon"></span>
  7. </button>
  8. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  9. <ul class="navbar-nav mr-auto">
  10. <% if(is_current('/projects')) { %>
  11. <li class="nav-item active">
  12. <% } else { %>
  13. <li class="nav-item"></li>
  14. <% } %>
  15. <a class="nav-link" href="/projects">
  16. Projects
  17. <% if(is_current('/projects')) { %>
  18. <span class="sr-only">(current)</span>
  19. <% } %>
  20. </a>
  21. </li>
  22. <% if(is_current('/blog')) { %>
  23. <li class="nav-item active">
  24. <% } else { %>
  25. <li class="nav-item"></li>
  26. <% } %>
  27. <a class="nav-link" href="/blog" >
  28. Blog
  29. <% if(is_current('/blog')) { %>
  30. <span class="sr-only">(current)</span>
  31. <% } %>
  32. </a>
  33. </li>
  34. <% if(is_current('/about')) { %>
  35. <li class="nav-item active">
  36. <% } else { %>
  37. <li class="nav-item"></li>
  38. <% } %>
  39. <a class="nav-link" href="/about" >
  40. About
  41. <% if(is_current('/about')) { %>
  42. <span class="sr-only">(current)</span>
  43. <% } %>
  44. </a>
  45. </li>
  46. </ul>
  47. </div>
  48. </nav>