<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>{% block title %}{% endblock %}</title>
    <meta name="generator" content="https://github.com/openzim/openedx/"/>
    <meta name="author" content="kiwix team"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link href="{{ rooturl }}static/css/main.css" rel="stylesheet" type="text/css" />
    <link href="{{ rooturl }}static/css/font-awesome.css" rel="stylesheet" type="text/css" />
    <link href="{{ rooturl }}static/css/video-js.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="{{ rooturl }}static/jquery-2.1.4.min.js"></script>
    <script src="{{ rooturl }}static/video.js"></script>
    {% block addhead %}{% endblock %}
    <script type="text/javascript" src="{{ rooturl }}static/mooc.js"></script>
    <script type="application/l10n">{% include "l10n_strings.json" %}</script>
    <script src="{{ rooturl }}static/l10n.js" type="text/javascript"></script>
    <link rel="icon" type="image/png" href="{{ rooturl }}/favicon.png">
  </head>
  <body class="{% block bodyclass %}{% endblock %}">
    <div class="topmobilebar">
      {% if side_menu or forum_menu %}
        <a onclick="{% if side_menu %}show_sidemenu(){% else %}show_forum_menu(){% endif %}" id="show_sidemenu">
          <i class="fa fa-bars"></i>
        </a>
      {% endif %}
      <a onclick="show_pagemobilemenu()" id="show_pagemobilemenu">
        <i class="fa fa-angle-down"></i>
      </a>
    </div>
  <div class="window-wrap">
    <div id="content" class="content-wrapper">
      <nav class="courseware wrapper-course-material" aria-label="Course Material">
        <div class="course-material">
          <ol class="course-tabs">
            {% for elem_name in mooc.top %}
                {% if (mooc.top[elem_name] != "/index.html" and mooc.top[elem_name] | clean_top in output_path) or (mooc.top[elem_name] == "/index.html" and render_homepage) %}
                  <li><a class="active" href="{{ rooturl }}{{ mooc.top[elem_name] }}">{{ elem_name }}</a></li>
                {% else %}
                  <li><a href="{{ rooturl }}{{ mooc.top[elem_name] }}">{{ elem_name }}</a></li>
                {% endif %}
            {% endfor %}
          </ol>
        </div>
      </nav>
        {% block body %}{% endblock %}
   </div>
    </div>
{#
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
          tex2jax: {
            inlineMath: [ ['$','$'], ["\\(","\\)"]],
            displayMath: [ ['$$','$$'], ["\\[","\\]"]]}
      });
    </script>
#}
	<script type="text/x-mathjax-config">
	  MathJax.Hub.Config({
	    tex2jax: {
	      inlineMath: [
		["\\(","\\)"],
		['[mathjaxinline]','[/mathjaxinline]']
	      ],
	      displayMath: [
		["\\[","\\]"],
		['[mathjax]','[/mathjax]']
	      ]
	    }
	  });
          MathJax.Hub.setRenderer("PreviewHTML");
	</script>
    <script type="text/x-mathjax-config">

      // In order to eliminate all flashing during interactive
      // preview, it is necessary to set processSectionDelay to 0
      // (remove delay between input and output phases). This
      // effectively disables fast preview, regardless of
      // the fast preview setting as shown in the context menu.
      MathJax.Hub.processSectionDelay = 0;

      MathJax.Hub.signal.Interest(function(message) {
        if(message[0] === "End Math") {
            set_mathjax_display_div_settings();
        }
      });
      function set_mathjax_display_div_settings() {
        $('.MathJax_Display').each(function( index ) {
          this.setAttribute('tabindex', '0');
          this.setAttribute('aria-live', 'off');
          this.removeAttribute('role');
          this.removeAttribute('aria-readonly');
        });
      }
    </script>
    <script type="text/javascript" src="{{ rooturl }}static/MathJax.js?config=TeX-MML-AM_SVG"></script>
  </body>
</html>
