8000 Merge pull request #1539 from jaquesgrobler/test · scikit-learn/scikit-learn@dacdd3a · GitHub
[go: up one dir, main page]

Skip to content

Commit dacdd3a

Browse files
committed
Merge pull request #1539 from jaquesgrobler/test
warning for old version(0.9)
2 parents 66c3d4c + f702485 commit dacdd3a

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
# Theme options are theme-specific and customize the look and feel of a theme
123123
# further. For a list of options available for each theme, see the
124124
# documentation.
125-
#html_theme_options = {}
125+
html_theme_options = {'oldversion':True}
126126

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

doc/themes/scikit-learn/layout.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
{%- endif %}
3232

3333
{% block header %}
34+
{%- if theme_oldversion|tobool %}
35+
<div class="warning-wrapper">
36+
<p>Warning: This documentation is
37+
for {{project}} <strong>version {{ release|e }}</strong>.
38+
&mdash; <a href="http://scikit-learn.org/stable/">
39+
Latest stable version</a></p></p>
40+
</div>
41+
{%- endif %}
42+
3443
<div class="header-wrapper">
3544
<div class="header">
3645
{%- if logo %}
@@ -66,7 +75,6 @@
6675
</script>
6776

6877
</div>
69-
7078
</div> <!-- end navbar -->
7179
{%- endblock -%}
7280

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,17 @@ div.rel {
184184
margin-top: 20px;
185185
}
186186

187+
/* -------- warning header for old versions --------------------------------*/
188+
189+
div.warning-wrapper {
190+
background-color: #ffaaaa;
191+
max-width: auto;
192+
text-align: center;
193+
}
194+
div.warning-wrapper p {
195+
margin: 0;
196+
}
197+
187198
div.sphinxsidebar h3,
188199
div.sphinxsidebar h4 {
189200
padding: 5px 10px;

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