8000 Merge pull request #1541 from jaquesgrobler/warn07 · seckcoder/scikit-learn@9c39b69 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9c39b69

Browse files
committed
Merge pull request scikit-learn#1541 from jaquesgrobler/warn07
warnings for old version(0.7)
2 parents 20c536b + f2d17ba commit 9c39b69

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

doc/conf.py

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

117117
# Add any paths that contain custom themes here, relative to this directory.
118118
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: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,18 @@ span.legend {
5757
div.navbar {
5858
padding-top: 15px;
5959
margin-left: 200px;
60-
}
60+
}
61+
62+
/* -------- warning header for old versions --------------------------------*/
63+
64+
div.warning-wrapper {
65+
background-color: #ffaaaa;
66+
max-width: auto;
67+
text-align: center;
68+
}
69+
div.warning-wrapper p {
70+
margin: 0;
71+
}
6172

6273
div.navbar ul {
6374
background-color: #ff9c34;
@@ -73,8 +84,8 @@ div.navbar ul, div.navbar li {
7384
padding: 4px 10px 5px 10px;
7485
}
7586

76-
div.navbar ul li a,
77-
div.navbar ul li a:link,
87+
div.navbar ul li a,
88+
div.navbar ul li a:link,
7889
div.navbar ul li a:visited,
7990
div.navbar ul li a:hover {
8091
color: white;

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