From b48409c6cd762057366b3b31eecbfaf2db9631f2 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 5 Nov 2019 23:25:18 +0100 Subject: [PATCH] Move CSS link tags before JS script tags This fixes flickering issues when switching pages. --- sphinx_rtd_theme/layout.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index c575f5161..18552c24d 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -19,6 +19,21 @@ {{ title|striptags|e }}{{ titlesuffix }} {% endblock %} + {# CSS #} + + + {%- for css in css_files %} + {%- if css|attr("rel") %} + + {%- else %} + + {%- endif %} + {%- endfor %} + + {%- for cssfile in extra_css_files %} + + {%- endfor %} + {# FAVICON #} {% if favicon %} @@ -65,21 +80,6 @@ {%- endif %} {%- endblock %} - {# CSS #} - - - {%- for css in css_files %} - {%- if css|attr("rel") %} - - {%- else %} - - {%- endif %} - {%- endfor %} - - {%- for cssfile in extra_css_files %} - - {%- endfor %} - {%- block linktags %} {%- if hasdoc('about') %}