<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <a href="{{ site.swc_site }}" class="pull-left">
        <img class="navbar-logo"
             {% if site.carpentry == "swc" %}src="{{ site.root }}/assets/img/swc-icon-blue.svg" alt="Software Carpentry logo"{% endif %}
             {% if site.carpentry == "dc" %}src="{{ site.root }}/assets/img/dc-icon-black.svg" alt="Data Carpentry logo"{% endif %}
        />
      </a>
      <a class="navbar-brand" href="{{ site.root }}/">Home</a>
    </div>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="{{ site.root }}/conduct/">Code of Conduct</a></li>
        {% if site.kind == "lesson" %}
        <li><a href="{{ site.root }}/setup/">Setup</a></li>
        <li class="dropdown">
          <a href="{{ site.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
          <ul class="dropdown-menu">
            {% for episode in site.episodes %}
            <li><a href="{{ site.root }}{{ episode.url }}">{{ episode.title }}</a></li>
            {% endfor %}
          </ul>
        </li>
        <li class="dropdown">
          <a href="{{ site.root }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Extras <span class="caret"></span></a>
          <ul class="dropdown-menu">
            {% for extra in site.extras %}
            <li><a href="{{ site.root }}{{ extra.url }}">{{ extra.title }}</a></li>
            {% endfor %}
          </ul>
        </li>
        {% endif %}
        <li><a href="{{ site.root }}/reference/">Reference</a></li>
        <li><a href="{{ site.root }}/license/">License</a></li>
      </ul>
      <form class="navbar-form navbar-right" role="search" id="search" onsubmit="google_search(); return false;">
        <div class="form-group">
          <input type="text" id="google-search" placeholder="Search...">
        </div>
      </form>
    </div>
  </div>
</nav>
