From 862bdb37681316973b0f78fd064ac91ea4812606 Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Wed, 11 Mar 2020 15:56:58 -0700 Subject: [PATCH] adding download button --- docs/conf.py | 2 ++ sphinx_book_theme/static/jupyterbook.css | 8 ++++++++ sphinx_book_theme/topbar.html | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 55888f0fd..7843a926e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,6 +47,8 @@ html_theme = "sphinx_book_theme" html_logo = "_static/logo.png" html_title = "Sphinx Book Theme" +html_copy_source = True +html_sourcelink_suffix = "" # html_theme_options = {"github_url": "https://github.com/ExecutableBookProject/myst-nb"} # Add any paths that contain custom static files (such as style sheets) here, diff --git a/sphinx_book_theme/static/jupyterbook.css b/sphinx_book_theme/static/jupyterbook.css index 746ac626b..fa44ccec4 100644 --- a/sphinx_book_theme/static/jupyterbook.css +++ b/sphinx_book_theme/static/jupyterbook.css @@ -91,6 +91,10 @@ body img { transform: rotate(-180deg) scale(.5); } +a.download-buttons i { + margin-right: .5em; +} + /********************************************* * Table of Contents * @@ -111,6 +115,10 @@ body img { overflow-y: auto; } +a.navbar-brand { + width: 100%; +} + .navbar-brand img { max-height: 120px !important; margin: 0 auto; diff --git a/sphinx_book_theme/topbar.html b/sphinx_book_theme/topbar.html index ced4d5e62..03be0492a 100644 --- a/sphinx_book_theme/topbar.html +++ b/sphinx_book_theme/topbar.html @@ -3,5 +3,5 @@ - +