<nav
  class="navbar navbar-expand-lg navbar-dark bg-dark"
  ng-class="{'shadow': !generalMessage}"
>
  <a class="navbar-brand" href="/"> Anonymous GitHub </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 smooth-scroll">
      <li class="nav-item" ng-if="!user">
        <a class="nav-link" ng-class="{'active': path == '/'}" href="/">
          Home
        </a>
      </li>
      <li class="nav-item" ng-if="user">
        <a
          class="nav-link"
          ng-class="{'active': path == '/dashboard'}"
          href="/dashboard"
        >
          Repositories
        </a>
      </li>
      <li class="nav-item" ng-if="user">
        <a
          class="nav-link"
          ng-class="{'active':path == '/conferences'}"
          href="/conferences"
          >Conferences</a
        >
      </li>
      <li class="nav-item" ng-if="user">
        <a
          class="nav-link"
          ng-class="{'active':path == '/anonymize'}"
          href="/anonymize"
          >Anonymize</a
        >
      </li>
    </ul>
    <ul class="navbar-nav">
      <li class="nav-item">
        <a
          class="nav-link nav-icon"
          target="_blank"
          href="https://github.com/tdurieux/anonymous_github/"
          data-offset="30"
          ><i class="fab fa-github" aria-hidden="true"></i
        ></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" ng-class="{'active':path == '/faq'}" href="/faq"
          >FAQ</a
        >
      </li>
      <li class="nav-item">
        <a
          class="nav-link"
          target="_blank"
          href="https://github.com/tdurieux/anonymous_github/issues/new"
          data-offset="30"
          >Report an issue
        </a>
      </li>

      <li class="nav-item" ng-if="!isDarkMode">
        <a class="nav-link" href="#" ng-click="darkMode(true);">Dark Mode</a>
      </li>

      <li class="nav-item" ng-if="isDarkMode">
        <a class="nav-link" href="#" ng-click="darkMode(false);">Light Mode</a>
      </li>

      <li class="nav-item" ng-if="!user">
        <a class="nav-link" target="_self" href="/github/login" data-offset="30"
          >Login
        </a>
      </li>
      <li class="nav-item dropdown" ng-if="user">
        <a
          class="nav-link dropdown-toggle"
          href="#"
          id="navbarDropdownMenuLink"
          role="button"
          data-toggle="dropdown"
          aria-haspopup="true"
          aria-expanded="false"
        >
          <img
            src="{{user.photo}}"
            ng-if="user.photo"
            width="30"
            height="30"
            class="rounded-circle"
          />
          {{user.username}}
          <!-- <span ng-bind="user.username"></span> -->
        </a>
        <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
          <a class="dropdown-item" href="/profile">Default settings</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="/api/user/logout" target="__self"
            >Logout</a
          >
        </div>
      </li>
    </ul>
  </div>
</nav>
<div
  class="navbar shadow generalMessage"
  ng-bind-html="generalMessage"
  ng-if="generalMessage"
></div>
