Skip to content

Commit b397a3b

Browse files
authored
Improve docs setup (SVG logos, repo links) (#7074)
* Add SVG logo with dark mode, GitHub/Forum/Chat buttons * Fix CSS syntax higlight * Lint * Add GitHub config
1 parent 56425ef commit b397a3b

File tree

5 files changed

+94
-10
lines changed

5 files changed

+94
-10
lines changed

docs/source/_static/jupyter_logo.svg

+16
Loading
Loading
+14
Loading

docs/source/conf.py

+39-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,45 @@
173173
# Theme options are theme-specific and customize the look and feel of a theme
174174
# further. For a list of options available for each theme, see the
175175
# documentation.
176-
# html_theme_options = {}
176+
html_theme_options = {
177+
"icon_links": [
178+
{
179+
"name": "jupyter.org",
180+
"url": "https://jupyter.org",
181+
"icon": "_static/jupyter_logo.svg",
182+
"type": "local",
183+
},
184+
{
185+
"name": "GitHub",
186+
"url": "https://github.com/jupyter/notebook",
187+
"icon": "fab fa-github-square",
188+
},
189+
{
190+
"name": "Discourse",
191+
"url": "https://discourse.jupyter.org/c/notebook/31",
192+
"icon": "fab fa-discourse",
193+
},
194+
{
195+
"name": "Gitter",
196+
"url": "https://gitter.im/jupyter/jupyter",
197+
"icon": "fab fa-gitter",
198+
},
199+
],
200+
"logo": {
201+
"alt_text": "Jupyter",
202+
"image_light": "_static/logo-rectangle.svg",
203+
"image_dark": "_static/logo-rectangle-dark.svg",
204+
},
205+
"use_edit_page_button": True,
206+
}
207+
208+
# Output for github to be used in links
209+
html_context = {
210+
"github_user": "jupyter", # Username
211+
"github_repo": "notebook", # Repo name
212+
"github_version": "main", # Version
213+
"doc_path": "docs/source/", # Path in the checkout to the docs root
214+
}
177215

178216
# Add any paths that contain custom themes here, relative to this directory.
179217
# html_theme_path = []

docs/source/custom_css.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,24 @@ To apply custom CSS, you can add a `/custom/custom.css` file in the jupyter `con
66

77
You can use a custom CSS file to modify default Jupyter styling.
88

9-
```
9+
```css
1010
/* Modify Jupyter Styles */
11-
#top-panel-wrapper, #jp-top-bar {
12-
background-color: #aecad4!important;
11+
#top-panel-wrapper,
12+
#jp-top-bar {
13+
background-color: #aecad4 !important;
1314
}
1415

15-
#menu-panel-wrapper, #jp-MainMenu, #menu-panel {
16-
background-color: #aecad4!important;
16+
#menu-panel-wrapper,
17+
#jp-MainMenu,
18+
#menu-panel {
19+
background-color: #aecad4 !important;
1720
}
1821

1922
.jp-NotebookPanel-toolbar {
20-
background-color: #aecad4!important;
23+
background-color: #aecad4 !important;
2124
}
2225
.lm-MenuBar-content {
23-
color: #02484d
26+
color: #02484d;
2427
}
2528
```
2629

@@ -30,7 +33,7 @@ You can use a custom CSS file to modify default Jupyter styling.
3033

3134
Another potential application for custom CSS is styling markdown.
3235

33-
```
36+
```css
3437
/* Headings */
3538
h1,
3639
h2 {
@@ -44,7 +47,6 @@ h1 {
4447
margin-bottom: 40px;
4548
color: #10929e;
4649
text-decoration: underline;
47-
4850
}
4951

5052
h2 {

0 commit comments

Comments
 (0)