<div ng-controller="NavbarCtrl">
  <nav class="navbar navbar-expand-lg navbar-dark c_blueGrey700">
    <a class="navbar-brand" href="#">
      <i title="Server" class="fa fa-cube fa-1x"></i> decentralized-blogging-platform
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item active">
          <a class="nav-link" href="#">Top Posts <span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#!/users">Top Writters</a>
        </li>
        <form class="form-inline my-2 my-lg-0">
          <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
        </form>
      </ul>
      <ul class="navbar-nav" ng-show="user">
        <li class="nav-item">
          <a href="#!/write" class="nav-link">
            <i title="New article" class="fa fa-plus fa-1x"></i>
          </a>
        </li>
        <li class="nav-item">
          <a href="#!/user/{{user.id}}" class="nav-link">
            <i title="Profile" class="fa fa-user fa-1x"></i> {{user.username}}
          </a>
        </li>
        <li class="nav-item">
          <a ng-click="logout()" class="nav-link">
            <i title="Logout" class="fa fa-power-off fa-1x"></i>
          </a>
        </li>
      </ul>
      <ul class="navbar-nav" ng-show="!user">
        <li class="nav-item">
          <a href="#!/signup" class="nav-link">
            <i title="Signup" class="fa fa-user-plus fa-1x"></i> Signup
          </a>
        </li>
        <li class="nav-item">
          <a href="#!/login" class="nav-link">
            <i title="Login" class="fa fa-sign-in fa-1x"></i> Login
          </a>
        </li>
      </ul>
    </div>
  </nav>
</div>
