{% load static compress i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% load course_flow_templatetags %}

<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
<head>
  <title>{% block title %}{% endblock %}</title>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <meta
    name="description"
    content="{% block metadescription %}{% endblock %}"
  />
  <meta name="theme-color" content="#1976BC"/>
  <script nonce="{{ request.csp_nonce }}">
    // HACK(keanulee): The Redux package assumes `process` exists - mock it here before
    // the module is loaded.
    window.process = {
      env: {
        NODE_ENV: "production"
      }
    };
  </script>

  <script nonce="{{ request.csp_nonce }}">
      window.cf_nonce = "{{ request.csp_nonce }}"
  </script>

  {% include 'course_flow/base/static_scripts.html' %}
  {% include 'course_flow/base/scripts.html' %}

  {% block header %}{% endblock %}

</head>

<body id="site">
  <div class="main-wrapper">
    {% include 'course_flow/base/left_panel.html' %}

      {% comment %}
        @todo see https://course-flow.atlassian.net/browse/COUR-246
      {% endcomment %}
      <div id="react-portal-left-panel-extra"></div>

    {% include 'course_flow/base/main_block.html' %}
  </div>

<div id="popup-container"></div>
{% block body %} {% endblock %}

<footer>
  {% block foot %}{% endblock %}
</footer>
{% csrf_token %}
</body>

{% block common_scripts %}
  {% include 'course_flow/base/config_js.html' %}
  <script src="{% static 'course_flow/js/templates/base-common.js' %}"></script>
{% endblock %}

{% block read_only_scripts %} {% endblock %}

{% block scripts %}
  <script src="{% static 'course_flow/js/templates/base.js' %}"></script>
{% endblock %}

</html>
