diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index dccfac1da..2df1b39cd 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -28,18 +28,42 @@ {% endif %} - {# CSS #} - - {# OPENSEARCH #} - {% if not embedded %} - {% if use_opensearch %} - + {# JAVASCRIPTS #} + + {%- if not embedded %} + {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #} + {% if sphinx_version >= "1.8.0" %} + + {%- for scriptfile in script_files %} + {{ js_tag(scriptfile) }} + {%- endfor %} + {% else %} + + {%- for scriptfile in script_files %} + + {%- endfor %} {% endif %} + - {% endif %} + {# OPENSEARCH #} + {%- if use_opensearch %} + + {%- endif %} + {%- endif %} + {# CSS #} {%- for css in css_files %} @@ -49,6 +73,7 @@ {%- endif %} {%- endfor %} + {%- for cssfile in extra_css_files %} {%- endfor %} @@ -74,10 +99,6 @@ {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} - - {# Keep modernizr in head - http://modernizr.com/docs/#installing #} - - @@ -186,35 +207,6 @@ {% include "versions.html" %} - {% if not embedded %} - - {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #} - {% if sphinx_version >= "1.8.0" %} - - {%- for scriptfile in script_files %} - {{ js_tag(scriptfile) }} - {%- endfor %} - {% else %} - - {%- for scriptfile in script_files %} - - {%- endfor %} - {% endif %} - - {% endif %} - - -