From 0ae46ae3d4e5f3ecb6b2177ca043d852be2261ac Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Mon, 27 Jan 2020 12:05:29 -0800 Subject: [PATCH 1/2] Backport PR #16255: Move version info to sidebar --- doc/_static/mpl.css | 15 ++++++++-- doc/_templates/sidebar_versions.html | 38 ++++++++++++++++++++++++ doc/conf.py | 2 +- doc/index.rst | 43 ---------------------------- 4 files changed, 51 insertions(+), 47 deletions(-) create mode 100644 doc/_templates/sidebar_versions.html diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 3e736a92151f..d69e7adf99c1 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -1006,15 +1006,24 @@ 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 { margin-top: 40px; } +.sidebar-versions { + 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 cea2b33b7717..b2a009d31893 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -263,7 +263,7 @@ def _check_deps(): # Custom sidebar templates, maps page names to templates. html_sidebars = { - 'index': ['searchbox.html', 'sidebar_announcement.html', + 'index': ['searchbox.html', 'sidebar_announcement.html', 'sidebar_versions.html' 'donate_sidebar.html'], '**': ['searchbox.html', 'localtoc.html', 'relations.html', 'pagesource.html'] diff --git a/doc/index.rst b/doc/index.rst index 88fd9b71cdd6..b15936c1fd0a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -54,51 +54,8 @@ Visit the :doc:`Matplotlib installation instructions `. 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 `. From 7ec1740703c0b29f8782f4aa31086250cba6883e Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 1 Feb 2020 16:58:26 -0500 Subject: [PATCH 2/2] DOC: add missing comma --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index b2a009d31893..53d18dbb54d8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -263,7 +263,7 @@ def _check_deps(): # Custom sidebar templates, maps page names to templates. html_sidebars = { - 'index': ['searchbox.html', 'sidebar_announcement.html', 'sidebar_versions.html' + 'index': ['searchbox.html', 'sidebar_announcement.html', 'sidebar_versions.html', 'donate_sidebar.html'], '**': ['searchbox.html', 'localtoc.html', 'relations.html', 'pagesource.html']