From 6e589f337e1ecf563aa01842f5c6319d161411ee Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:34:32 +0100 Subject: [PATCH 1/4] Add SVG logo with dark mode, GitHub/Forum/Chat buttons --- docs/source/_static/jupyter_logo.svg | 16 +++++++++++ docs/source/_static/logo-rectangle-dark.svg | 14 +++++++++ docs/source/_static/logo-rectangle.svg | 14 +++++++++ docs/source/conf.py | 32 ++++++++++++++++++++- 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 docs/source/_static/jupyter_logo.svg create mode 100644 docs/source/_static/logo-rectangle-dark.svg create mode 100644 docs/source/_static/logo-rectangle.svg diff --git a/docs/source/_static/jupyter_logo.svg b/docs/source/_static/jupyter_logo.svg new file mode 100644 index 0000000000..37f040e6b1 --- /dev/null +++ b/docs/source/_static/jupyter_logo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/source/_static/logo-rectangle-dark.svg b/docs/source/_static/logo-rectangle-dark.svg new file mode 100644 index 0000000000..7a79f6fe3a --- /dev/null +++ b/docs/source/_static/logo-rectangle-dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/source/_static/logo-rectangle.svg b/docs/source/_static/logo-rectangle.svg new file mode 100644 index 0000000000..4cb08d30e8 --- /dev/null +++ b/docs/source/_static/logo-rectangle.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/docs/source/conf.py b/docs/source/conf.py index 97b506d7d5..cf2336b074 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -173,7 +173,37 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -# html_theme_options = {} +html_theme_options = { + "icon_links": [ + { + "name": "jupyter.org", + "url": "https://jupyter.org", + "icon": "_static/jupyter_logo.svg", + "type": "local", + }, + { + "name": "GitHub", + "url": "https://github.com/jupyter/notebook", + "icon": "fab fa-github-square", + }, + { + "name": "Discourse", + "url": "https://discourse.jupyter.org/c/notebook/31", + "icon": "fab fa-discourse", + }, + { + "name": "Gitter", + "url": "https://gitter.im/jupyter/jupyter", + "icon": "fab fa-gitter", + }, + ], + "logo": { + "alt_text": "Jupyter", + "image_light": "_static/logo-rectangle.svg", + "image_dark": "_static/logo-rectangle-dark.svg", + }, + "use_edit_page_button": True, +} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] From 79da1980e7d302707f7d23cc6a788f923dd76d97 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Mon, 25 Sep 2023 20:39:43 +0100 Subject: [PATCH 2/4] Fix CSS syntax higlight --- docs/source/custom_css.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/custom_css.md b/docs/source/custom_css.md index 73b67d3999..b8da16269e 100644 --- a/docs/source/custom_css.md +++ b/docs/source/custom_css.md @@ -6,7 +6,7 @@ To apply custom CSS, you can add a `/custom/custom.css` file in the jupyter `con You can use a custom CSS file to modify default Jupyter styling. -``` +```css /* Modify Jupyter Styles */ #top-panel-wrapper, #jp-top-bar { background-color: #aecad4!important; @@ -30,7 +30,7 @@ You can use a custom CSS file to modify default Jupyter styling. Another potential application for custom CSS is styling markdown. -``` +```css /* Headings */ h1, h2 { From 4c18e0c87e4b1390c79dc502508afe2e626758e4 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:04:29 +0100 Subject: [PATCH 3/4] Lint --- docs/source/custom_css.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/source/custom_css.md b/docs/source/custom_css.md index b8da16269e..ea9721ac35 100644 --- a/docs/source/custom_css.md +++ b/docs/source/custom_css.md @@ -8,19 +8,22 @@ You can use a custom CSS file to modify default Jupyter styling. ```css /* Modify Jupyter Styles */ -#top-panel-wrapper, #jp-top-bar { - background-color: #aecad4!important; +#top-panel-wrapper, +#jp-top-bar { + background-color: #aecad4 !important; } -#menu-panel-wrapper, #jp-MainMenu, #menu-panel { - background-color: #aecad4!important; +#menu-panel-wrapper, +#jp-MainMenu, +#menu-panel { + background-color: #aecad4 !important; } .jp-NotebookPanel-toolbar { - background-color: #aecad4!important; + background-color: #aecad4 !important; } .lm-MenuBar-content { - color: #02484d + color: #02484d; } ``` @@ -44,7 +47,6 @@ h1 { margin-bottom: 40px; color: #10929e; text-decoration: underline; - } h2 { From a548223244ecc5cd9d94b54a3aae4c3b71803add Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:06:46 +0100 Subject: [PATCH 4/4] Add GitHub config --- docs/source/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index cf2336b074..119f31ea2c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -205,6 +205,14 @@ "use_edit_page_button": True, } +# Output for github to be used in links +html_context = { + "github_user": "jupyter", # Username + "github_repo": "notebook", # Repo name + "github_version": "main", # Version + "doc_path": "docs/source/", # Path in the checkout to the docs root +} + # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = []