{% extends "page.html" %}

{% block title %}{{page_title}}{% endblock %}

{% block stylesheet %}
{{super()}}
{% endblock %}

{% block params %}

data-base-url="{{base_url | urlencode}}"
data-md-url="{{md_url | urlencode}}""

{% endblock %}

{% block headercontainer %}

<div class="pull-left rendermd-page-title-wrap">
	<span class="rendermd-page-title">{{ page_title }}</span>
</div>

{% endblock %}

{% block header %}

{% endblock %}

{% block site %}

{# the "rendered_html" class, will make everything look like notebook-formatted markdown cells. The custom css loaded by render.js is used to add backgrounds for <code> and <pre> blocks and snippets #}
<div id="render-container" class="container rendered_html"></div>

{% endblock %}

{% block script %}

	{{super()}}

	<script type="text/javascript" charset="utf-8">
		require(['jquery'], function (jq) {
			// hack to fix notebook 4.2.1
			// see https://github.com/jupyter/notebook/pull/1399
			if (jq === undefined) {
				require.undef('jquery');
				require.undef('jquery-ui');
				require.undef('jqueryui');
				require.undef('bootstrap');
			}
			require(["nbextensions/nbextensions_configurator/render/render"], function(rendermd_module) {
				rendermd_module.render_markdown_page();
			});
		});
	</script>

{% endblock %}
