{% extends "course_flow/base.html" %}

{% load static i18n %}

{% block title %}
  {% trans "My Favourites" %} - CourseFlow
{% endblock %}

{% csrf_token %}

{% block scripts %}
  {{ block.super }}
  <script nonce="{{ request.csp_nonce }}">

    $(".menubar").removeClass("hidden");
    const user_id = {{ user.id }};

//    var library_renderer;

    window.addEventListener("load", function () {
      favourites_renderer = new library_renderers.FavouritesRenderer();
      $(document).ajaxError(renderers.fail_function);
      favourites_renderer.render($("#container"));
      makeActiveSidebar("#my-favourites");
    });
  </script>
{% endblock %}
