Skip to content

Commit 2d01103

Browse files
authored
Merge branch 'master' into pad-literal-blocks
2 parents 0fde3ab + 55536de commit 2d01103

File tree

11 files changed

+30
-21
lines changed

11 files changed

+30
-21
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sphinx-rtd-theme",
3-
"version": "0.2.4",
3+
"version": "0.3.1",
44
"homepage": "https://github.com/rtfd/sphinx_rtd_theme",
55
"authors": [
66
"Dave Snider, Read the Docs, Inc. & contributors <[email protected]>"

docs/changelog.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33
Changelog
44
*********
55

6-
master
6+
v0.3.1
77
======
88

9-
New Features
10-
-------------
11-
129
Fixes
1310
-----
1411

12+
* Revert part of #576 causing display issues with version selector menu
13+
* Backwards compatibility fixes for pre-0.3.0 releases (#623)
14+
* Fix mkdocs version selector (#622)
15+
* Add open list spacing (#591)
1516
* Fix table centering (#599)
1617

17-
Other Changes
18-
--------------
19-
2018
v0.3.0
2119
======
2220

js/theme.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ function ThemeNav () {
1818
nav.enable = function (withStickyNav) {
1919
var self = this;
2020

21+
// TODO this can likely be removed once the theme javascript is broken
22+
// out from the RTD assets. This just ensures old projects that are
23+
// calling `enable()` get the sticky menu on by default. All other cals
24+
// to `enable` should include an argument for enabling the sticky menu.
25+
if (typeof(withStickNav) == 'undefined') {
26+
withStickyNav = true;
27+
}
28+
2129
if (self.isRunning) {
2230
// Only allow enabling nav logic once
2331
return;
@@ -55,6 +63,8 @@ function ThemeNav () {
5563

5664
};
5765

66+
// TODO remove this with a split in theme and Read the Docs JS logic as
67+
// well, it's only here to support 0.3.0 installs of our theme.
5868
nav.enableSticky = function() {
5969
this.enable(true);
6070
};
@@ -190,7 +200,13 @@ function ThemeNav () {
190200
module.exports.ThemeNav = ThemeNav();
191201

192202
if (typeof(window) != 'undefined') {
193-
window.SphinxRtdTheme = { Navigation: module.exports.ThemeNav };
203+
window.SphinxRtdTheme = {
204+
Navigation: module.exports.ThemeNav,
205+
// TODO remove this once static assets are split up between the theme
206+
// and Read the Docs. For now, this patches 0.3.0 to be backwards
207+
// compatible with a pre-0.3.0 layout.html
208+
StickyNav: module.exports.ThemeNav,
209+
};
194210
}
195211

196212

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sphinx_rtd_theme",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"private": true,
55
"devDependencies": {
66
"bower": "^1.8.4",

sass/_theme_badge.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
position: fixed
33
bottom: 0
44
left: 0
5-
overflow-y: scroll
65
width: $nav-desktop-width
76
color: $section-background-color
87
background: darken($menu-background-color, 8%)
@@ -35,6 +34,7 @@
3534
background-color: $yellow
3635
color: $black
3736
&.shift-up
37+
height: auto
3838
max-height: 100%
3939
&.shift-up .rst-other-versions
4040
display: block

sphinx_rtd_theme/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66
from os import path
77

8-
__version__ = '0.3.0'
8+
__version__ = '0.3.1'
99
__version_full__ = __version__
1010

1111

sphinx_rtd_theme/layout.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,7 @@
215215

216216
<script type="text/javascript">
217217
jQuery(function () {
218-
{% if theme_sticky_navigation|tobool %}
219-
SphinxRtdTheme.Navigation.enableSticky();
220-
{% else %}
221-
SphinxRtdTheme.Navigation.enable();
222-
{% endif %}
218+
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
223219
});
224220
</script>
225221

sphinx_rtd_theme/static/css/badge_only.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_rtd_theme/static/css/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_rtd_theme/static/js/theme.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)