You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.9 KiB

  1. <div ng-controller="NavbarCtrl">
  2. <nav class="navbar navbar-expand-lg navbar-light bg-light">
  3. <a class="navbar-brand" href="#">
  4. <i title="Server" class="fa fa-cube fa-1x"></i> decentralized-blogging-platform
  5. </a>
  6. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  7. <span class="navbar-toggler-icon"></span>
  8. </button>
  9. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  10. <ul class="navbar-nav mr-auto">
  11. <li class="nav-item active">
  12. <a class="nav-link" href="#">Top Posts <span class="sr-only">(current)</span></a>
  13. </li>
  14. <li class="nav-item">
  15. <a class="nav-link" href="#">Top Writters</a>
  16. </li>
  17. </ul>
  18. <form class="form-inline my-2 my-lg-0">
  19. <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
  20. <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
  21. </form>
  22. <ul class="navbar-nav" ng-show="user">
  23. <li class="nav-item">
  24. <a href="#!/profile" class="nav-link">
  25. <i title="Profile" class="fa fa-user fa-1x"></i> {{user.username}}
  26. </a>
  27. </li>
  28. <li class="nav-item">
  29. <a ng-click="logout()" class="nav-link">
  30. <i title="Logout" class="fa fa-power-off fa-1x"></i>
  31. </a>
  32. </li>
  33. </ul>
  34. <ul class="navbar-nav" ng-show="!user">
  35. <li class="nav-item">
  36. <a href="#!/signup" class="nav-link">
  37. <i title="Signup" class="fa fa-sign-in fa-1x"></i> Signup
  38. </a>
  39. </li>
  40. <li class="nav-item">
  41. <a href="#!/login" class="nav-link">
  42. <i title="Login" class="fa fa-sign-in fa-1x"></i> Login
  43. </a>
  44. </li>
  45. </ul>
  46. </div>
  47. </nav>
  48. </div>