From 433ce2f7327e02d6457ae7b4f4a8cd157da2212f Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 16 Jan 2018 04:54:52 -0500 Subject: [PATCH 1/6] Move javascript back to head --- sphinx_rtd_theme/layout.html | 81 ++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 21ddbaf5e..2e3b8ab20 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -28,16 +28,47 @@ {% endif %} - {# CSS #} - - {# OPENSEARCH #} + {# Javascript -- Keepin in head #} {% if not embedded %} - {% if use_opensearch %} - + + {%- for scriptfile in script_files %} + + {%- endfor %} + + {# RTD hosts this file, so just load on non RTD builds #} + {% if not READTHEDOCS %} + {% endif %} + + - {% endif %} + {# OPENSEARCH #} + {%- if use_opensearch %} + + {%- endif %} + {%- endif %} + {# CSS #} {# RTD hosts this file, so just load on non RTD builds #} {% if not READTHEDOCS %} @@ -80,10 +111,6 @@ {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} - - {# Keep modernizr in head - http://modernizr.com/docs/#installing #} - - @@ -185,40 +212,6 @@ {% include "versions.html" %} - {% if not embedded %} - - - {%- for scriptfile in script_files %} - - {%- endfor %} - - {% endif %} - - {# RTD hosts this file, so just load on non RTD builds #} - {% if not READTHEDOCS %} - - {% endif %} - - - {%- block footer %} {% endblock %} From 2a47e06f3887379fe18463cdafef9df6ba7b52cc Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 16 Jan 2018 16:40:58 -0500 Subject: [PATCH 2/6] Move jQuery function back to bottom --- sphinx_rtd_theme/layout.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 2e3b8ab20..a6cf64de4 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -50,15 +50,6 @@ {% endif %} - {# OPENSEARCH #} {%- if use_opensearch %} @@ -211,7 +202,15 @@ {% include "versions.html" %} - + {%- block footer %} {% endblock %} From 0614961715e67eb3517f0c10b82f6dae85b5b14f Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 16 Jan 2018 16:44:39 -0500 Subject: [PATCH 3/6] Do not change white space --- sphinx_rtd_theme/layout.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index a6cf64de4..2f8f1bf9a 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -203,14 +203,15 @@ {% include "versions.html" %} + {%- block footer %} {% endblock %} From 6cd5a159111a422f08cf1963a7a89b7b0d2f3785 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 29 Jan 2018 21:44:31 -0500 Subject: [PATCH 4/6] Update comment + whitespace cleanup --- sphinx_rtd_theme/layout.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index cd929a12f..ab4f9ff78 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -28,8 +28,8 @@ {% endif %} - {# Javascript -- Keepin in head #} - {% if not embedded %} + {# Javascript #} + {%- if not embedded %} - {% endif %} + {%- endif %} {# OPENSEARCH #} @@ -63,17 +63,17 @@ {# RTD hosts this file, so just load on non RTD builds #} {% if not READTHEDOCS %} - {% endif %} - + {%- endif %} + - - {% for cssfile in css_files %} + + {%- for cssfile in css_files %} - {% endfor %} + {%- endfor %} - {% for cssfile in extra_css_files %} + {%- for cssfile in extra_css_files %} - {% endfor %} + {%- endfor %} {%- block linktags %} {%- if hasdoc('about') %} From bdef03adfe0cc907ae368f6fadb9658e919f8f5e Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Mon, 5 Nov 2018 17:54:09 -0500 Subject: [PATCH 5/6] Address review points --- sphinx_rtd_theme/layout.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 9d7a606e3..fafec8bd7 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -29,6 +29,7 @@ {% endif %} {# Javascript #} + {%- 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" %} @@ -52,12 +53,7 @@ {%- endfor %} {% endif %} - - {# RTD hosts this file, so just load on non RTD builds #} - {%- if not READTHEDOCS %} - - {%- endif %} - + {# OPENSEARCH #} {%- if use_opensearch %} From d9c1668d9b1dd2bd365c0ddecffb5b1bd8db1dc9 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 4 Dec 2018 20:13:29 -0500 Subject: [PATCH 6/6] Fix code comments --- sphinx_rtd_theme/layout.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index fafec8bd7..4808df1be 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -28,7 +28,7 @@ {% endif %} - {# Javascript #} + {# 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 #} @@ -63,6 +63,7 @@ {%- endif %} {%- endif %} + {# CSS #} {%- for css in css_files %}