<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>{% block title %}{{page_title}}{% endblock %}</title>

  {% block stylesheet %}
    {% for css_file in css_files %}
      <link href="{{ css_file }}" rel="stylesheet">
    {% endfor %}
  {% endblock %}

  <script id="jupyter-config-data" type="application/json">{
    {% for key, value in page_config.items() -%}
    "{{ key }}": "{{ value }}",
    {% endfor -%}
    "baseUrl": "{{ base_url }}",
    "wsUrl": "{{ ws_url }}",
    "publicUrl": "{{ public_url }}"
  }</script>

  {% block favicon %}
  {% endblock %}

  {% for js_file in js_files %}
  <script src="{{ js_file }}" type="text/javascript" charset="utf-8"></script>
  {% endfor %}

  {% block meta %}
  {% endblock %}

</head>

<body>

  <script type="text/javascript">
    // Remove token from URL.
    (function () {
      var parsedUrl = new URL(window.location.href);
      if (parsedUrl.searchParams.get('token')) {
        parsedUrl.searchParams.delete('token');
        window.history.replaceState({ }, '', parsedUrl.href);
      }
    })();
  </script>

</body>

</html>
