Skip to content

Commit d8cea15

Browse files
committed
updated theme
1 parent 5c097af commit d8cea15

6 files changed

Lines changed: 137 additions & 179 deletions

File tree

docs/_static/custom.css

Lines changed: 37 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,66 @@
11
/*
2-
* Customization of Alabaster theme
3-
* per https://alabaster.readthedocs.io/en/latest/customization.html#custom-stylesheet
2+
* Minimal overrides on top of pydata-sphinx-theme.
3+
* Keep the theme's default colors and code styling.
44
*/
55

6-
/* "Quick Search" should be capitalized. */
7-
div#searchbox h3 {
8-
text-transform: capitalize;
6+
.bd-header .navbar-header-items {
7+
flex: 1 1 auto;
98
}
109

11-
/* Much-improved spacing around code blocks. */
12-
div.highlight pre {
13-
padding: 1ex;
10+
.bd-header .navbar-brand {
11+
font-weight: 700;
1412
}
1513

16-
/* Reduce space between paragraphs for better visual structure */
17-
p {
18-
margin: 1ex 0;
14+
.bd-header .navbar-header-items__end,
15+
.bd-header .navbar-persistent--container {
16+
margin-left: auto;
17+
justify-content: flex-end;
1918
}
2019

21-
/* Hide "view source code" links by default, only show on hover */
22-
dt .viewcode-link {
23-
visibility: hidden;
24-
font-size: 70%;
20+
.sidebar-tree .sidebar-header-items__title {
21+
font-weight: 700;
22+
margin-bottom: 0.75rem;
2523
}
2624

27-
dt:hover .viewcode-link {
28-
visibility: visible;
29-
}
30-
31-
/* More breathing space between successive methods */
32-
dl {
33-
margin-bottom: 1.5em;
34-
}
35-
36-
dl.field-list > dt {
37-
/* Cleaner aligning of Parameters/Returns/Raises listing with method description paragraphs */
25+
.sidebar-tree ul {
26+
list-style: none;
3827
padding-left: 0;
39-
/* Make Parameters/Returns/Raises labels less dominant */
40-
text-transform: uppercase;
41-
font-size: 70%;
42-
}
43-
44-
.sidebar-meta {
45-
font-size: 80%;
46-
}
47-
48-
div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 {
49-
margin: 1.5em 0 0.5em 0;
50-
}
51-
52-
div.body h1 {
53-
margin: 0 0 0.5em 0;
54-
}
55-
56-
.toctree-l1 {
57-
padding: 0.1em 0.5em;
58-
margin-left: -0.5em;
59-
}
60-
61-
div.sphinxsidebar .toctree-l1 a {
62-
border: none;
63-
}
64-
65-
.toctree-l1.current {
66-
background-color: #f3f5f7;
67-
border-right: 0.5rem solid #a2cedb;
68-
}
69-
70-
71-
div.admonition,
72-
div.versionadded,
73-
.py div.versionchanged,
74-
.py div.deprecated {
75-
padding: 0.5em 1em;
76-
border-style: solid;
77-
border-width: 0 0 0 0.5rem;
78-
border-color: #cccccc;
79-
background-color: #f3f5f7;
80-
}
81-
82-
div.admonition :first-child,
83-
div.versionadded :first-child,
84-
.py div.versionchanged :first-child,
85-
.py div.deprecated :first-child {
86-
margin-top: 0;
87-
}
88-
89-
90-
div.admonition :last-child,
91-
div.versionadded :last-child,
92-
.py div.versionchanged :last-child,
93-
.py div.deprecated :last-child {
9428
margin-bottom: 0;
9529
}
9630

97-
div.admonition p.admonition-title {
98-
font-size: 80%;
99-
text-transform: uppercase;
100-
font-weight: bold;
31+
.sidebar-tree ul ul {
32+
padding-left: 1rem;
10133
}
10234

103-
div.admonition.note,
104-
div.admonition.tip,
105-
div.admonition.seealso,
106-
div.admonition.hint,
107-
div.versionadded,
108-
.py div.versionchanged {
109-
border-left-color: #42b983;
35+
.sidebar-tree li {
36+
list-style: none;
11037
}
11138

112-
div.admonition.warning,
113-
div.admonition.attention,
114-
div.admonition.caution,
115-
div.admonition.danger,
116-
div.admonition.error,
117-
div.admonition.important,
118-
.py div.deprecated {
119-
border-left-color: #b9425e;
39+
.sidebar-tree a {
40+
text-decoration: none;
12041
}
12142

43+
.sidebar-meta {
44+
margin-top: 1.5rem;
45+
padding-top: 1rem;
46+
border-top: 1px solid var(--pst-color-border);
47+
font-size: 0.95rem;
48+
}
12249

123-
pre {
124-
background-color: #e2f0f4;
50+
.sidebar-meta h3 {
51+
margin-bottom: 0.75rem;
52+
font-size: 1rem;
12553
}
12654

127-
.highlight-default, .highlight-python, .highlight-pycon, .highlight-shell , .highlight-text {
128-
border-right: 0.5rem solid #a2cedb;
55+
.sidebar-meta div {
56+
margin-bottom: 0.1rem;
57+
line-height: 1.25;
12958
}
13059

131-
.highlight span.linenos {
132-
color: #888;
133-
font-size: 75%;
134-
padding: 0 1ex;
60+
.bd-content .document p {
61+
margin-bottom: 1rem;
13562
}
13663

137-
nav.contents.local {
138-
border: none;
64+
.bd-content .document dt {
65+
scroll-margin-top: 5rem;
13966
}

docs/_templates/globaltoc.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="sidebar-tree">
2+
{{ toctree(maxdepth=2, collapse=True, includehidden=True, titles_only=True) }}
3+
</div>

docs/_templates/hacks.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
<!-- Alabaster (krTheme++) Hacks -->
2-
31
<div class="sidebar-meta">
4-
<h3>Meta</h3>
5-
<div>Docs for {{ project }}</div>
6-
<div>Version: <code>{{ release }}</code></div>
7-
<div>Last updated: {{ last_updated }}</div>
2+
<h3>Meta</h3>
3+
<div>Docs for {{ project }}</div>
4+
<div>Version: <code>{{ release }}</code></div>
5+
<div>Last updated: {{ last_updated }}</div>
86
</div>

0 commit comments

Comments
 (0)