From c784fe224e1e077661341d1820ce098be2bb3d4a Mon Sep 17 00:00:00 2001 From: hannah Date: Thu, 17 Nov 2022 22:10:26 -0500 Subject: [PATCH 1/9] DOC: dropdowns in userguide --- doc/_static/mpl.css | 11 +++++ doc/users/index.rst | 102 +++++++++++++++++++++++++++++++++++--------- 2 files changed, 94 insertions(+), 19 deletions(-) diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 7cf24a748b0a..2483cc194013 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -99,3 +99,14 @@ table.property-table td { display: inline-block; margin: 0 0.5em; } + +/* Removes title from toc in dropdwon */ + +.sd-dropdown>.sd-card-body>.toctree-wrapper>ul>.toctree-l1>a{ + display: none +} + +.sd-dropdown>.sd-card-body>.toctree-wrapper>ul>.toctree-l1>ul{ + list-style:none; + padding-inline-start:0em; +} diff --git a/doc/users/index.rst b/doc/users/index.rst index 0ecff14c9a23..4ad25dbb4d9a 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -4,38 +4,102 @@ ########### -Users guide +User guide ########### General ####### -.. toctree:: - :maxdepth: 2 +.. dropdown:: Getting Started + + .. toctree:: + :maxdepth: 2 + + getting_started/index.rst + +.. dropdown:: Installation + + .. toctree:: + :maxdepth: 2 + + installing/index.rst + +.. dropdown:: Guide to Matplotlib + + .. toctree:: + :maxdepth: 2 + + explain/index.rst + + +.. dropdown:: Troubleshooting + + .. toctree:: + :maxdepth: 2 + + faq/index.rst + +.. dropdown:: External Resources + + .. toctree:: + :maxdepth: 2 + + resources/index.rst + + `User Contributed Packages `_ - getting_started/index.rst - installing/index.rst - explain/index.rst - faq/index.rst - resources/index.rst Tutorials and examples ###################### +.. dropdown:: Plot Types + + .. toctree:: + :maxdepth: 2 -.. toctree:: - :maxdepth: 1 + ../plot_types/index.rst + +.. dropdown:: Tutorials + + .. toctree:: + :maxdepth: 2 + + ../tutorials/index.rst + +.. dropdown:: Example Gallery + + .. toctree:: + :maxdepth: 2 + + ../gallery/index.rst - ../plot_types/index.rst - ../tutorials/index.rst - ../gallery/index.rst Reference ######### -.. toctree:: - :maxdepth: 2 +.. dropdown:: API Reference + + .. toctree:: + :maxdepth: 2 + + ../api/index.rst + +.. dropdown:: Contributing Guide + + .. toctree:: + :maxdepth: 2 + + ../devel/index.rst + +.. dropdown:: Project Information + + .. toctree:: + :maxdepth: 2 + + project/index.rst + +.. dropdown:: Release Notes + + .. toctree:: + :maxdepth: 2 - ../api/index.rst - ../devel/index.rst - project/index.rst - release_notes.rst + release_notes.rst From 9d6dd6a74c70ad1bacba04c8f4ac2213eab47a4d Mon Sep 17 00:00:00 2001 From: hannah Date: Fri, 18 Nov 2022 13:15:24 -0500 Subject: [PATCH 2/9] card view of dropdown --- doc/users/index.rst | 112 +++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 58 deletions(-) diff --git a/doc/users/index.rst b/doc/users/index.rst index 4ad25dbb4d9a..dd3b9b320b6b 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -3,103 +3,99 @@ .. redirect-from:: /contents -########### -User guide -########### +.. grid:: 3 -General -####### + .. grid-item-card:: General -.. dropdown:: Getting Started + .. dropdown:: Getting Started - .. toctree:: - :maxdepth: 2 + .. toctree:: + :maxdepth: 2 - getting_started/index.rst + getting_started/index.rst -.. dropdown:: Installation + .. dropdown:: Installation - .. toctree:: - :maxdepth: 2 + .. toctree:: + :maxdepth: 2 - installing/index.rst + installing/index.rst -.. dropdown:: Guide to Matplotlib + .. dropdown:: Guide to Matplotlib - .. toctree:: - :maxdepth: 2 + .. toctree:: + :maxdepth: 2 - explain/index.rst + explain/index.rst -.. dropdown:: Troubleshooting + .. dropdown:: Troubleshooting - .. toctree:: - :maxdepth: 2 + .. toctree:: + :maxdepth: 2 - faq/index.rst + faq/index.rst -.. dropdown:: External Resources + .. dropdown:: External Resources - .. toctree:: - :maxdepth: 2 + .. toctree:: + :maxdepth: 2 - resources/index.rst + resources/index.rst - `User Contributed Packages `_ + `User Contributed Packages `_ -Tutorials and examples -###################### -.. dropdown:: Plot Types + .. grid-item-card:: Tutorials and examples - .. toctree:: - :maxdepth: 2 + .. dropdown:: Plot Types - ../plot_types/index.rst + .. toctree:: + :maxdepth: 2 -.. dropdown:: Tutorials + ../plot_types/index.rst - .. toctree:: - :maxdepth: 2 + .. dropdown:: Tutorials - ../tutorials/index.rst + .. toctree:: + :maxdepth: 2 -.. dropdown:: Example Gallery + ../tutorials/index.rst - .. toctree:: - :maxdepth: 2 + .. dropdown:: Example Gallery - ../gallery/index.rst + .. toctree:: + :maxdepth: 2 + ../gallery/index.rst -Reference -######### -.. dropdown:: API Reference + .. grid-item-card:: Reference - .. toctree:: - :maxdepth: 2 + .. dropdown:: API Reference - ../api/index.rst + .. toctree:: + :maxdepth: 2 -.. dropdown:: Contributing Guide + ../api/index.rst - .. toctree:: - :maxdepth: 2 + .. dropdown:: Contributing Guide - ../devel/index.rst + .. toctree:: + :maxdepth: 2 -.. dropdown:: Project Information + ../devel/index.rst - .. toctree:: - :maxdepth: 2 + .. dropdown:: Project Information - project/index.rst + .. toctree:: + :maxdepth: 2 -.. dropdown:: Release Notes + project/index.rst - .. toctree:: - :maxdepth: 2 + .. dropdown:: Release Notes - release_notes.rst + .. toctree:: + :maxdepth: 2 + + release_notes.rst From 915b747ca907659e36a2c1d245f69ab79b8a3b74 Mon Sep 17 00:00:00 2001 From: hannah Date: Fri, 18 Nov 2022 15:41:21 -0500 Subject: [PATCH 3/9] top level toc reorg --- doc/users/index.rst | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/doc/users/index.rst b/doc/users/index.rst index dd3b9b320b6b..a883ca7046fa 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -5,7 +5,7 @@ .. grid:: 3 - .. grid-item-card:: General + .. grid-item-card:: Information .. dropdown:: Getting Started @@ -21,32 +21,29 @@ installing/index.rst - .. dropdown:: Guide to Matplotlib + .. dropdown:: Contributing .. toctree:: :maxdepth: 2 - explain/index.rst - + ../devel/index.rst - .. dropdown:: Troubleshooting + .. dropdown:: About .. toctree:: :maxdepth: 2 - faq/index.rst - - .. dropdown:: External Resources + project/index.rst - .. toctree:: - :maxdepth: 2 - resources/index.rst + .. grid-item-card:: Explanations & Examples - `User Contributed Packages `_ + .. dropdown:: API Explanations + .. toctree:: + :maxdepth: 2 - .. grid-item-card:: Tutorials and examples + explain/index.rst .. dropdown:: Plot Types @@ -70,7 +67,7 @@ ../gallery/index.rst - .. grid-item-card:: Reference + .. grid-item-card:: References & Resources .. dropdown:: API Reference @@ -79,23 +76,25 @@ ../api/index.rst - .. dropdown:: Contributing Guide + .. dropdown:: Release Notes .. toctree:: :maxdepth: 2 - ../devel/index.rst + release_notes.rst - .. dropdown:: Project Information + .. dropdown:: Troubleshooting .. toctree:: :maxdepth: 2 - project/index.rst + faq/index.rst - .. dropdown:: Release Notes + .. dropdown:: External Resources .. toctree:: :maxdepth: 2 - release_notes.rst + resources/index.rst + + `User Contributed Packages `_ From d83eea0581786fc276ae8bcd0021c45b45c60815 Mon Sep 17 00:00:00 2001 From: hannah Date: Sat, 19 Nov 2022 20:33:21 -0500 Subject: [PATCH 4/9] default open --- doc/users/index.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/users/index.rst b/doc/users/index.rst index a883ca7046fa..8caffb589492 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -2,12 +2,13 @@ .. redirect-from:: /contents - +.. .. grid:: 3 .. grid-item-card:: Information .. dropdown:: Getting Started + :open: .. toctree:: :maxdepth: 2 @@ -15,6 +16,7 @@ getting_started/index.rst .. dropdown:: Installation + :open: .. toctree:: :maxdepth: 2 @@ -22,6 +24,7 @@ installing/index.rst .. dropdown:: Contributing + :open: .. toctree:: :maxdepth: 2 @@ -29,6 +32,7 @@ ../devel/index.rst .. dropdown:: About + :open: .. toctree:: :maxdepth: 2 @@ -39,6 +43,7 @@ .. grid-item-card:: Explanations & Examples .. dropdown:: API Explanations + :open: .. toctree:: :maxdepth: 2 @@ -46,6 +51,7 @@ explain/index.rst .. dropdown:: Plot Types + :open: .. toctree:: :maxdepth: 2 @@ -53,6 +59,7 @@ ../plot_types/index.rst .. dropdown:: Tutorials + :open: .. toctree:: :maxdepth: 2 @@ -60,6 +67,7 @@ ../tutorials/index.rst .. dropdown:: Example Gallery + :open: .. toctree:: :maxdepth: 2 @@ -70,6 +78,7 @@ .. grid-item-card:: References & Resources .. dropdown:: API Reference + :open: .. toctree:: :maxdepth: 2 @@ -77,6 +86,7 @@ ../api/index.rst .. dropdown:: Release Notes + :open: .. toctree:: :maxdepth: 2 @@ -84,6 +94,7 @@ release_notes.rst .. dropdown:: Troubleshooting + :open: .. toctree:: :maxdepth: 2 @@ -91,6 +102,7 @@ faq/index.rst .. dropdown:: External Resources + :open: .. toctree:: :maxdepth: 2 From 9d45b89e6a1fc74c69b59fa19f48c4eb631a4fb3 Mon Sep 17 00:00:00 2001 From: hannah Date: Mon, 21 Nov 2022 20:12:04 -0500 Subject: [PATCH 5/9] toctree-toggle styled dropdown + responsive grid --- doc/_static/mpl.css | 18 ++++++++++++++++++ doc/users/explain/index.rst | 5 +++-- doc/users/index.rst | 37 +++++++++++++++++++++++-------------- doc/users/project/index.rst | 3 ++- 4 files changed, 46 insertions(+), 17 deletions(-) diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 2483cc194013..5969a5c3ff7c 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -110,3 +110,21 @@ table.property-table td { list-style:none; padding-inline-start:0em; } + +/* styles dropdown like toctree-toggle */ +details.sd-dropdown{ + box-shadow: none !important; +} + +details.sd-dropdown summary.sd-card-header, +details.sd-dropdown summary.sd-card-header+div.sd-summary-content { + --pst-sd-dropdown-color: none; +} + +details.sd-dropdown summary { + /* padding: 1em; */ + padding: 0; + } + + .sd-dropdown>.sd-card-body{ + padding: 0;} diff --git a/doc/users/explain/index.rst b/doc/users/explain/index.rst index c2121667da4b..e094f6050ca4 100644 --- a/doc/users/explain/index.rst +++ b/doc/users/explain/index.rst @@ -2,8 +2,9 @@ .. redirect-from:: /users/explain -Explanations ------------- + +API Documentation +================= .. toctree:: :maxdepth: 2 diff --git a/doc/users/index.rst b/doc/users/index.rst index 8caffb589492..6fd1997ca331 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -2,12 +2,17 @@ .. redirect-from:: /contents -.. -.. grid:: 3 +========== +User guide +========== + +.. grid:: 1 1 3 3 .. grid-item-card:: Information + :shadow: none + :class-card: sd-border-0 - .. dropdown:: Getting Started + .. dropdown:: :doc:`getting_started/index` :open: .. toctree:: @@ -15,7 +20,7 @@ getting_started/index.rst - .. dropdown:: Installation + .. dropdown:: :doc:`installing/index` :open: .. toctree:: @@ -23,7 +28,7 @@ installing/index.rst - .. dropdown:: Contributing + .. dropdown:: :doc:`../devel/index` :open: .. toctree:: @@ -31,7 +36,7 @@ ../devel/index.rst - .. dropdown:: About + .. dropdown:: :doc:`project/index` :open: .. toctree:: @@ -41,8 +46,10 @@ .. grid-item-card:: Explanations & Examples + :shadow: none + :class-card: sd-border-0 - .. dropdown:: API Explanations + .. dropdown:: :doc:`explain/index` :open: .. toctree:: @@ -50,7 +57,7 @@ explain/index.rst - .. dropdown:: Plot Types + .. dropdown:: :doc:`../plot_types/index` :open: .. toctree:: @@ -58,7 +65,7 @@ ../plot_types/index.rst - .. dropdown:: Tutorials + .. dropdown:: :doc:`../tutorials/index` :open: .. toctree:: @@ -66,7 +73,7 @@ ../tutorials/index.rst - .. dropdown:: Example Gallery + .. dropdown:: :doc:`../gallery/index` :open: .. toctree:: @@ -76,8 +83,10 @@ .. grid-item-card:: References & Resources + :shadow: none + :class-card: sd-border-0 - .. dropdown:: API Reference + .. dropdown:: :doc:`../api/index` :open: .. toctree:: @@ -85,7 +94,7 @@ ../api/index.rst - .. dropdown:: Release Notes + .. dropdown:: :doc:`release_notes` :open: .. toctree:: @@ -93,7 +102,7 @@ release_notes.rst - .. dropdown:: Troubleshooting + .. dropdown:: :doc:`faq/index` :open: .. toctree:: @@ -101,7 +110,7 @@ faq/index.rst - .. dropdown:: External Resources + .. dropdown:: :doc:`resources/index` :open: .. toctree:: diff --git a/doc/users/project/index.rst b/doc/users/project/index.rst index 27f60d166abb..f187ce45284c 100644 --- a/doc/users/project/index.rst +++ b/doc/users/project/index.rst @@ -1,7 +1,8 @@ .. redirect-from:: /users/backmatter +=================== Project information -------------------- +=================== .. toctree:: :maxdepth: 2 From b481373d3613c8bb55819c42d7f15d72ba4029b1 Mon Sep 17 00:00:00 2001 From: hannah Date: Mon, 21 Nov 2022 21:14:33 -0500 Subject: [PATCH 6/9] grid instead of card --- doc/users/index.rst | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/users/index.rst b/doc/users/index.rst index 6fd1997ca331..920651ac1f22 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -8,9 +8,7 @@ User guide .. grid:: 1 1 3 3 - .. grid-item-card:: Information - :shadow: none - :class-card: sd-border-0 + .. grid-item:: Information .. dropdown:: :doc:`getting_started/index` :open: @@ -45,9 +43,7 @@ User guide project/index.rst - .. grid-item-card:: Explanations & Examples - :shadow: none - :class-card: sd-border-0 + .. grid-item:: Explanations & Examples .. dropdown:: :doc:`explain/index` :open: @@ -82,9 +78,7 @@ User guide ../gallery/index.rst - .. grid-item-card:: References & Resources - :shadow: none - :class-card: sd-border-0 + .. grid-item:: References & Resources .. dropdown:: :doc:`../api/index` :open: From 7bdebcc8b880207885ab961f21582ab269a82967 Mon Sep 17 00:00:00 2001 From: hannah Date: Tue, 22 Nov 2022 15:35:27 -0500 Subject: [PATCH 7/9] toc-toggle style card grid --- doc/_static/mpl.css | 7 ++++--- doc/users/index.rst | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 5969a5c3ff7c..accfc3f60a7e 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -124,7 +124,8 @@ details.sd-dropdown summary.sd-card-header+div.sd-summary-content { details.sd-dropdown summary { /* padding: 1em; */ padding: 0; - } +} - .sd-dropdown>.sd-card-body{ - padding: 0;} +.sd-dropdown>.sd-card-body{ + padding: 0; +} diff --git a/doc/users/index.rst b/doc/users/index.rst index 920651ac1f22..c26d01a9820b 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -8,7 +8,7 @@ User guide .. grid:: 1 1 3 3 - .. grid-item:: Information + .. grid-item-card:: Information .. dropdown:: :doc:`getting_started/index` :open: @@ -43,7 +43,7 @@ User guide project/index.rst - .. grid-item:: Explanations & Examples + .. grid-item-card:: Explanations & Examples .. dropdown:: :doc:`explain/index` :open: @@ -78,7 +78,7 @@ User guide ../gallery/index.rst - .. grid-item:: References & Resources + .. grid-item-card:: References & Resources .. dropdown:: :doc:`../api/index` :open: From 1ea890120e3e6cf3e823af0b976da3bdd0ae786c Mon Sep 17 00:00:00 2001 From: hannah Date: Tue, 22 Nov 2022 18:27:38 -0500 Subject: [PATCH 8/9] card grid toc-tree dropdown --- doc/users/index.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/users/index.rst b/doc/users/index.rst index c26d01a9820b..6fd1997ca331 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -9,6 +9,8 @@ User guide .. grid:: 1 1 3 3 .. grid-item-card:: Information + :shadow: none + :class-card: sd-border-0 .. dropdown:: :doc:`getting_started/index` :open: @@ -44,6 +46,8 @@ User guide .. grid-item-card:: Explanations & Examples + :shadow: none + :class-card: sd-border-0 .. dropdown:: :doc:`explain/index` :open: @@ -79,6 +83,8 @@ User guide .. grid-item-card:: References & Resources + :shadow: none + :class-card: sd-border-0 .. dropdown:: :doc:`../api/index` :open: From 964234cef6aa3daeb80a4b7369250e335235cb4f Mon Sep 17 00:00:00 2001 From: hannah Date: Wed, 23 Nov 2022 21:49:09 -0500 Subject: [PATCH 9/9] different sizes + top border --- doc/_static/mpl.css | 8 +++++++- doc/users/index.rst | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index accfc3f60a7e..ffbeb5e47f77 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -99,7 +99,6 @@ table.property-table td { display: inline-block; margin: 0 0.5em; } - /* Removes title from toc in dropdwon */ .sd-dropdown>.sd-card-body>.toctree-wrapper>ul>.toctree-l1>a{ @@ -129,3 +128,10 @@ details.sd-dropdown summary { .sd-dropdown>.sd-card-body{ padding: 0; } + +details.sd-sphinx-override.sd-dropdown.sd-card.sd-mb-3{ + border-top-style: solid !important; + border-top-color: var(--pst-color-border) !important; + border-top-width: .1em !important; + border-radius: 0; +} diff --git a/doc/users/index.rst b/doc/users/index.rst index 6fd1997ca331..c6354ec06635 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -11,9 +11,11 @@ User guide .. grid-item-card:: Information :shadow: none :class-card: sd-border-0 + :class-title: sd-fs-4 .. dropdown:: :doc:`getting_started/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -22,6 +24,7 @@ User guide .. dropdown:: :doc:`installing/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -30,6 +33,7 @@ User guide .. dropdown:: :doc:`../devel/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -38,6 +42,7 @@ User guide .. dropdown:: :doc:`project/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -48,9 +53,11 @@ User guide .. grid-item-card:: Explanations & Examples :shadow: none :class-card: sd-border-0 + :class-title: sd-fs-4 .. dropdown:: :doc:`explain/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -59,6 +66,7 @@ User guide .. dropdown:: :doc:`../plot_types/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -67,6 +75,7 @@ User guide .. dropdown:: :doc:`../tutorials/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -75,6 +84,7 @@ User guide .. dropdown:: :doc:`../gallery/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -85,9 +95,11 @@ User guide .. grid-item-card:: References & Resources :shadow: none :class-card: sd-border-0 + :class-title: sd-fs-4 .. dropdown:: :doc:`../api/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -96,6 +108,7 @@ User guide .. dropdown:: :doc:`release_notes` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -104,6 +117,7 @@ User guide .. dropdown:: :doc:`faq/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2 @@ -112,6 +126,7 @@ User guide .. dropdown:: :doc:`resources/index` :open: + :class-title: sd-fs-5 .. toctree:: :maxdepth: 2