From b80a28b0e8f81487966fc003814ec58cc535f94d Mon Sep 17 00:00:00 2001 From: Jaques Grobler Date: Tue, 8 Jan 2013 13:27:15 +0100 Subject: [PATCH 1/2] add warning banner for older version --- doc/themes/scikit-learn/layout.html | 9 +++++++++ doc/themes/scikit-learn/static/nature.css_t | 10 ++++++++++ doc/themes/scikit-learn/theme.conf | 3 +++ 3 files changed, 22 insertions(+) diff --git a/doc/themes/scikit-learn/layout.html b/doc/themes/scikit-learn/layout.html index 413547ba342fd..f62194b07a1b2 100644 --- a/doc/themes/scikit-learn/layout.html +++ b/doc/themes/scikit-learn/layout.html @@ -31,6 +31,15 @@ {%- endif %} {% block header %} + {%- if theme_oldversion|tobool %} +
+

Warning: This documentation is + for {{project}} version {{ release|e }}. + — + Latest stable version

+
+ {%- endif %} +
{%- if logo %} diff --git a/doc/themes/scikit-learn/static/nature.css_t b/doc/themes/scikit-learn/static/nature.css_t index 9dcbe277f156f..0f1c7ff64e9ae 100644 --- a/doc/themes/scikit-learn/static/nature.css_t +++ b/doc/themes/scikit-learn/static/nature.css_t @@ -46,6 +46,16 @@ div.header { overflow: hidden; } +/* -------- warning header for old versions --------------------------------*/ + +div.warning-wrapper { + background-color: #ffaaaa; + max-width: auto; + text-align: center; +} +div.warning-wrapper p { + margin: 0; +} p.logo { margin-top: auto; diff --git a/doc/themes/scikit-learn/theme.conf b/doc/themes/scikit-learn/theme.conf index 1cc40044646bb..651d199587e0f 100644 --- a/doc/themes/scikit-learn/theme.conf +++ b/doc/themes/scikit-learn/theme.conf @@ -2,3 +2,6 @@ inherit = basic stylesheet = nature.css pygments_style = tango + +[options] +oldversion = True \ No newline at end of file From 998baeb98fc4294d0b95ab942c37e689f4205e7c Mon Sep 17 00:00:00 2001 From: Jaques Grobler Date: Thu, 10 Jan 2013 13:23:46 +0100 Subject: [PATCH 2/2] update conf.py --- doc/conf.py | 2 +- doc/themes/scikit-learn/theme.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 17972826f9d7a..4c33fbd5dc8c2 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -119,7 +119,7 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -#html_theme_options = {} +html_theme_options = {'oldversion':True} # Add any paths that contain custom themes here, relative to this directory. html_theme_path = ['themes'] diff --git a/doc/themes/scikit-learn/theme.conf b/doc/themes/scikit-learn/theme.conf index 651d199587e0f..e70d4c67d39d6 100644 --- a/doc/themes/scikit-learn/theme.conf +++ b/doc/themes/scikit-learn/theme.conf @@ -4,4 +4,4 @@ stylesheet = nature.css pygments_style = tango [options] -oldversion = True \ No newline at end of file +oldversion = False \ No newline at end of file