From 13a2d27c161a19ca93586e299f101b212e0e7622 Mon Sep 17 00:00:00 2001 From: parth Date: Thu, 29 Jan 2026 19:23:27 +0530 Subject: [PATCH 1/3] Improve navbar alignment Signed-off-by: parth --- docs/source/_static/css/custom.css | 5 +++++ docs/source/conf.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css index 54986a5..eb668fc 100644 --- a/docs/source/_static/css/custom.css +++ b/docs/source/_static/css/custom.css @@ -86,3 +86,8 @@ body[data-hide-sidebar="true"] .bd-main { flex-grow: 1; max-width: 75%; } + +.bd-header .navbar-header-items__start { + margin-right: 0 !important; + padding-right: 1.5rem; +} diff --git a/docs/source/conf.py b/docs/source/conf.py index a32dbb9..d7a2658 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,7 +69,7 @@ html_theme_options = { "navbar_start": ["navbar-logo"], - "navbar_center": ["navbar-nav"], + "navbar_align": "left", "icon_links": [ { "name": "GitHub", From 08a01794b0d45c6ee8431449216a71c07cec7c45 Mon Sep 17 00:00:00 2001 From: parth Date: Thu, 29 Jan 2026 22:00:45 +0530 Subject: [PATCH 2/3] Also updated in {{cookiecutter.package}} Signed-off-by: parth --- {{cookiecutter.package_name}}/docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/{{cookiecutter.package_name}}/docs/source/conf.py b/{{cookiecutter.package_name}}/docs/source/conf.py index f37696b..1755e1e 100644 --- a/{{cookiecutter.package_name}}/docs/source/conf.py +++ b/{{cookiecutter.package_name}}/docs/source/conf.py @@ -92,6 +92,7 @@ # Customize the theme html_theme_options = { + "navbar_align": "left", "icon_links": [ { # Label for this link From 71df7b36c0619098fd4466afd896f15ec903b124 Mon Sep 17 00:00:00 2001 From: parth Date: Thu, 5 Feb 2026 18:50:46 +0530 Subject: [PATCH 3/3] Inculding css file in cookiecutter_Package Signed-off-by: parth --- .../docs/source/_static/css/custom.css | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 {{cookiecutter.package_name}}/docs/source/_static/css/custom.css diff --git a/{{cookiecutter.package_name}}/docs/source/_static/css/custom.css b/{{cookiecutter.package_name}}/docs/source/_static/css/custom.css new file mode 100644 index 0000000..eb668fc --- /dev/null +++ b/{{cookiecutter.package_name}}/docs/source/_static/css/custom.css @@ -0,0 +1,93 @@ +html[data-theme=dark] { + --pst-color-primary: #04B46D; + --pst-color-link: var(--pst-color-primary); + } + +html[data-theme=light] { + --pst-color-primary: #03A062; + --pst-color-link: var(--pst-color-primary); +} + +body .bd-article-container { +max-width: 100em !important; +} +/* Custom CSS for the documentation site */ +/* prevent logo from being too wide and text clashing with next item */ +/* See https://github.com/pydata/pydata-sphinx-theme/issues/1143#issuecomment-2468763375 */ + +.navbar-header-items__start .navbar-item { + width: 100%; +} + +.navbar-item .navbar-brand { + width: 100%; +} + +.navbar-brand img { + min-width: 0; + height: auto; + max-height: 100%; + flex-shrink: 1; +} + +.navbar-brand p { + flex: 0 1 auto; +} + +/* sponsors */ + +.col { +flex: 0 0 50%; +max-width: 50%; +} + +.img-sponsor { +height: 50px; +padding-top: 5px; +padding-right: 5px; +padding-bottom: 5px; +padding-left: 5px; +} + +.things-in-a-row { +display: flex; +flex-wrap: wrap; +justify-content: space-between; +} + +/* grids to match theme colors */ +.sd-card-icon { + color: var(--sd-color-primary); + font-size: 1.5em; + margin-bottom: 0.5rem; +} + +.sd-card { + padding: 1.5rem; + transition: transform 0.2s; +} + +.sd-card:hover { + transform: translateY(-5px); +} + +/* Ensuring content area uses full width when sidebar is hidden */ +.bd-page-width { + max-width: 90% !important; +} + +/* Hide sidebar on pages with hide-sidebar metadata */ +body[data-hide-sidebar="true"] .bd-sidebar-primary { + display: none !important; +} + +/* Expand content width when sidebar hidden */ +body[data-hide-sidebar="true"] .bd-main { + flex-grow: 1; + max-width: 75%; +} + +.bd-header .navbar-header-items__start { + margin-right: 0 !important; + padding-right: 1.5rem; +}