<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <a class="navbar-brand" href="{{ url_for('eingang.root') }}">{{ config['NAME'] }}</a>
      {% if current_user.is_authenticated %}
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      {% endif %}
    </div>
    {% if current_user.is_authenticated %}
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
            <div class="username">
              {{ current_user.username }} <span class="caret"></span>
            </div>
          </a>
          <ul class="dropdown-menu">
            <li><a href="#">Settings</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="{{ url_for('security.logout') }}">Sign out</a></li>
          </ul>
        </li>
      </ul>
    </div>
    {% endif %}
  </div>
</nav>
