Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 064ab4e

Browse files
committed
warning for old version
1 parent 66c3d4c commit 064ab4e

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

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 = True

0 commit comments

Comments
 (0)