From 3dd79148e78470e990ba03f542d05b72f050e004 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 16 Mar 2021 06:01:51 -0600 Subject: [PATCH 1/5] Disable sticky sidebar for the time being --- docs/_static/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_static/css/style.css b/docs/_static/css/style.css index 2f985f3c..bddee85a 100644 --- a/docs/_static/css/style.css +++ b/docs/_static/css/style.css @@ -8,8 +8,8 @@ max-width: 1600px !important; } -/* Make sidebar sticky */ +/* Make sidebar sticky .bd-sidebar { position: sticky !important; -} +} */ From 6b040648ac62bcdf6a90f03d91a6de438cde26b6 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 16 Mar 2021 06:23:17 -0600 Subject: [PATCH 2/5] Disable hypothesis --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index e74d06fd..9f95c035 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -55,7 +55,7 @@ comments_config = { 'utterances': {'repo': 'NCAR/pop-tools', 'optional': 'config', 'label': '💬 comment'}, - 'hypothesis': True, + 'hypothesis': False, } extlinks = { From 5bac9f349388ac6964e49b29fe12f50559e88403 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 16 Mar 2021 06:48:20 -0600 Subject: [PATCH 3/5] Update CSS --- docs/_static/css/style.css | 248 ++++++++++++++++++++++++++++++++++++- 1 file changed, 245 insertions(+), 3 deletions(-) diff --git a/docs/_static/css/style.css b/docs/_static/css/style.css index bddee85a..a08d26cf 100644 --- a/docs/_static/css/style.css +++ b/docs/_static/css/style.css @@ -8,8 +8,250 @@ max-width: 1600px !important; } -/* Make sidebar sticky +/* Copied from +https://github.com/bokeh/bokeh/blob/branch-2.4/sphinx/source/bokeh/static/custom.css +*/ + +:root { + /* Logo image height + all the paddings/margins make the navbar height. */ + --navbar-height: calc(30px + 0.3125rem * 2 + 0.5rem * 2); +} + +.bd-search { + position: relative; + padding-bottom: 20px; +} + +@media (min-width: 768px) { + .search-front-page { + width: 50%; + } +} + +/* minimal copy paste from bootstrap docs css to get sidebars working */ + +.bd-toc { + -ms-flex-order: 2; + order: 2; + padding-top: 1.5rem; + padding-bottom: 1.5rem; + /* font-size: 0.875rem; */ + /* add scrolling sidebar */ + height: calc(100vh - 2rem); + overflow-y: auto; +} + +@supports ((position: -webkit-sticky) or (position: sticky)) { + .bd-toc { + position: -webkit-sticky; + position: sticky; + top: 4rem; + height: calc(100vh - 4rem); + overflow-y: auto; + } +} + +.section-nav { + padding-left: 0; + border-left: 1px solid #eee; + border-bottom: none; +} + +.section-nav ul { + padding-left: 1rem; +} + +.toc-entry { + display: block; +} + +.toc-entry a { + display: block; + padding: 0.125rem 1.5rem; + color: #77757a; +} + +.toc-entry a:hover { + color: rgba(0, 0, 0, 0.85); + text-decoration: none; +} .bd-sidebar { - position: sticky !important; -} */ + -ms-flex-order: 0; + order: 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); +} + +@media (min-width: 768px) { + .bd-sidebar { + border-right: 1px solid rgba(0, 0, 0, 0.1); + } + @supports ((position: -webkit-sticky) or (position: sticky)) { + .bd-sidebar { + position: -webkit-sticky; + position: sticky; + top: var(--navbar-height); + z-index: 1000; + height: calc(100vh - var(--navbar-height)); + } + } +} + +@media (min-width: 1200px) { + .bd-sidebar { + -ms-flex: 0 1 320px; + flex: 0 1 320px; + } +} + +.bd-links { + padding-top: 1rem; + padding-bottom: 1rem; + margin-right: -15px; + margin-left: -15px; +} + +@media (min-width: 768px) { + @supports ((position: -webkit-sticky) or (position: sticky)) { + .bd-links { + max-height: calc(100vh - 9rem); + overflow-y: auto; + } + } +} + +@media (min-width: 768px) { + .bd-links { + display: block !important; + } +} + +.bd-sidenav { + display: none; +} + +.bd-toc-link { + display: block; + padding: 0.25rem 1.5rem; + font-weight: 400; + color: rgba(0, 0, 0, 0.65); +} + +.bd-toc-link:hover { + color: rgba(0, 0, 0, 0.85); + text-decoration: none; +} + +.bd-toc-item.active { + margin-bottom: 1rem; +} + +.bd-toc-item.active:not(:first-child) { + margin-top: 1rem; +} + +.bd-toc-item.active > .bd-toc-link { + color: rgba(0, 0, 0, 0.85); +} + +.bd-toc-item.active > .bd-toc-link:hover { + background-color: transparent; +} + +.bd-toc-item.active > .bd-sidenav { + display: block; +} + +.bd-sidebar .nav > li > a { + display: block; + padding: 0.25rem 1.5rem; + font-size: 90%; + color: rgba(0, 0, 0, 0.65); +} + +.bd-sidebar .nav > li > a:hover { + color: rgba(0, 0, 0, 0.85); + text-decoration: none; + background-color: transparent; +} + +.bd-sidebar .nav > .active > a, +.bd-sidebar .nav > .active:hover > a { + font-weight: 400; + color: #130654; + /* adjusted from original + color: rgba(0, 0, 0, 0.85); + background-color: transparent; */ +} + +.bd-sidebar .nav > li > ul { + list-style: none; + padding: 0.25rem 1.5rem; +} + +.bd-sidebar .nav > li > ul > li > a { + display: block; + padding: 0.25rem 1.5rem; + font-size: 90%; + color: rgba(0, 0, 0, 0.65); +} + +.bd-sidebar .nav > li > ul > .active > a, +.bd-sidebar .nav > li > ul > .active:hover > a { + font-weight: 400; + color: #542437; +} + +dt:target { + background-color: initial; +} + +/* Offsetting anchored elements within the main content to adjust for fixed header + https://github.com/pandas-dev/pandas-sphinx-theme/issues/6 */ +main *:target::before { + display: block; + content: ''; + height: var(--navbar-height); + margin-top: calc(-1 * var(--navbar-height)); +} + +body { + /* Add padding to body to avoid overlap with navbar. */ + padding-top: var(--navbar-height); + width: 100%; +} + +/* adjust toc font sizes to improve overview */ +.toc-h2 { + font-size: 0.85rem; +} + +.toc-h3 { + font-size: 0.75rem; +} + +.toc-h4 { + font-size: 0.65rem; +} + +.toc-entry > .nav-link.active { + font-weight: 400; + color: #542437; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +.nav-link:hover { + border-style: none; +} + +/* Collapsing of the TOC sidebar while scrolling */ + +/* Nav: hide second level (shown on .active) */ +.bd-toc .nav .nav { + display: none; +} + +.bd-toc .nav > .active > ul { + display: block; +} From 24caf7c6af518d9130601bf7fdc123432a2748b6 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 16 Mar 2021 07:07:41 -0600 Subject: [PATCH 4/5] Disable custom css --- docs/_static/css/style.css | 17 ++++++----------- docs/source/conf.py | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/_static/css/style.css b/docs/_static/css/style.css index a08d26cf..25ed992e 100644 --- a/docs/_static/css/style.css +++ b/docs/_static/css/style.css @@ -1,19 +1,19 @@ /* Reduce left and right margins */ -.container, +/* .container, .container-lg, .container-md, .container-sm, .container-xl { max-width: 1600px !important; -} +} */ /* Copied from https://github.com/bokeh/bokeh/blob/branch-2.4/sphinx/source/bokeh/static/custom.css */ -:root { - /* Logo image height + all the paddings/margins make the navbar height. */ +/* Logo image height + all the paddings/margins make the navbar height. */ +/* :root { --navbar-height: calc(30px + 0.3125rem * 2 + 0.5rem * 2); } @@ -26,7 +26,7 @@ https://github.com/bokeh/bokeh/blob/branch-2.4/sphinx/source/bokeh/static/custom .search-front-page { width: 50%; } -} +} */ /* minimal copy paste from bootstrap docs css to get sidebars working */ @@ -35,8 +35,6 @@ https://github.com/bokeh/bokeh/blob/branch-2.4/sphinx/source/bokeh/static/custom order: 2; padding-top: 1.5rem; padding-bottom: 1.5rem; - /* font-size: 0.875rem; */ - /* add scrolling sidebar */ height: calc(100vh - 2rem); overflow-y: auto; } @@ -179,9 +177,6 @@ https://github.com/bokeh/bokeh/blob/branch-2.4/sphinx/source/bokeh/static/custom .bd-sidebar .nav > .active:hover > a { font-weight: 400; color: #130654; - /* adjusted from original - color: rgba(0, 0, 0, 0.85); - background-color: transparent; */ } .bd-sidebar .nav > li > ul { @@ -215,8 +210,8 @@ main *:target::before { margin-top: calc(-1 * var(--navbar-height)); } +/* Add padding to body to avoid overlap with navbar. */ body { - /* Add padding to body to avoid overlap with navbar. */ padding-top: var(--navbar-height); width: 100%; } diff --git a/docs/source/conf.py b/docs/source/conf.py index 9f95c035..81791de6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -175,7 +175,7 @@ html_static_path = ['../_static'] -html_css_files = ['css/style.css'] +# html_css_files = ['css/style.css'] today_fmt = '%Y-%m-%d' From d82493559f68ed023a45ccb61a11a44eb82406a0 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Tue, 16 Mar 2021 08:23:43 -0600 Subject: [PATCH 5/5] Remove sticky sidebar CSS --- docs/_static/css/style.css | 245 +------------------------------------ docs/source/conf.py | 2 +- 2 files changed, 2 insertions(+), 245 deletions(-) diff --git a/docs/_static/css/style.css b/docs/_static/css/style.css index 25ed992e..2ea00d67 100644 --- a/docs/_static/css/style.css +++ b/docs/_static/css/style.css @@ -1,252 +1,9 @@ /* Reduce left and right margins */ -/* .container, +.container, .container-lg, .container-md, .container-sm, .container-xl { max-width: 1600px !important; -} */ - -/* Copied from -https://github.com/bokeh/bokeh/blob/branch-2.4/sphinx/source/bokeh/static/custom.css -*/ - -/* Logo image height + all the paddings/margins make the navbar height. */ -/* :root { - --navbar-height: calc(30px + 0.3125rem * 2 + 0.5rem * 2); -} - -.bd-search { - position: relative; - padding-bottom: 20px; -} - -@media (min-width: 768px) { - .search-front-page { - width: 50%; - } -} */ - -/* minimal copy paste from bootstrap docs css to get sidebars working */ - -.bd-toc { - -ms-flex-order: 2; - order: 2; - padding-top: 1.5rem; - padding-bottom: 1.5rem; - height: calc(100vh - 2rem); - overflow-y: auto; -} - -@supports ((position: -webkit-sticky) or (position: sticky)) { - .bd-toc { - position: -webkit-sticky; - position: sticky; - top: 4rem; - height: calc(100vh - 4rem); - overflow-y: auto; - } -} - -.section-nav { - padding-left: 0; - border-left: 1px solid #eee; - border-bottom: none; -} - -.section-nav ul { - padding-left: 1rem; -} - -.toc-entry { - display: block; -} - -.toc-entry a { - display: block; - padding: 0.125rem 1.5rem; - color: #77757a; -} - -.toc-entry a:hover { - color: rgba(0, 0, 0, 0.85); - text-decoration: none; -} - -.bd-sidebar { - -ms-flex-order: 0; - order: 0; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); -} - -@media (min-width: 768px) { - .bd-sidebar { - border-right: 1px solid rgba(0, 0, 0, 0.1); - } - @supports ((position: -webkit-sticky) or (position: sticky)) { - .bd-sidebar { - position: -webkit-sticky; - position: sticky; - top: var(--navbar-height); - z-index: 1000; - height: calc(100vh - var(--navbar-height)); - } - } -} - -@media (min-width: 1200px) { - .bd-sidebar { - -ms-flex: 0 1 320px; - flex: 0 1 320px; - } -} - -.bd-links { - padding-top: 1rem; - padding-bottom: 1rem; - margin-right: -15px; - margin-left: -15px; -} - -@media (min-width: 768px) { - @supports ((position: -webkit-sticky) or (position: sticky)) { - .bd-links { - max-height: calc(100vh - 9rem); - overflow-y: auto; - } - } -} - -@media (min-width: 768px) { - .bd-links { - display: block !important; - } -} - -.bd-sidenav { - display: none; -} - -.bd-toc-link { - display: block; - padding: 0.25rem 1.5rem; - font-weight: 400; - color: rgba(0, 0, 0, 0.65); -} - -.bd-toc-link:hover { - color: rgba(0, 0, 0, 0.85); - text-decoration: none; -} - -.bd-toc-item.active { - margin-bottom: 1rem; -} - -.bd-toc-item.active:not(:first-child) { - margin-top: 1rem; -} - -.bd-toc-item.active > .bd-toc-link { - color: rgba(0, 0, 0, 0.85); -} - -.bd-toc-item.active > .bd-toc-link:hover { - background-color: transparent; -} - -.bd-toc-item.active > .bd-sidenav { - display: block; -} - -.bd-sidebar .nav > li > a { - display: block; - padding: 0.25rem 1.5rem; - font-size: 90%; - color: rgba(0, 0, 0, 0.65); -} - -.bd-sidebar .nav > li > a:hover { - color: rgba(0, 0, 0, 0.85); - text-decoration: none; - background-color: transparent; -} - -.bd-sidebar .nav > .active > a, -.bd-sidebar .nav > .active:hover > a { - font-weight: 400; - color: #130654; -} - -.bd-sidebar .nav > li > ul { - list-style: none; - padding: 0.25rem 1.5rem; -} - -.bd-sidebar .nav > li > ul > li > a { - display: block; - padding: 0.25rem 1.5rem; - font-size: 90%; - color: rgba(0, 0, 0, 0.65); -} - -.bd-sidebar .nav > li > ul > .active > a, -.bd-sidebar .nav > li > ul > .active:hover > a { - font-weight: 400; - color: #542437; -} - -dt:target { - background-color: initial; -} - -/* Offsetting anchored elements within the main content to adjust for fixed header - https://github.com/pandas-dev/pandas-sphinx-theme/issues/6 */ -main *:target::before { - display: block; - content: ''; - height: var(--navbar-height); - margin-top: calc(-1 * var(--navbar-height)); -} - -/* Add padding to body to avoid overlap with navbar. */ -body { - padding-top: var(--navbar-height); - width: 100%; -} - -/* adjust toc font sizes to improve overview */ -.toc-h2 { - font-size: 0.85rem; -} - -.toc-h3 { - font-size: 0.75rem; -} - -.toc-h4 { - font-size: 0.65rem; -} - -.toc-entry > .nav-link.active { - font-weight: 400; - color: #542437; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -.nav-link:hover { - border-style: none; -} - -/* Collapsing of the TOC sidebar while scrolling */ - -/* Nav: hide second level (shown on .active) */ -.bd-toc .nav .nav { - display: none; -} - -.bd-toc .nav > .active > ul { - display: block; } diff --git a/docs/source/conf.py b/docs/source/conf.py index 81791de6..9f95c035 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -175,7 +175,7 @@ html_static_path = ['../_static'] -# html_css_files = ['css/style.css'] +html_css_files = ['css/style.css'] today_fmt = '%Y-%m-%d'