<!DOCTYPE html>
<html lang="en">
	<head>
		{% set base_url = base_url or "." %}
		{% set is_home = page.url|url == (config.theme.home or "home")|url %}

		{%- block site_meta %}
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		{% if is_top %}<meta name="description" content="{{ config.site_description }}">{% endif %}
		{% if config.site_author %}<meta name="author" content="{{ config.site_author }}">{% endif %}
		{% if page and page.canonical_url %}<link rel="canonical" href="{{ page.canonical_url }}">{% endif %}
		{% if config.site_favicon %}<link rel="shortcut icon" href="{{ base_url }}/{{ config.site_favicon }}">
		{% else %}<link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">{% endif %}
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		{%- endblock %}

		{%- block htmltitle %}
		<title>{% if page and page.title and not is_top %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>
		{%- endblock %}

		{%- block styles %}
		<link href="{{ base_url }}/css/bootstrap-4.4.1.min.css" rel="stylesheet">
		<link href="{{ base_url }}/css/font-awesome-4.7.0.css" rel="stylesheet">
		<link href="{{ base_url }}/css/base.css" rel="stylesheet">
		<link rel="stylesheet" href="{{ base_url }}/css/highlight-github.css">
		{%- for path in extra_css %}
		<link href="{{ path }}" rel="stylesheet">
		{%- endfor %}
		{%- endblock %}

		{%- block libs %}
		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
			<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
		<![endif]-->

		<script src="{{ base_url }}/js/jquery-3.5.1.min.js"></script>
		<script src="{{ base_url }}/js/bootstrap-4.4.1.min.js"></script>
		<script src="{{ base_url }}/js/highlight.pack.js"></script>
		{% if is_top %}
		<script src="{{ base_url }}/js/elasticlunr.min.js"></script>
		{% endif %}
		<base target="_top" />
		{%- endblock %}

		{%- block scripts %}
		<script>
			var base_url = '{{ base_url }}';
			var home_url = '{{ base_url }}/{{ config.theme.home or "home" }}';
			var is_outer_page = {{ 'true' if is_top else 'false' }};
			{%- if page %}
			{# Include the first two levels of TOC data as a JS object, to be rendered in top frame #}
			var pageToc = [
				{%- for item in page.toc %}
				{title: {{ item.title|tojson }}, url: {{ ('#_top' if loop.first else item.url)|tojson }}, children: [
					{%- for item in item.children %}
					{title: {{ item.title|tojson }}, url: {{ item.url|tojson }} },
					{%- endfor %}
				]},
				{%- endfor %}
			];
			{%- else %}
			var page_toc = null;
			{%- endif %}

		</script>
		<script src="{{ base_url }}/js/base.js"></script>
		{%- for path in extra_javascript %}
		<script src="{{ path }}"></script>
		{%- endfor %}
		{%- endblock %}

		{%- block analytics %}
		{%- if config.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', '{{ config.google_analytics[0] }}', '{{ config.google_analytics[1] }}');
ga('send', 'pageview');
		</script>
		{%- endif %}
		{%- endblock %}

		{%- block extrahead %} {% endblock %}
	</head>

	<body class="{{ 'outer-page' if is_top else 'inner-page' }}">
		{#
		# Code for the top frame. It should ideally be separate from the index page (which is likely
		# possible once theme_config is released with mkdocs 1.0).
		#}
		{%- if is_top -%}
		{% include 'topbar.html' %}

		<div id="main-content" class="wm-page-top-frame">
			{% include 'nav-pane.html' %}
			<div class="wm-content-pane">
				<iframe class="wm-article" name="article" src="{{ base_url }}/{{ config.theme.home or "home" }}" title="Page content"></iframe>
			</div>
		</div>

		{%- else -%}

		{# Code for the main template for all content pages. #}

		<div class="container-fluid wm-page-content">
			<a name="_top" aria-hidden="true"></a>
			{%- if config.extra.article_nav_top != False %}
			{% include "article-nav.html" %}
			{%- endif %}

			{%- block content %}
			{% if page and page.meta.source %}
			<div class="source-links">
				{% for filename in page.meta.source %}
				<span class="label label-primary">{{ filename }}</span>
				{% endfor %}
			</div>
			{% endif %}

			{{ page.content }}
			{%- endblock %}

			<br>
			{%- if config.extra.article_nav_bottom != False %}
			{% include "article-nav.html" %}
			<br>
			{%- endif %}
		</div>

		<footer class="container-fluid wm-page-content text-center small">
			{%- block footer %}
			{%- block repo %}
			{%- if page and page.edit_url %}
			<p>
			<a href="{{ page.edit_url }}">{% include 'repo-icon.html' %}Edit on {{ config.repo_name }}</a>
			</p>
			{%- elif config.repo_url %}
			<p>
			<a href="{{ config.repo_url }}">{% include 'repo-icon.html' %}{{ config.repo_name }}</a>
			</p>
			{%- endif %}
			{%- endblock %}

			{%- if config.copyright %}<p>{{ config.copyright }}</p>{%- endif %}
			<details>
				<summary>
					Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a> using  <a href="https://github.com/Siphalor/mkdocs-custommill">CustomMill</a>.
				</summary>
				<h6 class="mt-2">Additional License and Usage Information</h6>
				<ul>
					<li>
						CustomMill is based on the <a href="https://github.com/gristlabs/mkdocs-windmill">Windmill</a> theme by Grist Labs, licensed under the <a href="https://github.com/gristlabs/mkdocs-windmill/blob/master/LICENSE">MIT License</a>
					</li>
					<li>
						CustomMill includes <a href="https://getbootstrap.com">Bootstrap</a> version 4.4.1. This is available under the <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE">MIT License</a>.
					</li>
					<li>
						CustomMill includes <a href="https://jquery.org">jQuery</a> version 3.2.1. This is available under the <a href="https://jquery.org/license">MIT License</a>.
					</li>
					<li>
						Syntax highlighting is implemented via <a href="https://highlightjs.org">highlight.js</a> licensed under the BSD 3-Clause License and the included github styling made by Vasily Polovnyov.
					</li>
					<li>
						Icons on this site are from <a href="https://fontawesome.com/v4.7.0/">FontAwesome v4.7.0</a> which is licensed as <a href="http://scripts.sil.org/OFL">SIL OFL 1.1</a>.
					</li>
				</ul>
			</details>
			{%- endblock %}
		</footer>

		{% endif %}
	</body>
</html>
{%- if is_top %}
<!--
	MkDocs version : {{ mkdocs_version }}
	Build Date UTC : {{ build_date_utc }}
-->
{%- endif %}
