<nav class="navbar navbar-fixed-top">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle btn-xs" data-toggle="collapse" data-target="#myNavbar">
        <i class="fa fa-bars fa-2x" aria-label="toggle menu"></i>
      </button>
      <a class="navbar-brand" href="/"><%= monitorName || 'PagerMon' %></a></a></a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
        <li><a href="/"><span class="fa fa-fw fa-home"></span> Home</a></li>
        <% if (login) { %>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="fa fa-fw fa-lock"></span> Admin <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="/admin/aliases"><span class="fa fa-fw fa-address-card"></span> Aliases</a></li>
            <li class="disabled" disabled><a href="#"><span class="fa fa-fw fa-inbox"></span> Messages</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="/admin/settings"><span class="fa fa-fw fa-cogs"></span> Settings</a></li>
            <li><a href="/admin/reset"><span class="fa fa-fw fa-key"></span> Reset Password</a></li>
          </ul>
        </li>
        <% } %>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <% if (login) { %>
        <li><a href="/logout"><span class="fa fa-fw fa-sign-out"></span> Sign Out</a></li>
        <% } else { %>
        <li><a href="/login"><span class="fa fa-fw fa-sign-in"></span> Sign In</a></li>
        <% } %>
      </ul>
    </div>
  </div>
  <div class="triangle-down triangle-right hidden-xs">
    <p>
      <i class="fa fa-chevron-down fa-2x isDown" id="toggle"></i>
    </p>
  </div>
</nav>

<script>
    $(function () {
        $("#home-body a:contains('Home')").parent().addClass('active');
        $("#admin-body a:contains('Admin')").parent().addClass('active');
     });
</script>

<script>
$("#toggle").click( function(event){
    event.preventDefault();
    if ($(this).hasClass("isDown") ) {
        $( ".navbar-fixed-top" ).animate({ "margin-top": "-64px" }, "fast" );  
        $( "#content" ).animate({ "margin-top": "-64px" }, "fast" );
        $(this).removeClass("isDown");
    } else {
        $( ".navbar-fixed-top" ).animate({ "margin-top": "0px" }, "fast" );
        $( "#content" ).animate({ "margin-top": "0px" }, "fast" );
        $(this).addClass("isDown");
    }
    return false;
});
</script>

<div id="wrap">
