File tree Expand file tree Collapse file tree 4 files changed +33
-25
lines changed Expand file tree Collapse file tree 4 files changed +33
-25
lines changed Original file line number Diff line number Diff line change 2929 --pst-color-h2 : var (--color-text-base );
3030 /* Use softer blue from bootstrap's default info color */
3131 --pst-color-info : 23 , 162 , 184 ;
32- --pst-header-height : 0px ;
3332}
3433
3534code {
@@ -40,16 +39,34 @@ code {
4039 text-align : center;
4140}
4241
42+ /* Limit both light and dark mode logos in the navbar */
43+ .logo__image {
44+ height : 32px ;
45+ width : auto;
46+ max-height : 2.5rem ;
47+ }
48+
4349/* Display appropriate logo for dark and light mode */
44- .light-logo { display : inline; }
45- .dark-logo { display : none; }
46-
47- @media (prefers-color-scheme : dark) {
48- .light-logo { display : none; }
49- .dark-logo {
50- display : inline;
51- background-color : transparent !important ;
52- }
50+ .light-logo {
51+ display : inline;
52+ }
53+
54+ .dark-logo {
55+ display : none;
56+ }
57+
58+ html [data-theme = "dark" ] .light-logo {
59+ display : none;
60+ }
61+
62+ html [data-theme = "dark" ] .dark-logo {
63+ display : inline;
64+ background-color : transparent !important ;
65+ }
66+
67+ /* Align search bar & theme switch right */
68+ .navbar-header-items__end {
69+ margin-left : auto;
5370}
5471
5572/* Ensure the logo is properly displayed */
Original file line number Diff line number Diff line change 1- < p >
2- < a href ="{{ pathto(master_doc) }} ">
3- < img src ="{{ pathto('_static/images/original.svg', 1) }} " class ="logo light-logo " alt ="logo ">
4- < img src ="{{ pathto('_static/images/original_dark.svg', 1) }} " class ="logo dark-logo " alt ="logo ">
5- </ a >
6- </ p >
7- < p >
8- < form class ="bd-search d-flex align-items-center " action ="{{ pathto('search') }} " method ="get ">
9- < input type ="search " class ="form-control " name ="q " id ="search-input " placeholder ="{{ theme_search_bar_text }} " aria-label ="{{ theme_search_bar_text }} " autocomplete ="off " >
10- </ form >
11- </ p>
121< nav class ="bd-links " id ="bd-docs-nav " aria-label ="Main navigation ">
132
143 < div class ="bd-toc-item active ">
Original file line number Diff line number Diff line change 11{% extends "pydata_sphinx_theme/layout.html" %}
22
3- {# Silence the navbar #}
4- {% block docs_navbar %}
5- {% endblock %}
6-
73<!--
84 Custom footer
95-->
Original file line number Diff line number Diff line change 8888html_theme = "pydata_sphinx_theme"
8989
9090html_theme_options = {
91+ "logo" : {
92+ "image_light" : "_static/images/original.svg" ,
93+ "image_dark" : "_static/images/original_dark.svg" ,
94+ },
9195 "use_edit_page_button" : True ,
96+ "navbar_center" : [],
97+ "navbar_end" : ["theme-switcher" ],
9298}
9399
94100html_context = {
You can’t perform that action at this time.
0 commit comments