Skip to content

Commit 4dc6f1f

Browse files
DON-BRANsanketverma1704joshmoore
authored
changed documentation theme to pydata_sphinx_theme (#1242)
* changed documentation theme to pydata_sphinx_theme * updated documentation layout * Update docs/index.rst Co-authored-by: Sanket Verma <[email protected]> * Updated Acknowledgements section and added twitter icon * Added client-side javascript redirects * Add more redirects * Minor tweaks and added acknowledgments.rst * Added acknowledgments.html to redirect * Add indices from the old main page --------- Co-authored-by: Sanket Verma <[email protected]> Co-authored-by: Josh Moore <[email protected]>
1 parent e9fb1f3 commit 4dc6f1f

12 files changed

+681
-159
lines changed

docs/_static/custom.css

Lines changed: 110 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,123 @@
1-
/* override text color */
2-
.wy-menu-vertical a {
3-
color: #000000;
1+
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap');
2+
3+
.navbar-brand img {
4+
height: 75px;
5+
}
6+
.navbar-brand {
7+
height: 75px;
8+
}
9+
10+
body {
11+
font-family: 'Open Sans', sans-serif;
12+
}
13+
14+
pre, code {
15+
font-size: 100%;
16+
line-height: 155%;
17+
}
18+
19+
/* Style the active version button.
20+
21+
- dev: orange
22+
- stable: green
23+
- old, PR: red
24+
25+
Colors from:
26+
27+
Wong, B. Points of view: Color blindness.
28+
Nat Methods 8, 441 (2011). https://doi.org/10.1038/nmeth.1618
29+
*/
30+
31+
/* If the active version has the name "dev", style it orange */
32+
#version_switcher_button[data-active-version-name*="dev"] {
33+
background-color: #E69F00;
34+
border-color: #E69F00;
35+
color:#000000;
36+
}
37+
38+
/* green for `stable` */
39+
#version_switcher_button[data-active-version-name*="stable"] {
40+
background-color: #009E73;
41+
border-color: #009E73;
42+
}
43+
44+
/* red for `old` */
45+
#version_switcher_button:not([data-active-version-name*="stable"], [data-active-version-name*="dev"], [data-active-version-name=""]) {
46+
background-color: #980F0F;
47+
border-color: #980F0F;
448
}
549

6-
/* Sidebar background color */
7-
.wy-nav-side, div.wy-side-nav-search {
8-
background-color: rgb(198, 197, 213, 0); /* full alpha */
50+
/* Main page overview cards */
51+
52+
.sd-card {
53+
background: #fff;
54+
border-radius: 0;
55+
padding: 30px 10px 20px 10px;
56+
margin: 10px 0px;
57+
}
58+
59+
.sd-card .sd-card-header {
60+
text-align: center;
61+
}
62+
63+
.sd-card .sd-card-header .sd-card-text {
64+
margin: 0px;
65+
}
66+
67+
.sd-card .sd-card-img-top {
68+
height: 52px;
69+
width: 52px;
70+
margin-left: auto;
71+
margin-right: auto;
72+
}
73+
74+
.sd-card .sd-card-header {
75+
border: none;
76+
background-color: white;
77+
color: #150458 !important;
78+
font-size: var(--pst-font-size-h5);
79+
font-weight: bold;
80+
padding: 2.5rem 0rem 0.5rem 0rem;
81+
}
82+
83+
.sd-card .sd-card-footer {
84+
border: none;
85+
background-color: white;
86+
}
87+
88+
.sd-card .sd-card-footer .sd-card-text {
89+
max-width: 220px;
90+
margin-left: auto;
91+
margin-right: auto;
92+
}
93+
94+
/* Dark theme tweaking */
95+
html[data-theme=dark] .sd-card img[src*='.svg'] {
96+
filter: invert(0.82) brightness(0.8) contrast(1.2);
997
}
1098

11-
/* Sidebar link click color */
12-
.wy-menu-vertical .toctree-l1 > a:active {
13-
background-color: rgb(198, 197, 213);
14-
color: rgb(0, 0, 0);
99+
/* Main index page overview cards */
100+
html[data-theme=dark] .sd-card {
101+
background-color:var(--pst-color-background);
15102
}
16103

17-
/* Link color is darker to make hovering more clear */
18-
.wy-menu-vertical .toctree-l1 > a:hover {
19-
background-color: rgb(198, 197, 213);
20-
color: rgb(0, 0, 0);
104+
html[data-theme=dark] .sd-shadow-sm {
105+
box-shadow: 0 .1rem 1rem rgba(250, 250, 250, .6) !important
21106
}
22107

23-
.wy-menu-vertical li.current > a:hover, .wy-menu-vertical li.current > a:active {
24-
color: #404040;
25-
background-color: #F5F5F5;
108+
html[data-theme=dark] .sd-card .sd-card-header {
109+
background-color:var(--pst-color-background);
110+
color: #150458 !important;
26111
}
27112

28-
/* On hover over logo */
29-
.wy-side-nav-search > a:hover, .wy-side-nav-search .wy-dropdown > a:hover {
30-
background: inherit;
113+
html[data-theme=dark] .sd-card .sd-card-footer {
114+
background-color:var(--pst-color-background);
31115
}
32116

33-
/* Border around search box */
34-
.wy-side-nav-search input[type="text"] {
35-
border: 0px;
117+
html[data-theme=dark] h1 {
118+
color: var(--pst-color-primary);
36119
}
120+
121+
html[data-theme=dark] h3 {
122+
color: #0a6774;
123+
}

docs/_static/custom.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// handle redirects
2+
(() => {
3+
let anchorMap = {
4+
"installation": "installation.html",
5+
"getting-started": "getting_started.html#getting-started",
6+
"highlights": "getting_started.html#highlights",
7+
"contributing": "contributing.html",
8+
"projects-using-zarr": "getting_started.html#projects-using-zarr",
9+
"acknowledgments": "acknowledgments.html",
10+
"contents": "getting_started.html#contents",
11+
"indices-and-tables": "api.html#indices-and-tables"
12+
}
13+
14+
let hash = window.location.hash.substring(1);
15+
if (hash) {
16+
window.location.replace(anchorMap[hash]);
17+
}
18+
})();

docs/_static/index_api.svg

Lines changed: 97 additions & 0 deletions
Loading

docs/_static/index_contribute.svg

Lines changed: 76 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)