<div class="navbar-header">
  <button type="button"
          class="navbar-toggle"
          data-toggle="collapse"
          data-target=".navbar-collapse">
    <span class="sr-only">ナビゲーションをトグル</span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
    <span class="icon-bar"></span>
  </button>
  <a class="navbar-brand" href="{{ site.baseurl }}/ja/">
    Groonga-HTTP
  </a>
</div>
<div class="collapse navbar-collapse">
  <ul class="nav navbar-nav navbar-left">
    <li><a href="{{ site.baseurl }}/ja/news/">おしらせ</a></li>
    <li class="dropdown">
      <a class="dropdown-toggle"
         data-toggle="dropdown"
         role="button"
         aria-haspopup="true"
         aria-expanded="false">
        ドキュメント <span class="caret"></span>
      </a>
      <ul class="dropdown-menu">
        <li><a href="{{ site.baseurl }}/ja/install/">インストール</a></li>
        <li><a href="{{ site.baseurl }}/ja/tutorial/">チュートリアル</a></li>
        <li><a href="{{ site.baseurl }}/ja/reference/">リファレンスマニュアル</a></li>
      </ul>
    </li>
  </ul>
  <ul class="nav navbar-nav navbar-right">
    <li><a href="{{ site.baseurl }}/{{ relative_path }}">English</a></li>
    {% if page.upper_level != null %}
      <li><a href="{{ page.upper_level }}"><i class="fa fa-arrow-circle-up"></i> 1階層上へ</a></li>
    {% elsif relative_path != "" %}
      {% capture last_component %}{{ page.url | split:"/" | last }}{% endcapture %}
      {% if last_component == "index.html" %}
        {% assign upper_level = "../" %}
      {% else %}
        {% assign upper_level = "./" %}
      {% endif %}
      <li><a href="{{ upper_level }}"><i class="fa fa-arrow-circle-up"></i> 1階層上へ</a></li>
    {% endif %}
    <li>
      <a href="https://github.com/groonga/Groonga-HTTP"><i class="fa fa-github"></i> GitHub</a>
    </li>
  </ul>
</div>
