mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
make js work on non-rtd sites again
This commit is contained in:
parent
90f76bc3ea
commit
df08b518e4
|
@ -25,16 +25,6 @@
|
||||||
{# CSS #}
|
{# CSS #}
|
||||||
<link href='http://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700' rel='stylesheet' type='text/css'>
|
<link href='http://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
|
|
||||||
{# RTD hosts this file themselves, only load for non RTD builds #}
|
|
||||||
{% if not READTHEDOCS %}
|
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% for cssfile in css_files %}
|
|
||||||
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{# JS #}
|
{# JS #}
|
||||||
{% if not embedded %}
|
{% if not embedded %}
|
||||||
|
|
||||||
|
@ -47,7 +37,7 @@
|
||||||
HAS_SOURCE: {{ has_source|lower }}
|
HAS_SOURCE: {{ has_source|lower }}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
{%- for scriptfile in script_files + ["_static/theme.js"] %}
|
{%- for scriptfile in script_files %}
|
||||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
@ -56,7 +46,17 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{# RTD hosts these file themselves, so just load on non RTD builds #}
|
||||||
|
{% if not READTHEDOCS %}
|
||||||
|
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||||
|
<script type="text/javascript" src="_static/theme.js"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for cssfile in css_files %}
|
||||||
|
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{%- block linktags %}
|
{%- block linktags %}
|
||||||
{%- if hasdoc('about') %}
|
{%- if hasdoc('about') %}
|
||||||
<link rel="author" title="{{ _('About these documents') }}"
|
<link rel="author" title="{{ _('About these documents') }}"
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
/* Comment this because we include this information in our main JS file.
|
$( document ).ready(function() {
|
||||||
$(document).ready(function() {
|
|
||||||
// Shift nav in mobile when clicking the menu.
|
// Shift nav in mobile when clicking the menu.
|
||||||
$(document).on('click', "[data-toggle='wy-nav-top']", function() {
|
$("[data-toggle='wy-nav-top']").click(function() {
|
||||||
$("[data-toggle='wy-nav-shift']").toggleClass("shift");
|
$("[data-toggle='wy-nav-shift']").toggleClass("shift");
|
||||||
$("[data-toggle='rst-versions']").toggleClass("shift");
|
$("[data-toggle='rst-versions']").toggleClass("shift");
|
||||||
});
|
});
|
||||||
// Close menu when you click a link.
|
// Close menu when you click a link.
|
||||||
$(document).on('click', ".wy-menu-vertical .current ul li a", function() {
|
$(".wy-menu-vertical .current ul li a").click(function() {
|
||||||
$("[data-toggle='wy-nav-shift']").removeClass("shift");
|
$("[data-toggle='wy-nav-shift']").removeClass("shift");
|
||||||
$("[data-toggle='rst-versions']").toggleClass("shift");
|
$("[data-toggle='rst-versions']").toggleClass("shift");
|
||||||
});
|
});
|
||||||
$(document).on('click', "[data-toggle='rst-current-version']", function() {
|
$("[data-toggle='rst-current-version']").click(function() {
|
||||||
$("[data-toggle='rst-versions']").toggleClass("shift-up");
|
$("[data-toggle='rst-versions']").toggleClass("shift-up");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user