redoc.html: revert djlint changes (breaks handlebar template)

This commit is contained in:
Simon Li
2024-04-22 20:08:46 +01:00
parent bcf5f49dd6
commit 3580904e8a

View File

@@ -1,3 +1,4 @@
{# djlint: off #}
{%- extends "!layout.html" %} {%- extends "!layout.html" %}
{# not sure why, but theme CSS prevents scrolling within redoc content {# not sure why, but theme CSS prevents scrolling within redoc content
# If this were fixed, we could keep the navbar and footer # If this were fixed, we could keep the navbar and footer
@@ -8,9 +9,7 @@
{% endblock docs_navbar %} {% endblock docs_navbar %}
{% block footer %} {% block footer %}
{% endblock footer %} {% endblock footer %}
{# djlint: off #}
{%- block body_tag -%}<body>{%- endblock body_tag %} {%- block body_tag -%}<body>{%- endblock body_tag %}
{# djlint: on #}
{%- block extrahead %} {%- block extrahead %}
{{ super() }} {{ super() }}
<link href="{{ pathto('_static/redoc-fonts.css', 1) }}" rel="stylesheet" /> <link href="{{ pathto('_static/redoc-fonts.css', 1) }}" rel="stylesheet" />
@@ -23,14 +22,11 @@
document.body.innerText = "Rendered API specification doesn't work with file: protocol. Use sphinx-autobuild to do local builds of the docs, served over HTTP." document.body.innerText = "Rendered API specification doesn't work with file: protocol. Use sphinx-autobuild to do local builds of the docs, served over HTTP."
} else { } else {
Redoc.init( Redoc.init(
"{{ pathto('_static/rest-api.yml', 1) }}", { "{{ pathto('_static/rest-api.yml', 1) }}",
{ {{ meta.redoc_options | default ({}) }},
meta.redoc_options |
default ({})
}
},
document.getElementById("redoc-spec"), document.getElementById("redoc-spec"),
); );
} }
</script> </script>
{%- endblock content %} {%- endblock content %}
{# djlint: on #}