doctype
html(lang="en")
	head
		meta(charset="utf-8")
		title {% if self.page_title() %}{% block page_title %}{% endblock %} — {% endif %}Pillar
		meta(name="viewport", content="width=device-width, initial-scale=1.0")
		meta(name="description", content="")
		meta(name="author", content="")
		meta(name="theme-color", content="#3e92aa")

		| {% if config['GOOGLE_SITE_VERIFICATION'] %}
		meta(name="google-site-verification" content="{{ config['GOOGLE_SITE_VERIFICATION'] }}")
		| {% endif %}

		meta(property="og:site_name", content="")
		meta(property="og:locale", content="en_US")
		meta(name="twitter:card", content="summary_large_image")
		meta(name="twitter:site", content="")

		| {% block og %}
		meta(property="og:title", content="")
		meta(property="og:url", content="")
		meta(property="og:type", content="")
		meta(property="og:image", content="")
		meta(property="og:description", content="")

		meta(name="twitter:title", content="")
		meta(name="twitter:description", content="")
		meta(name="twitter:image", content="")
		| {% endblock %}

		script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery-3.1.0.min.js')}}")
		script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.typeahead-0.11.1.min.js')}}")
		script(src="{{ url_for('static_pillar', filename='assets/js/vendor/algoliasearch-3.19.0.min.js')}}")
		script(src="{{ url_for('static_pillar', filename='assets/js/vendor/js.cookie-2.0.3.min.js')}}")

		script.
			var algolia = algoliasearch("{{config['ALGOLIA_USER']}}", "{{config['ALGOLIA_PUBLIC_KEY']}}");
			var algoliaIndex = algolia.initIndex("{{config['ALGOLIA_INDEX_NODES']}}");

			!function(e){"use strict";e.loadCSS=function(t,n,o){var r,i=e.document,l=i.createElement("link");if(n)r=n;else{var d=(i.body||i.getElementsByTagName("head")[0]).childNodes;r=d[d.length-1]}var a=i.styleSheets;l.rel="stylesheet",l.href=t,l.media="only x",r.parentNode.insertBefore(l,n?r:r.nextSibling);var f=function(e){for(var t=l.href,n=a.length;n--;)if(a[n].href===t)return e();setTimeout(function(){f(e)})};return l.onloadcssdefined=f,f(function(){l.media=o||"all"}),l},"undefined"!=typeof module&&(module.exports=e.loadCSS)}(this);

			loadCSS( "//fonts.googleapis.com/css?family=Roboto:300,400" );

		script(src="{{ url_for('static_pillar', filename='assets/js/markdown.min.js', v=17320171) }}")
		script(src="{{ url_for('static_pillar', filename='assets/js/tutti.min.js', v=17320171) }}")

		link(href="{{ url_for('static', filename='assets/img/favicon.png') }}", rel="shortcut icon")
		link(href="{{ url_for('static', filename='assets/img/apple-touch-icon-precomposed.png') }}", rel="icon apple-touch-icon-precomposed", sizes="192x192")

		link(href="{{ url_for('static_pillar', filename='assets/css/vendor/bootstrap.min.css') }}", rel="stylesheet")

		| {% block head %}{% endblock %}

		| {% block css %}
		link(href="{{ url_for('static_pillar', filename='assets/css/font-pillar.css', v=17320171) }}", rel="stylesheet")
		link(href="{{ url_for('static_pillar', filename='assets/css/base.css', v=17320171) }}", rel="stylesheet")
		| {% if title == 'blog' %}
		link(href="{{ url_for('static_pillar', filename='assets/css/blog.css', v=17320171) }}", rel="stylesheet")
		| {% else %}
		link(href="{{ url_for('static_pillar', filename='assets/css/main.css', v=17320171) }}", rel="stylesheet")
		| {% endif %}
		| {% endblock %}


		| {% if not title %}{% set title="default" %}{% endif %}

	body(class="{{ title }}")
		.container-page
			.page-content
				.page-body
					| {% block body %}{% endblock %}

		| {% block footer_container %}
		#footer-container
			| {% block footer_navigation %}
			#footer-navigation
			| {% endblock footer_navigation %}

			| {% block footer %}
			footer.container
				#hop(title="Be awesome in space")
					i.pi-angle-up
			| {% endblock footer %}
		| {% endblock footer_container%}

		script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.bootstrap-3.3.7.min.js', v=17320171) }}")


		| {% block footer_scripts_pre %}{% endblock %}
		| {% block footer_scripts %}{% endblock %}



		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_TRACKING_ID }} ', 'auto', {'allowAnchor': true});
			ga('send', 'pageview');
