Skip to content

Commit 6536250

Browse files
jrbourbeaujakirkham
authored andcommitted
Adds logo to docs (#462)
* Adds logo + custom css to docs * Adds sphinx-rtd-theme to requirements
1 parent 29cf195 commit 6536250

File tree

4 files changed

+40
-3
lines changed

4 files changed

+40
-3
lines changed

docs/_static/custom.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
/* Sidebar background color */
3+
.wy-nav-side, div.wy-side-nav-search {
4+
background-color: rgb(38, 34, 98);
5+
}
6+
7+
/* Sidebar link click color */
8+
.wy-menu-vertical .toctree-l1 > a:active {
9+
background-color: rgb(38, 34, 98);
10+
color: rgb(252, 252, 252);
11+
}
12+
13+
/* Link color is darker to make hovering more clear */
14+
.wy-menu-vertical .toctree-l1 > a:hover {
15+
background-color: rgb(25, 22, 65);
16+
color: rgb(252, 252, 252);
17+
}
18+
19+
.wy-menu-vertical li.current > a:hover, .wy-menu-vertical li.current > a:active {
20+
color: #404040;
21+
background-color: #F5F5F5;
22+
}
23+
24+
/* On hover over logo */
25+
.wy-side-nav-search > a:hover, .wy-side-nav-search .wy-dropdown > a:hover {
26+
background: inherit;
27+
}
28+
29+
/* Border around search box */
30+
.wy-side-nav-search input[type="text"] {
31+
border: 0px;
32+
}

docs/_static/logo1.png

9.9 KB
Loading

docs/conf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@
123123

124124
# The theme to use for HTML and HTML Help pages. See the documentation for
125125
# a list of builtin themes.
126-
html_theme = 'default'
126+
html_theme = 'sphinx_rtd_theme'
127127

128128
# Theme options are theme-specific and customize the look and feel of a theme
129129
# further. For a list of options available for each theme, see the
130130
# documentation.
131-
#html_theme_options = {}
131+
html_theme_options = {'logo_only': True}
132132

133133
# Add any paths that contain custom themes here, relative to this directory.
134134
#html_theme_path = []
@@ -142,7 +142,11 @@
142142

143143
# The name of an image file (relative to this directory) to place at the top
144144
# of the sidebar.
145-
#html_logo = None
145+
html_logo = '_static/logo1.png'
146+
147+
# Add custom css
148+
def setup(app):
149+
app.add_stylesheet('custom.css')
146150

147151
# The name of an image file (relative to this directory) to use as a favicon of
148152
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32

requirements_rtfd.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ setuptools
33
setuptools_scm
44
sphinx
55
sphinx-issues
6+
sphinx-rtd-theme
67
numpydoc
78
numpy

0 commit comments

Comments
 (0)