8000 Merge pull request #1542 from jaquesgrobler/warn06 · seckcoder/scikit-learn@fac2b74 · GitHub
[go: up one dir, main page]

Skip to content

Commit fac2b74

Browse files
committed
Merge pull request scikit-learn#1542 from jaquesgrobler/warn06
warnings for old version(0.6)
2 parents 883a10c + be2a5db commit fac2b74

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
# Theme options are theme-specific and customize the look and feel of a theme
112112
# further. For a list of options available for each theme, see the
113113
# documentation.
114-
#html_theme_options = {}
114+
html_theme_options = {'oldversion':True}
115115

116116
# Add any paths that contain custom themes here, relative to this directory.
117117
html_theme_path = ['themes']

doc/themes/scikit-learn/layout.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
{%- endif %}
1616

1717
{% block header %}
18+
{%- if theme_oldversion|tobool %}
19+
<div class="warning-wrapper">
20+
<p>Warning: This documentation is
21+
for {{project}} <strong>version {{ release|e }}</strong>.
22+
&mdash; <a href="http://scikit-learn.org/stable/">
23+
Latest stable version</a></p></p>
24+
</div>
25+
{%- endif %}
26+
1827
<div class="header-wrapper">
1928
<div class="header">
2029
{%- if logo %}

doc/themes/scikit-learn/static/nature.css_t

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,18 @@ div.header-wrapper {
3434
div.header {
3535
/* for the logo to correctly expand when showing results
3636
but remain cut when not */
37-
overflow: hidden;
37+
overflow: hidden;
38+
}
39+
40+
/* -------- warning header for old versions --------------------------------*/
41+
42+
div.warning-wrapper {
43+
background-color: #ffaaaa;
44+
max-width: auto;
45+
text-align: center;
46+
}
47+
div.warning-wrapper p {
48+
margin: 0;
3849
}
3950

4051

doc/themes/scikit-learn/theme.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
inherit = basic
33
stylesheet = nature.css
44
pygments_style = tango
5+
6+
[options]
7+
oldversion = False

0 commit comments

Comments
 (0)
0