diff --git a/doc/conf.py b/doc/conf.py index 94f471e429db44c7cfdc29c8de1fe11ceb9bde04..35096b89e2935e2112a698e37d1dc40ff75509ea 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -112,7 +112,7 @@ html_theme = 'scikit-learn' # 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/layout.html b/doc/themes/scikit-learn/layout.html index 96a8e79cef4326ff334a8344cfa460def3b1cd3f..df971ced9c2ef21e60213f6b30b7c20d013a9ef2 100644 --- a/doc/themes/scikit-learn/layout.html +++ b/doc/themes/scikit-learn/layout.html @@ -15,6 +15,15 @@ {%- endif %} {% block header %} + {%- if theme_oldversion|tobool %} + <div class="warning-wrapper"> + <p>Warning: This documentation is + for {{project}} <strong>version {{ release|e }}</strong>. + — <a href="http://scikit-learn.org/stable/"> + Latest stable version</a></p></p> + </div> + {%- endif %} + <div class="header-wrapper"> <div class="header"> {%- if logo %} diff --git a/doc/themes/scikit-learn/static/nature.css_t b/doc/themes/scikit-learn/static/nature.css_t index 6181274c9391fad3eb01a9601d411e917c719b4c..e17161281ffb561e60a871e6ad1383c2f667c6a4 100644 --- a/doc/themes/scikit-learn/static/nature.css_t +++ b/doc/themes/scikit-learn/static/nature.css_t @@ -57,7 +57,18 @@ span.legend { div.navbar { padding-top: 15px; margin-left: 200px; -} +} + +/* -------- warning header for old versions --------------------------------*/ + +div.warning-wrapper { + background-color: #ffaaaa; + max-width: auto; + text-align: center; +} +div.warning-wrapper p { + margin: 0; +} div.navbar ul { background-color: #ff9c34; @@ -73,8 +84,8 @@ div.navbar ul, div.navbar li { padding: 4px 10px 5px 10px; } -div.navbar ul li a, -div.navbar ul li a:link, +div.navbar ul li a, +div.navbar ul li a:link, div.navbar ul li a:visited, div.navbar ul li a:hover { color: white; diff --git a/doc/themes/scikit-learn/theme.conf b/doc/themes/scikit-learn/theme.conf index 1cc40044646bb73870088ddc88543c58a3ca083e..e70d4c67d39d623babe17340402fb15fde6e2cf6 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 = False \ No newline at end of file