From cfb59d6cf3e7c6ddb8ac3384b30b81a5bde1533f Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sat, 18 Jan 2020 19:57:56 +0100 Subject: [PATCH] Move version info to sidebar --- doc/_static/mpl.css | 7 +++-- doc/_templates/sidebar_versions.html | 38 ++++++++++++++++++++++++ doc/conf.py | 3 +- doc/index.rst | 43 ---------------------------- 4 files changed, 44 insertions(+), 47 deletions(-) create mode 100644 doc/_templates/sidebar_versions.html diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index ff45cf7c8a18..590835cf7d28 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -1133,15 +1133,16 @@ div.viewcode-block:target { } -.sidebar-announcement { +.sidebar-announcement, +.sidebar-versions { border: 1px solid #11557C; background: #eff9ff; - padding: 2px; + padding: 0.2em 0.5em; margin-top: 1em; } .sidebar-announcement p { - margin: 0.4em 0.4em 0.6em 0.4em; + margin: 0.4em 0 0.6em 0; } /* new main nav */ diff --git a/doc/_templates/sidebar_versions.html b/doc/_templates/sidebar_versions.html new file mode 100644 index 000000000000..35a965661d90 --- /dev/null +++ b/doc/_templates/sidebar_versions.html @@ -0,0 +1,38 @@ + diff --git a/doc/conf.py b/doc/conf.py index 67ef6bc62b38..8daaa47451fd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -259,7 +259,8 @@ def _check_dependencies(): # Custom sidebar templates, maps page names to templates. html_sidebars = { - 'index': ['sidebar_announcement.html', 'donate_sidebar.html'], + 'index': ['sidebar_announcement.html', 'sidebar_versions.html', + 'donate_sidebar.html'], '**': ['localtoc.html', 'relations.html', 'pagesource.html'] } diff --git a/doc/index.rst b/doc/index.rst index eef9868be387..aebb88445084 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -49,51 +49,8 @@ oriented interface or via a set of functions familiar to MATLAB users. Documentation ------------- -This is the documentation for Matplotlib version |version|. - To get started, read the :doc:`User's Guide `. -.. raw:: html - -

- - - Trying to learn how to do a particular kind of plot? Check out the :doc:`examples gallery ` or the :doc:`list of plotting commands `.