From 677706d4ac198193a1e4d723df234e90cc949f2a Mon Sep 17 00:00:00 2001 From: Eric Hough Date: Sun, 5 Jan 2014 15:03:51 -0500 Subject: [PATCH 1/6] Moving JS to bottom --- sphinx_rtd_theme/layout.html | 46 +++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 0314a802..c62d0807 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -25,32 +25,16 @@ {# CSS #} - {# JS #} + {# OPENSEARCH #} {% if not embedded %} - - - {%- for scriptfile in script_files %} - - {%- endfor %} - {% if use_opensearch %} {% endif %} - {% endif %} - {# RTD hosts these file themselves, so just load on non RTD builds #} + {# RTD hosts this file, so just load on non RTD builds #} {% if not READTHEDOCS %} - {% endif %} {% for cssfile in css_files %} @@ -85,6 +69,7 @@ {%- endblock %} {%- block extrahead %} {% endblock %} + {# Keep modernizr in head - http://modernizr.com/docs/#installing #} @@ -134,5 +119,28 @@ {% 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 %} + - + \ No newline at end of file From 6dd2f3efc32890dd9a48559138696f3e82e134be Mon Sep 17 00:00:00 2001 From: Eric Hough Date: Sun, 5 Jan 2014 15:22:45 -0500 Subject: [PATCH 2/6] Renaming block "extrahead" to "inlinejs" and moving to bottom of page. --- sphinx_rtd_theme/layout.html | 3 ++- sphinx_rtd_theme/search.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 5e54d031..6e8c18c2 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -67,7 +67,6 @@ {%- endif %} {%- endblock %} - {%- block extrahead %} {% endblock %} {# Keep modernizr in head - http://modernizr.com/docs/#installing #} @@ -142,5 +141,7 @@ {% endif %} + {%- block inlinejs %} {% endblock %} + diff --git a/sphinx_rtd_theme/search.html b/sphinx_rtd_theme/search.html index d8bbe690..66b9a013 100644 --- a/sphinx_rtd_theme/search.html +++ b/sphinx_rtd_theme/search.html @@ -10,7 +10,7 @@ {%- extends "layout.html" %} {% set title = _('Search') %} {% set script_files = script_files + ['_static/searchtools.js'] %} -{% block extrahead %} +{% block inlinejs %} From cb44a290a904e6aa238e618d3e354e9cecf026d1 Mon Sep 17 00:00:00 2001 From: Eric Hough Date: Mon, 6 Jan 2014 02:08:20 -0500 Subject: [PATCH 3/6] Restoring "extrahead" block in layout.html --- sphinx_rtd_theme/layout.html | 1 + 1 file changed, 1 insertion(+) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 6e8c18c2..68029172 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -67,6 +67,7 @@ {%- endif %} {%- endblock %} + {%- block extrahead %} {% endblock %} {# Keep modernizr in head - http://modernizr.com/docs/#installing #} From 865373f5ffed7c76c6028cc3f5bbeffc5478edde Mon Sep 17 00:00:00 2001 From: Eric Hough Date: Wed, 22 Jan 2014 00:08:54 -0500 Subject: [PATCH 4/6] Removing incorrectly merged commits --- sphinx_rtd_theme/layout.html | 12 ++---------- sphinx_rtd_theme/static/css/theme.css | 2 +- sphinx_rtd_theme/theme.conf | 1 - 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index 9c404cda..831c3841 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -30,6 +30,7 @@ {% if use_opensearch %} {% endif %} + {% endif %} {# RTD hosts this file, so just load on non RTD builds #} @@ -81,16 +82,7 @@ {# SIDE NAV, TOGGLES ON MOBILE #}