<nav class="np-sub-navigation">
  <div class="np-sub-navigation-content">
    {% for link in navigations.sub_navigation %}
      {% if link.label == 'Home' %}
        <div class="np-sub-navigation-content-item {{ link.active_class }}">
          <div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
          <a class="np-sub-navigation-content-item-link" href="https://mizunogolf.com" target="_blank">
            MizunoGolf.com
          </a>
        </div>
      {% else %}
        <div class="np-sub-navigation-content-item {{ link.active_class }}">
          <div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
          <a class="np-sub-navigation-content-item-link" href="{{ link.url }}">
            {{ link.label }}
          </a>
        </div>
      {% endif %}
    {% endfor %}
    <div id="resources-sub-navigation-item" class="np-sub-navigation-content-item">
      <div class="np-sub-navigation-content-item-bar np-button-background-color"></div>
      <a class="np-sub-navigation-content-item-link" href="/app/courses/a1d8ad77-5448-46af-86aa-71f7fe9dfc60">
        Resources
      </a>
    </div>
  </div>
</nav>

<script>
  if(window.location.href.indexOf('/app/resources') > -1){
    document.querySelector('#resources-sub-navigation-item').classList.add('np-sub-navigation-content-item-active')
  } else {
    document.querySelector('#resources-sub-navigation-item').classList.remove('np-sub-navigation-content-item-active')
  }
</script>