Skip to content

Commit ec879d3

Browse files
authored
Improve style of tutorials (css, logo) (#281)
1 parent 2f944fb commit ec879d3

File tree

4 files changed

+74
-1
lines changed

4 files changed

+74
-1
lines changed

_static/css/override.css

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/* A few customizations of sphynx-rtd-theme specific to MoveIt branding */
2+
3+
.icon:before {
4+
white-space: pre-wrap !important;
5+
}
6+
7+
.header-override {
8+
margin-bottom: 12px;
9+
}
10+
11+
.header-override img {
12+
width: 200px;
13+
}
14+
15+
.wy-breadcrumbs li.wy-breadcrumbs-aside {
16+
display: block;
17+
width: 100%;
18+
text-align: right;
19+
margin-bottom: -25px;
20+
}
21+
22+
.wy-body-for-nav .wy-side-nav-search {
23+
background-color: #33343f;
24+
}
25+
26+
.red {
27+
color: red;
28+
}
29+
30+
a {
31+
color: #005cfa;
32+
}
33+
34+
a:hover {
35+
color: #9B58B6;
36+
}
37+
38+
.rst-content .note {
39+
background-color: #ECECEC;
40+
}
41+
42+
.rst-content .note .admonition-title {
43+
background-color: #777986;
44+
}
45+
46+
.wy-menu {
47+
margin-top: 24px;
48+
}
49+
50+
.wy-nav-side {
51+
background-color: #2D2E38;
52+
}
53+
54+
.wy-menu-vertical a {
55+
color: #b3b3b3;
56+
}
57+
58+
.header-override p {
59+
margin-bottom: 0;
60+
text-align: right;
61+
}

_static/images/rolling-small.png

79.5 KB
Loading

_static/images/rolling.png

-14.3 KB
Binary file not shown.

conf.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,13 @@
102102
#
103103
html_theme = "sphinx_rtd_theme"
104104
html_theme_options = {
105-
"collapse_navigation": False,
105+
"collapse_navigation": True,
106106
"sticky_navigation": True,
107107
"navigation_depth": -1,
108108
# This is the Google Analytics account used by moveit.ros.org, not picknik.ai
109109
"analytics_id": "UA-108532843-1",
110+
# Only display the logo image, do not display the project name at the top of the sidebar
111+
"logo_only": True,
110112
}
111113

112114
html_context = {
@@ -145,6 +147,7 @@
145147
"REPOS_FILE_BRANCH": "main",
146148
}
147149

150+
# Set the the browser icon
148151
html_favicon = "_static/images/favicon.ico"
149152

150153

@@ -153,6 +156,12 @@
153156
# so a file named "default.css" will overwrite the builtin "default.css".
154157
html_static_path = ["_static"]
155158

159+
# These paths are either relative to html_static_path
160+
# or fully qualified paths (eg. https://...)
161+
html_css_files = [
162+
"css/override.css",
163+
]
164+
156165
# Drop any source link suffix
157166
html_sourcelink_suffix = ""
158167

@@ -408,6 +417,9 @@ def smv_rewrite_configs(app, config):
408417
app.config.html_baseurl = app.config.html_baseurl + "/" + distro + "/"
409418
app.config.project = "MoveIt Documentation: " + distro.title()
410419
app.config.html_logo = "_static/images/" + distro + "-small.png"
420+
else:
421+
# If we are not building a multiversion build, default to the rolling logo
422+
app.config.html_logo = "_static/images/rolling-small.png"
411423

412424

413425
def github_link_rewrite_branch(app, pagename, templatename, context, doctree):

0 commit comments

Comments
 (0)