{% comment %}
Copyright (C) The Arvados Authors. All rights reserved.

SPDX-License-Identifier: CC-BY-SA-3.0
{% endcomment %}

<div class="navbar navbar-default navbar-fixed-top">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-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" href="{{ site.baseurl }}/">Arvados<sup>&trade;</sup> Docs</a>
    </div>
    <div class="collapse navbar-collapse" id="bs-navbar-collapse">
      <ul class="nav navbar-nav">
        <!--<li {% if page.navsection == 'start' %} class="active" {% endif %}><a href="{{ site.baseurl }}/start/index.html">Getting&nbsp;Started</a></li>-->
        <li {% if page.navsection == 'userguide' %} class="active" {% endif %}><a href="{{ site.baseurl }}/user/index.html">User&nbsp;Guide</a></li>
        <li {% if page.navsection == 'sdk' %} class="active" {% endif %}><a href="{{ site.baseurl }}/sdk/index.html">SDKs</a></li>
        <li {% if page.navsection == 'architecture' %} class="active" {% endif %}><a href="{{ site.baseurl }}/architecture/index.html">Architecture</a></li>
        <li {% if page.navsection == 'api' %} class="active" {% endif %}><a href="{{ site.baseurl }}/api/index.html">API</a></li>
        <li {% if page.navsection == 'admin' %} class="active" {% endif %}><a href="{{ site.baseurl }}/admin/index.html">Admin</a></li>
        <li {% if page.navsection == 'installguide' %} class="active" {% endif %}><a href="{{ site.baseurl }}/install/index.html">Install</a></li>
        <li><a href="#" class="dropdown-toggle" role="button" id="versionMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ site.current_version }}{% if site.all_versions != [] %}&nbsp;&#9662;{% endif %}</a>
          {% if site.all_versions != [] %}
            <div class="dropdown-menu" aria-labelledby="versionMenuLink">
            {% for version in site.all_versions %}
              &nbsp;<a href="/{{ version }}{{ page.url }}" class="dropdown-item">{{ version }}</a><br/>
            {% endfor %}
            </div>
          {% endif %}
        </li>
        <li><a href="https://arvados.org" style="padding-left: 2em">arvados.org&nbsp;&raquo;</a></li>
      </ul>

      <div class="pull-right" style="padding-top: 6px; padding-right: 25px">
        <form method="get" action="https://www.google.com/search">
          <div class="input-group" style="width: 220px">
            <input type="text" class="form-control" name="q" placeholder="search">
            <div class="input-group-addon">
              <button class="glyphicon glyphicon-search" style="border: 0px" type="submit"></button>
            </div>
            <input type="hidden" name="sitesearch" value="doc.arvados.org"/>
          </div>
        </form>
      </div>
    </div>

{% comment %}
The div with id "old-version-warning" is automatically enabled by the Apache
config under certain conditions, as described at
https://dev.arvados.org/projects/ops/wiki/Docarvadosorg.  Changing the class
should be safe, but please double check the matching and substitution that is
done in the Apache config to be sure before you modify this div.
{% endcomment %}
   <div class="alert alert-block alert-info" style="display: none;" id="old-version-warning">
     WARNING - you are viewing the documentation for an old version of Arvados. For the latest version, click <a href="/">here</a>.
   </div>
   <div class="alert alert-block alert-info" style="display: none;" id="annotate-notify">
     <div style="margin-top: -26px; font-size: 12pt">Hey!  You can use the annotation sidebar from <a href="https://hypothes.is">hypothes.is</a> to make public comments and private notes
       <span style="font-size: 32pt">&rarr;</span></div>
      <button type="button" class="close" onclick="dismissAnnotateNotify()">Got it</button>
   </div>

   <script>
     function dismissAnnotateNotify() {
	 window.localStorage.setItem("dismiss-annotate-notify", "true");
         $('#annotate-notify').attr('style', "display: none;");
     }
     if (window.localStorage.getItem("dismiss-annotate-notify") === "true") {
	 dismissAnnotateNotify();
     } else {
         $('#annotate-notify').attr('style', "display: inline-block;");
     }
   </script>

  </div>
</div>