Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 8 additions & 0 deletions sphinx_book_theme/static/jupyterbook.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ body img {
transform: rotate(-180deg) scale(.5);
}

a.download-buttons i {
margin-right: .5em;
}


/*********************************************
* Table of Contents *
Expand All @@ -111,6 +115,10 @@ body img {
overflow-y: auto;
}

a.navbar-brand {
width: 100%;
}

.navbar-brand img {
max-height: 120px !important;
margin: 0 auto;
Expand Down
2 changes: 1 addition & 1 deletion sphinx_book_theme/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<i class="fas fa-bars"></i>
<i class="fas fa-arrow-left"></i>
</button>
<button type="button" class="btn btn-secondary">Test</button>
<a class="download-buttons" href="{{ pathto("_sources", 1) }}/{{ sourcename }}"><button type="button" class="btn btn-secondary"><i class="fas fa-download"></i>{{ page_source_suffix | replace(".", "", 1) }}</button></a>
</div>