diff --git a/sphinx_rtd_theme/theme.conf b/sphinx_rtd_theme/theme.conf index 89a19dfd..2b0fbb66 100644 --- a/sphinx_rtd_theme/theme.conf +++ b/sphinx_rtd_theme/theme.conf @@ -14,3 +14,4 @@ includehidden = True logo_only = display_version = True prev_next_buttons_location = bottom +style_external_links = False From 237289320d622da35b2abb857642bcd38074e10f Mon Sep 17 00:00:00 2001 From: Jesse Tan Date: Wed, 6 Dec 2017 10:10:39 +0100 Subject: [PATCH 121/159] Remove need for bind() --- js/theme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/theme.js b/js/theme.js index 6c0f844b..d54f7f12 100644 --- a/js/theme.js +++ b/js/theme.js @@ -31,7 +31,7 @@ function ThemeNav () { if (!self.linkScroll) { if (!self.winScroll) { self.winScroll = true; - requestAnimationFrame(self.onScroll.bind(self)); + requestAnimationFrame(function() { self.onScroll(); }); } } }); @@ -40,7 +40,7 @@ function ThemeNav () { self.win.on('resize', function () { if (!self.winResize) { self.winResize = true; - requestAnimationFrame(self.onResize.bind(self)); + requestAnimationFrame(function() { self.onResize(); }); } }); From 5c03c8da83444e742d94cc538a3ab8ee8fe8c788 Mon Sep 17 00:00:00 2001 From: Jesse Tan Date: Wed, 6 Dec 2017 12:55:20 +0100 Subject: [PATCH 122/159] Add rAF polyfill --- js/theme.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/js/theme.js b/js/theme.js index d54f7f12..a8f56ff1 100644 --- a/js/theme.js +++ b/js/theme.js @@ -171,3 +171,33 @@ module.exports.ThemeNav = ThemeNav(); if (typeof(window) != 'undefined') { window.SphinxRtdTheme = { StickyNav: module.exports.ThemeNav }; } + + +// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel +// https://gist.github.com/paulirish/1579671 +// MIT license + +(function() { + var lastTime = 0; + var vendors = ['ms', 'moz', 'webkit', 'o']; + for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; + window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] + || window[vendors[x]+'CancelRequestAnimationFrame']; + } + + if (!window.requestAnimationFrame) + window.requestAnimationFrame = function(callback, element) { + var currTime = new Date().getTime(); + var timeToCall = Math.max(0, 16 - (currTime - lastTime)); + var id = window.setTimeout(function() { callback(currTime + timeToCall); }, + timeToCall); + lastTime = currTime + timeToCall; + return id; + }; + + if (!window.cancelAnimationFrame) + window.cancelAnimationFrame = function(id) { + clearTimeout(id); + }; +}()); From a0b2ccc3f7aa88e7216d4391be01ea2e64534160 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Fri, 8 Dec 2017 08:24:52 -0800 Subject: [PATCH 123/159] Fix theme logic and rebuild prod assets --- sphinx_rtd_theme/layout.html | 2 +- sphinx_rtd_theme/static/css/theme.css | 2 +- sphinx_rtd_theme/static/css/theme.css.map | 2 +- sphinx_rtd_theme/static/js/theme.js | 43 ++++++++++++++++++++--- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html index e9a956f9..745f9bcc 100644 --- a/sphinx_rtd_theme/layout.html +++ b/sphinx_rtd_theme/layout.html @@ -159,7 +159,7 @@ {# PAGE CONTENT #}
- {% if (theme_style_external_links == 'True') %} + {% if theme_style_external_links %}