{% load static %}
<!DOCTYPE html>
<html lang="en">
<html>
  <head>
    <title>{{ title|default:"Scalar API Reference"}}</title>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1" />
  </head>

  <body>
    <div id="app"></div>

    <!-- Load the Script -->
    {% if scalar_cdn %}
      <script src="{{ scalar_cdn }}"></script>
    {% else %}
      <script src="{% static 'dmr/scalar/1.49.2/scalar.min.js' %}"></script>
    {% endif %}

    <!-- Initialize the Scalar API Reference -->
    <script>
      Scalar.createApiReference('#app', {
        sources: [{content: {{ schema | safe }}}]
      })
    </script>
  </body>
</html>
