{% load staticfiles %}

<header class="container">
  <ul class="nav nav-pills red-border">
    <li>
        <img height='38px' src="{% static "calaccess_campaign_browser/images/bear-no-red-line.png" %}" alt="">
    </li>
    <li><a href="{% url 'latest_list' %}"><i class="fa fa-newspaper-o"></i> Latest</a></li>
    <li><a href="{% url 'filer_list' %}"><i class="fa fa-user"></i> Filers</a></li>
    <li><a href="{% url 'search' %}"><i class="fa fa-search"></i> Search</a></li>
    <li>
        <a href="https://github.com/california-civic-data-coalition/django-calaccess-campaign-browser"
            target="_blank"><i class="fa fa-github"></i> Github</a>
    </li>
  </ul>
</header>

<script type="text/javascript">
    var url = window.location;
    // Will only work if string in href matches with location
    $('ul.nav a[href="' + url + '"]').parent().addClass('active');
    // Will also work for relative and absolute hrefs
    $('ul.nav a').filter(function() {
        return this.href == url;
    }).parent().addClass('active');
</script>
