<div class="navbar-wrapper">
  <div class="container-fuild">

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

        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <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-left" href="/"><img class="navbar-logo" src="/images/logo.png" alt="WONA Logo"></a>
        </div>

        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            {% for cat in site.data.categories %}
              {% if cat.subcategories != nil %}
              <li class = "dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ cat.name | uppercase }} <span class="caret"></span></a>
                <ul class="dropdown-menu">
                  {% for subcat in cat.subcategories %}
                   {% if site.categories[subcat] != nil %}
                    <li><a href="/category/{{ subcat }}/">{{ subcat | uppercase }}</a></li>
                    {% endif %}
                  {% endfor %}
                </ul>
              </li>
              {% elsif  site.categories[cat.name] != nil%}
              <li><a href="/category/{{ cat.name }}/">{{ cat.name | uppercase }}</a></li>
              {% endif %}
            {% endfor %}
          </ul>
        </div>
      </div>
    </nav>
  </div>
</div>

