Skip to content

Commit 57ca04d

Browse files
authored
chore: update dependencies to latest release (#94)
* chore: update dependencies * refactor: update order of deps to match pip output * chore: fix favicon * style: update css for updated theme * fix: make search work properly with new theme * style: fix sidebar
1 parent 38343af commit 57ca04d

File tree

5 files changed

+87
-127
lines changed

5 files changed

+87
-127
lines changed

_static/css/pydata-overrides.css

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,65 @@
99

1010
html[data-theme="light"] {
1111
--pst-color-primary: var(--dash-blue);
12+
--pst-color-secondary: var(--dash-blue);
1213
--pst-color-link: var(--pst-color-primary);
1314
--pst-color-link-hover: var(--dash-deep-blue);
15+
16+
.search-button-field:hover {
17+
box-shadow: 0 0 0 .1875rem var(--pst-color-primary);
18+
}
19+
20+
#pst-back-to-top:hover {
21+
background-color: var(--pst-color-link-hover);
22+
}
1423
}
1524

1625
html[data-theme="dark"] {
1726
--pst-color-primary: var(--dash-blue);
27+
--pst-color-secondary: var(--pst-color-warning);
1828
--pst-color-link: var(--pst-color-primary);
19-
--pst-color-link-hover: var(--pst-color-warning)
29+
--pst-color-link-hover: var(--pst-color-secondary);
30+
--pst-color-table-row-hover-bg: var(--dash-deep-blue);
31+
32+
/* ReadTheDocs search addon CSS variables*/
33+
/* See details on: https://github.com/readthedocs/addons/blob/0.23.2/src/search.css */
34+
/* --readthedocs-search-color: darkgray;
35+
--readthedocs-search-content-background-color: var(--bs-dark);
36+
--readthedocs-search-content-border-color: gray; */
37+
--readthedocs-search-input-background-color: darkgray;
38+
/* --readthedocs-search-result-section-border-color: darkgray;
39+
--readthedocs-search-result-section-subheading-color: darkgray;
40+
--readthedocs-search-result-section-highlight-color: var(--dash-blue);
41+
--readthedocs-search-filters-border-color: lightgray; */
42+
43+
/* Unused options */
44+
/* --readthedocs-search-font-family, */
45+
/* --readthedocs-search-font-size: 16px; */
46+
/* --readthedocs-search-result-section-color: darkgray; doesn't seem to do anything*/
47+
/* --readthedocs-search-footer-code-background-color, #fff */
48+
/* --readthedocs-search-footer-background-color: rgb(234, 234, 234); */
49+
/* --readthedocs-search-backdrop-color: rgba(0, 0, 0, 0.3); */
50+
51+
:host > div .results h2 {
52+
color: lightgray;
53+
}
54+
55+
select {
56+
background-color: var(--pst-color-background);
57+
}
58+
59+
.pst-navbar-icon:hover {
60+
color: var(--pst-color-link-hover);
61+
}
62+
63+
.pst-navbar-icon:hover:before {
64+
border-bottom: max(3px,.1875rem,.12em) solid var(--pst-color-link-hover);
65+
}
66+
67+
#pst-back-to-top:hover {
68+
background-color: var(--pst-color-link-hover);
69+
color: #000;
70+
}
2071
}
2172

2273
html {
@@ -52,11 +103,6 @@ ol {
52103
font-family: 'Open Sans', sans-serif;
53104
}
54105

55-
p {
56-
font-size: 0.95em;
57-
line-height: 1.5;
58-
}
59-
60106
a.headerlink {
61107
color: var(--pst-color-primary)
62108
}

_static/js/pydata-search-close.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Script to allow use of readthedocs-sphinx-search extension with the pydata theme
22
//
33
// Based in part on:
4-
// https://github.com/pydata/pydata-sphinx-theme/blob/v0.13.3/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js#L167-L272
4+
// https://github.com/pydata/pydata-sphinx-theme/blob/v0.16.1/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js#L177-L333
55

66
/*******************************************************************************
77
* Search
@@ -20,7 +20,7 @@ var findSearchInput = () => {
2020
} else {
2121
// must be at least one persistent form, use the first persistent one
2222
form = document.querySelector(
23-
"div:not(.search-button__search-container) > form.bd-search"
23+
":not(#pst-search-dialog) > form.bd-search",
2424
);
2525
}
2626
return form.querySelector("input");
@@ -30,11 +30,14 @@ var findSearchInput = () => {
3030
// Hide Pydata theme's search
3131
var hidePydataSearch = () => {
3232
let input = findSearchInput();
33-
let searchPopupWrapper = document.querySelector(".search-button__wrapper");
34-
let hiddenInput = searchPopupWrapper.querySelector("input");
33+
34+
// if the input field is the hidden one (the one associated with the
35+
// search button) then toggle the button state (to show/hide the field)
36+
const searchDialog = document.getElementById("pst-search-dialog");
37+
const hiddenInput = searchDialog.querySelector("input");
3538

3639
if (input === hiddenInput) {
37-
searchPopupWrapper.classList.remove("show");
40+
searchDialog.close();
3841
}
3942

4043
if (document.activeElement === input) {

0 commit comments

Comments
 (0)