<!DOCTYPE html>
<head>
  <title>{% if page_title %}{{ page_title }} - {% endif %}{{ site_name }}</title>

  <!--
    Support custom favicon support.
    http://www.mkdocs.org/user-guide/configuration/#site_favicon
  -->
  {% if favicon %}
    <link rel="shortcut icon" href="{{ favicon }}">
  {% else %}
    <link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">
  {% endif %}

  <!--
    You can include external assets of course, but be aware that it means the
    documentation may not work well offline.
  -->
  <link rel="stylesheet" type="text/css" href="https://gov-au-ui-kit.apps.staging.digital.gov.au/latest/ui-kit.min.css"/>
  <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application.css">
  <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/highlight.css">
  <!--
    extra_css contains paths to CSS files in the users
    documentation directory or a list of CSS files defined in
    their mkdocs.yml.

    http://www.mkdocs.org/user-guide/configuration/#extra_css
  -->
  {% for path in extra_css %}
    <link href="{{ path }}" rel="stylesheet">
  {% endfor %}

  <!--
    To include static assets from our theme, just add
    {{ base_url }} beforehand which will be the relative path to
    the root of the documentation.
  -->
  <script type="text/javascript" src="https://gov-au-ui-kit.apps.staging.digital.gov.au/latest/ui-kit.min.js"></script>
  <script src="{{ base_url }}/assets/js/highlight.pack.js"></script>
  <script>hljs.initHighlightingOnLoad();</script>
  <!--
    extra_javascript contains paths to JavaScript files in the
    users documentation directory or a list of JavaScript files
    defined in their mkdocs.yml.

    http://www.mkdocs.org/user-guide/configuration/#extra_javascript
  -->
  {% for path in extra_javascript %}
    <script src="{{ path }}"></script>
  {% endfor %}

  {% if google_analytics %}
  <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
      ga('create', '{{ google_analytics[0] }}', '{{ google_analytics[1] }}');
      ga('send', 'pageview');
  </script>
  {% endif %}

  {% block extrahead %}
  {% endblock %}

</head>

<body>

  <nav class="skip-to">
  <a href="#content">Skip to main content</a>
  <a href="#nav">Skip to section navigation</a>
  </nav>

  <header role="banner">
    <section class="govau--header">
      <div class="wrapper">
        <div class="govau--logo">
          <a href="/" class="logo">{{ site_name }}</a>{% if config.extra.badge %} <span class="badge--default">{{config.extra.badge}}</span>{% endif%}
        </div>
        {% if config.extra.feedback_link %}
        {% for feedback in config.extra.feedback_link %}
        <div class="feedback">
          <a href="{{ feedback.url }}" class="button--feedback" role="button">{{feedback.title}}</a>
        </div>
        {% endfor %}
        {% endif %}
      </div>
    </section>

    {% if config.extra.search %}
    <section role="search" class="search-section">
      <div class="wrapper">
        <form action="{{ base_url }}/search.html" method="get">
          <input type="text" name="q" placeholder="Search {{ site_name }}" />
        </form>
      </div>
    </section>
    {% endif %}

  </header>
  <main role="main">
    <aside id="nav" class="sidebar">
      <nav class="local-nav" aria-label="main navigation">
        <ul>
        {% for nav_item in nav %}
          {% include "nav.html" %}
        {% endfor %}
        </ul>
      </nav>
    </aside>

    <article id="content" class="content-main">

      {% if current_page %}
        {% if current_page.is_homepage %}
          <h1>{{ site_name }}</h1>
        {% else %}
          <h1>{{ page_title }}</h1>
        {% endif %}
      {% endif %}

      {% if toc %}
      <nav class="index-links">
      <h2>In this section</h2>
        <ul>
        {% for toc_item in toc %}
            <li><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
            {% for toc_item in toc_item.children %}
                <li><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
            {% endfor %}
        {% endfor %}
        </ul>
      </nav>
      {% endif %}

      {% block content %}
        {{ content }}
      {% endblock %}

      {% if repo_url and current_page %}
        <a rel="external" href="{{ repo_url }}/tree/master/docs{{ current_page.abs_url.rstrip('index.html').rstrip('/') }}.md">Edit this page on GitHub</a>
      {% endif %}
    </article>

  </main>

  <footer role="contentinfo">
    <div class="wrapper">
      <section>
        <div class="footer-logo">
          <img src="{{ base_url }}/assets/images/coat-of-arms.png" alt="Australian Government Coat of Arms">
        </div>
        <div class="footer-links">
          <nav>
            {% if config.extra.footer_links %}
              <ul>
              {% for footer_link in config.extra.footer_links %}
                <li><a {% if footer_link.external == 'true' %}rel="external"{% endif %}href="{{ footer_link.url }}">{{ footer_link.title }}</a></li>
              {% endfor %}
              </ul>
            {% endif %}
          </nav>
          <p>&copy; Commonwealth of Australia
        </div>
      </section>
    </div>
  </footer>

</body>
</html>
