{% extends "course_flow/base.html" %}
<!-- -->
{% load static i18n %} {% load course_flow_templatetags %}
<!-- -->
{% block header %} {% endblock %}
<!-- -->
{% block title %}{% trans "Home" %} - CourseFlow{% endblock %}
<!-- -->
{% block metadescription %} {% endblock %}
<!-- -->
{% block body %}

<!-- -->
{% endblock %}
<!-- -->
{% block foot %} {% endblock %}
<!-- -->
{% csrf_token %}
<!-- -->
{% block scripts %} {{ block.super }}
<script nonce="{{request.csp_nonce}}">

  const iconpath = "{% static 'course_flow/img/images_svg/' %}";

  var home_renderer;
  const user_id = {{ user.id }};
  {% if user|has_group:"Teacher" %}
    const is_teacher = true;
  {% else %}
    const is_teacher = false;
  {% endif %}


  window.addEventListener("load",function(){
      home_renderer = new library_renderers.HomeRenderer(is_teacher);
      $(document).ajaxError(renderers.fail_function);
      home_renderer.render($("#container"));
      makeActiveSidebar("#panel-home");
  });
</script>
{% endblock %}
