Skip to content

Commit c70272e

Browse files
committed
Merge pull request scikit-learn#1543 from jaquesgrobler/warn10
warnings for old version(0.10)
2 parents 021a4e0 + d022cfb commit c70272e

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

doc/conf.py

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

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

doc/themes/scikit-learn/layout.html

Lines changed: 9 additions & 0 deletions
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 %}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ div.header {
4646
overflow: hidden;
4747
}
4848

49+
/* -------- warning header for old versions --------------------------------*/
50+
51+
div.warning-wrapper {
52+
background-color: #ffaaaa;
53+
max-width: auto;
54+
text-align: center;
55+
}
56+
div.warning-wrapper p {
57+
margin: 0;
58+
}
4959

5060
p.logo {
5161
margin-top: auto;

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy