mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Merge 0943f5e56a
into 8d4d394dad
This commit is contained in:
commit
4608998683
18
src/theme.js
18
src/theme.js
@ -19,14 +19,6 @@ function ThemeNav () {
|
||||
nav.enable = function (withStickyNav) {
|
||||
var self = this;
|
||||
|
||||
// TODO this can likely be removed once the theme javascript is broken
|
||||
// out from the RTD assets. This just ensures old projects that are
|
||||
// calling `enable()` get the sticky menu on by default. All other cals
|
||||
// to `enable` should include an argument for enabling the sticky menu.
|
||||
if (typeof(withStickyNav) == 'undefined') {
|
||||
withStickyNav = true;
|
||||
}
|
||||
|
||||
if (self.isRunning) {
|
||||
// Only allow enabling nav logic once
|
||||
return;
|
||||
@ -64,12 +56,6 @@ function ThemeNav () {
|
||||
|
||||
};
|
||||
|
||||
// TODO remove this with a split in theme and Read the Docs JS logic as
|
||||
// well, it's only here to support 0.3.0 installs of our theme.
|
||||
nav.enableSticky = function() {
|
||||
this.enable(true);
|
||||
};
|
||||
|
||||
nav.init = function ($) {
|
||||
var doc = $(document),
|
||||
self = this;
|
||||
@ -228,10 +214,6 @@ module.exports.ThemeNav = ThemeNav();
|
||||
if (typeof(window) != 'undefined') {
|
||||
window.SphinxRtdTheme = {
|
||||
Navigation: module.exports.ThemeNav,
|
||||
// TODO remove this once static assets are split up between the theme
|
||||
// and Read the Docs. For now, this patches 0.3.0 to be backwards
|
||||
// compatible with a pre-0.3.0 layout.html
|
||||
StickyNav: module.exports.ThemeNav,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user