Skip to content

Commit

Permalink
fix: switch dark theme for banner with sphinx-book-theme (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
njzjz and pre-commit-ci[bot] authored Oct 27, 2024
1 parent d159549 commit 8d20692
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion deepmodeling_sphinx/banner.css
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,36 @@ under MIT license
}

@media (prefers-color-scheme: dark) {
/* Dark mode */
/* skip sphinx-book-theme */
html:not([data-theme]) {
/* Dark mode */
.header-holder {
background-color: #1e1e1e;
}
.header-logo::after {
color: #ffffff;
}
.header-holder .main-menu ul li a {
color: #ffffff;
}
.resources-dropdown-menu {
color: #ffffff;
background-color: #1e1e1e;
}
.header-holder .main-menu ul li a.nav-dropdown-item {
color: #ffffff;
}
.header-holder .main-menu ul li a.nav-dropdown-item .dropdown-title {
color: #ffffff;
}
.wy-body-for-nav {
background-color: #1e1e1e;
}
}
}

html[data-theme="dark"] {
/* sphinx-book-theme Dark mode */
.header-holder {
background-color: #1e1e1e;
}
Expand Down

0 comments on commit 8d20692

Please sign in to comment.