mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Merge pull request #78 from ehough/move-javascript-to-bottom
Move JS to bottom of page
This commit is contained in:
commit
34e56c85b3
|
@ -25,41 +25,17 @@
|
||||||
{# CSS #}
|
{# CSS #}
|
||||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
{# JS #}
|
{# OPENSEARCH #}
|
||||||
{% if not embedded %}
|
{% if not embedded %}
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
var DOCUMENTATION_OPTIONS = {
|
|
||||||
URL_ROOT:'{{ url_root }}',
|
|
||||||
VERSION:'{{ release|e }}',
|
|
||||||
COLLAPSE_INDEX:false,
|
|
||||||
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
|
|
||||||
HAS_SOURCE: {{ has_source|lower }}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
{%- for scriptfile in script_files %}
|
|
||||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
{% if use_opensearch %}
|
{% if use_opensearch %}
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
<link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% 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 %}
|
{% if not READTHEDOCS %}
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||||
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# STICKY NAVIGATION #}
|
|
||||||
{% if theme_sticky_navigation %}
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(function () {
|
|
||||||
SphinxRtdTheme.StickyNav.enable();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for cssfile in css_files %}
|
{% for cssfile in css_files %}
|
||||||
|
@ -94,6 +70,7 @@
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- block extrahead %} {% endblock %}
|
{%- block extrahead %} {% endblock %}
|
||||||
|
|
||||||
|
{# Keep modernizr in head - http://modernizr.com/docs/#installing #}
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -145,5 +122,39 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% include "versions.html" %}
|
{% include "versions.html" %}
|
||||||
|
|
||||||
|
{% if not embedded %}
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var DOCUMENTATION_OPTIONS = {
|
||||||
|
URL_ROOT:'{{ url_root }}',
|
||||||
|
VERSION:'{{ release|e }}',
|
||||||
|
COLLAPSE_INDEX:false,
|
||||||
|
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
|
||||||
|
HAS_SOURCE: {{ has_source|lower }}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
{%- for scriptfile in script_files %}
|
||||||
|
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# RTD hosts this file, so just load on non RTD builds #}
|
||||||
|
{% if not READTHEDOCS %}
|
||||||
|
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# STICKY NAVIGATION #}
|
||||||
|
{% if theme_sticky_navigation %}
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(function () {
|
||||||
|
SphinxRtdTheme.StickyNav.enable();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%- block footer %} {% endblock %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{%- extends "layout.html" %}
|
{%- extends "layout.html" %}
|
||||||
{% set title = _('Search') %}
|
{% set title = _('Search') %}
|
||||||
{% set script_files = script_files + ['_static/searchtools.js'] %}
|
{% set script_files = script_files + ['_static/searchtools.js'] %}
|
||||||
{% block extrahead %}
|
{% block footer %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
|
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user