{% load static from staticfiles %}

<!doctype html>
<html lang="en">
    <head>
        <title>{{ page_title }}</title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="description" content="{{ page_description }}">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        {% block polyfill_js %}
        <script async src="//static.dpaw.wa.gov.au/static/libs/modernizr/2.8.3/modernizr.min.js"></script>
        {% endblock %}
        <!-- CSS styling blocks -->
        {% block base_style %}
        <link rel="stylesheet" type="text/css" href="//static.dpaw.wa.gov.au/static/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
        <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700">
        {% endblock %}
        {% block extra_style %}
        <link rel="stylesheet" href="{% static 'css/dpaw-custom.css' %}">
        {% endblock %}
        {% block favicon %}
        <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
        {% endblock %}
        {% block extra_head %}{% endblock %}
    </head>
    <body>
        <!--[if lte IE 8]>
        <p class="browserupgrade">You are using an <strong>outdated</strong> browser.
        Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->

        {% block top_navbar %}
        <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    {% block navbar_logo %}
                    <img class="navbar-brand hidden-xs" src="{% static 'img/dpaw_logo_small.png' %}">
                    {% endblock %}
                    {% block navbar_site_title %}
                    <a class="navbar-brand" href="/">{{ site_title }}</a>
                    {% endblock %}
                    {% block navbar_button %}
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    {% endblock %}
                </div><!-- /.navbar-header -->

                <!-- Collect the nav links for toggling -->
                <div class="collapse navbar-collapse navbar-right" id="header-navbar-collapse">
                    <ul class="nav navbar-nav">
                        <!-- Collect the nav links for toggling -->
                        {% block navbar_links %}
                        <li class="active"><a href="#">Link 1</a></li>
                        <li><a href="#">Link 2</a></li>
                        <li><a href="#">Link 3</a></li>
                        {% block navbar_auth %}
                        {% if user.is_authenticated %}
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.username }} <span class="caret"></span></a>
                            <ul class="dropdown-menu" role="menu">
                                <li><a id="id_a_logout" href="{% url 'logout' %}">Log out</a></li>
                            </ul>
                        </li>
                        {% else %}
                        <li><a id="id_a_login" href="{% url 'login' %}">Log in</a></li>
                        {% endif %}
                        {% endblock %}<!-- /navbar_auth -->
                        {% endblock %}<!-- /navbar_links -->
                    </ul>
                </div><!-- /.navbar-collapse -->
            </div><!-- /.container-fluid -->
        </nav>
        {% endblock %}<!-- /top_navbar -->

        {% block page_content %}{% endblock %}

        {% block page_footer %}{% endblock %}

        <!-- JavaScript blocks -->
        {% block base_js %}
        <script src="//static.dpaw.wa.gov.au/static/libs/jquery/3.1.1/jquery.min.js"></script>
        <script src="//static.dpaw.wa.gov.au/static/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
        {% endblock %}
        {% block extra_js %}{% endblock %}
    </body>
</html>
