<nav class="navbar navbar-default navbar-static-top MetaBrainz" role="navigation">
  <div class="container">

    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#mb-navbar-collapse">
        <span class="sr-only">{{ _('Toggle navigation') }}</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand logo" href="#">
        <img src="{{ url_for('oauth2.static', filename='img/navbar_logo.svg') }}" alt="MetaBrainz Foundation" />
      </a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="mb-navbar-collapse">
      <ul class="nav navbar-nav">
        <li><a href="{{ config['MUSICBRAINZ_SERVER'] }}">{{ _('Go to Home') }}</a></li>
      </ul>

      {# Not showing supporter stuff on error pages. If attempt to load supporter info fails there, page will not render. #}
      {% if not error %}
        <ul class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    {{ current_user.user_name }} <span class="caret"></span>
                </a>
                <ul class="dropdown-menu" role="menu">
                    <li><a href="{{ url_for('oauth2.index') }}">{{ _('OAuth applications') }}</a></li>
                </ul>
            </li>
        </ul>
      {%- endif -%}
    </div>

  </div>
</nav>
