<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
  <a class="navbar-brand" href="{{ url_for('home.index') }}">
    <img src="{{ url_for('static', filename='img/cve.png') }}" style="max-width:180px; margin-top: -7px;" alt="" loading="lazy">
    <span class="version">v{{ get_version() }}</span>
  </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">
    <div class="navbar-nav mr-auto">
      <a class="nav-item nav-link" href="{{ url_for('home.index') }}">Recent</a>
      <a class="nav-item nav-link" href="{{ url_for('home.browse_vendor') }}">Browse per vendor</a>
      <a class="nav-item nav-link" href="{{ url_for('home.get_cwe') }}">Browse CWEs </a>
      {% set schema = db_schema() %}
      {% if schema != true %}
      <a class="nav-item nav-link" href="#"><span class="badge badge-warning"> {{ schema }} </span></a>
      {% endif %}
    </div>
    <ul class="navbar-nav justify-content-end">
      <div class="navbar-nav mr-auto">
        <a class="nav-item nav-link" href="{{ url_for('api.doc') }}">Api docs </a>
        {% if minimal %}
        <a class="nav-item nav-link" href="https://www.circl.lu/services/cve-search/">About </a>
        {% else %}
        <a class="nav-item nav-link" href="{{ url_for('admin.admin_home') }}" title="Settings"><i class="fas fa-cogs"></i></a>
        {% if current_user.is_authenticated %}
        <a class="nav-item nav-link" href="{{ url_for('auth.logout') }}"><i class="fas fa-sign-out-alt"></i></a>
        {% endif %}
        {% endif %}
      </div>
      <form class="form-inline my-2 my-lg-0" id="tfnewsearch" method="get" onsubmit="search_redirect(); return false;">
        <input class="form-control mr-sm-2" id="search" type="search" placeholder="Search CVEs" title="Full number search (e.g CVE-2020-12254), vendor/product search & freetext search." aria-label="Search" value="{{freetextsearch}}" minlength="4">
        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
      </form>
    </ul>
  </div>
</nav>
