Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Remove duplication with pydata-sphinx-theme #640

Merged
merged 78 commits into from
Jan 5, 2023
Merged
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
5ce5ad8
Removing cruft for pydata theme
choldgraf Nov 7, 2022
26b3508
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 7, 2022
2725088
Fixing tox
choldgraf Nov 7, 2022
d8a208d
Merge branch 'maint-remove-cruft' of https://github.com/choldgraf/sph…
choldgraf Nov 7, 2022
b9570fb
typo
AakashGfude Nov 15, 2022
d12b609
bd article p-r-2
AakashGfude Nov 19, 2022
7ea4c08
footer and secondary sidebar
AakashGfude Nov 20, 2022
18d8788
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 20, 2022
fa41fff
Merge branch 'master' into maint-remove-cruft
AakashGfude Nov 20, 2022
6fb24ee
had to add _footer-content.scss, as pydata does not have any style
AakashGfude Nov 22, 2022
cca9a25
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 22, 2022
52be871
had to add _footer-content.scss, as pydata does not have any style
AakashGfude Nov 22, 2022
5ebe199
Merge branch 'maint-remove-cruft' of https://github.com/choldgraf/sph…
AakashGfude Nov 22, 2022
5ef980e
hide the header btn on wide screens
AakashGfude Nov 23, 2022
3631c06
bd-main flex-grow is not necessary in sbt
AakashGfude Nov 24, 2022
aa2a93a
removing unnecessary style/mixins and adding some
AakashGfude Nov 24, 2022
fa16d07
adding noqa
AakashGfude Nov 24, 2022
fbf16bf
removing unnecessary class and editing sidebar secondary option
AakashGfude Nov 24, 2022
a7d9b07
removing sidebar secondary buttons
AakashGfude Nov 24, 2022
e3b5046
hiding source link
AakashGfude Nov 24, 2022
d2237ee
pydata version
AakashGfude Nov 25, 2022
bf3b8de
span.sidenote and span.marginnote z-index
AakashGfude Nov 25, 2022
f3ae6ff
citation style
AakashGfude Nov 25, 2022
544aa0e
Merge branch 'master' into maint-remove-cruft
AakashGfude Nov 26, 2022
bdf4a9d
google link
AakashGfude Nov 26, 2022
00be6cb
Merge branch 'maint-remove-cruft' of https://github.com/choldgraf/sph…
AakashGfude Nov 26, 2022
e9baa59
dependency changes
AakashGfude Nov 27, 2022
89b8201
file changes
AakashGfude Nov 27, 2022
2d84c2a
no print for sidebar secondary
AakashGfude Nov 27, 2022
7ec48bc
adding sphinx 4,5 in tox and secondary sidebar now won't show up when…
AakashGfude Nov 27, 2022
a42a616
deprecating single_page, extra navbar, navbar_footer_text html options
AakashGfude Nov 27, 2022
149827f
execution_show_tb to nb_execution_show_tb
AakashGfude Nov 27, 2022
8e70b2f
table style
AakashGfude Nov 27, 2022
6b04714
urlib.parse warning and custom-footer link removal
AakashGfude Nov 28, 2022
5540876
images with fixed height/width
AakashGfude Nov 28, 2022
390fff2
Merge branch 'master' into maint-remove-cruft
AakashGfude Nov 28, 2022
d944d0e
search page style and fading of primary sidebar
AakashGfude Nov 29, 2022
cf14d58
code block margin and show-inpage-toc
AakashGfude Nov 29, 2022
b3ad1ba
margin content pushes code cells down
AakashGfude Nov 29, 2022
1f09856
output tag style
AakashGfude Nov 29, 2022
6cbf044
announcemnet color
AakashGfude Nov 29, 2022
c908192
Merge branch 'maint-remove-cruft' of https://github.com/choldgraf/sph…
AakashGfude Nov 29, 2022
3cff905
search page style
AakashGfude Nov 30, 2022
54eeebb
extension added for syntax highlighting
AakashGfude Nov 30, 2022
992edc2
Update src/sphinx_book_theme/assets/styles/components/_search.scss
AakashGfude Nov 30, 2022
10d28f0
ipython version
AakashGfude Nov 30, 2022
fcb43d6
Merge branch 'maint-remove-cruft' of https://github.com/choldgraf/sph…
AakashGfude Nov 30, 2022
a3d7c7c
checking if ipython version is the issue
AakashGfude Nov 30, 2022
c9f8a28
removing pygments_lexer metadata in test file
AakashGfude Nov 30, 2022
3e9b91b
jupyter logo
AakashGfude Nov 30, 2022
091e234
logo img link
AakashGfude Nov 30, 2022
7b1c717
adding deprecation for single page
AakashGfude Dec 4, 2022
c2b4bc4
adding deprecation for single page
AakashGfude Dec 4, 2022
4142218
removing border bottom for margins
AakashGfude Dec 5, 2022
f2549f5
margin and sidebar styles
AakashGfude Dec 6, 2022
c7b6cc7
font sizes for primary sidebar
AakashGfude Dec 7, 2022
ddd4f7e
relaxing lighthouse score
AakashGfude Dec 7, 2022
e53809f
scrollbar mixin and animation
AakashGfude Dec 7, 2022
b9fd52d
responsive css and nav scroll attempt
AakashGfude Dec 14, 2022
104e1b6
Merge branch 'master' into maint-remove-cruft
AakashGfude Dec 14, 2022
249691b
Remove buttons and responsive behavior fixes
choldgraf Dec 14, 2022
15b141c
Merge commit
choldgraf Dec 14, 2022
17c4090
Merge commit
choldgraf Dec 14, 2022
36fa0a0
Cleaning up margin behavior
choldgraf Dec 14, 2022
7e75ab1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 14, 2022
6c72078
Changelog error
choldgraf Dec 14, 2022
2f236d0
Merge branch 'maint-remove-cruft' of https://github.com/choldgraf/sph…
choldgraf Dec 14, 2022
0785986
Fix tests
choldgraf Dec 14, 2022
6d52144
More test fixes
choldgraf Dec 14, 2022
49a6155
Move install to pyproject
choldgraf Dec 14, 2022
a5c99c2
Pinning to latest release of pydata theme
choldgraf Dec 15, 2022
f1a49a7
Merge branch 'master' into maint-remove-cruft
AakashGfude Dec 19, 2022
4bc057c
flex-basis primary-sidebar
AakashGfude Dec 19, 2022
3b886b7
search text
AakashGfude Dec 19, 2022
a856701
menu dropdown css
AakashGfude Dec 20, 2022
ef50585
alignment of buttons
AakashGfude Dec 20, 2022
204c1fc
sidebar and margin fixes
AakashGfude Dec 21, 2022
70ffec9
Tweaking two items
choldgraf Jan 5, 2023
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
Prev Previous commit
Next Next commit
deprecating single_page, extra navbar, navbar_footer_text html options
AakashGfude committed Nov 27, 2022
commit a42a616d4dcf58433bfbdd1acecb0b4269931362
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -129,9 +129,7 @@
# For testing
# "use_fullscreen_button": False,
# "home_page_in_toc": True,
# "single_page": True,
# "extra_footer": "<a href='https://google.com'>Test</a>", # DEPRECATED KEY
# "extra_navbar": "<a href='https://google.com'>Test</a>",
# "show_navbar_depth": 2,
}

7 changes: 0 additions & 7 deletions docs/customize/index.md
Original file line number Diff line number Diff line change
@@ -12,9 +12,6 @@ The following options are available via `html_theme_options`
* - Key
- Type
- Description
* - `single_page`
- bool
- Remove the left sidebar and treat the site as a single page. See [](customize:single-page).
* - `path_to_docs`
- string
- Path to the documentation, relative to the repository root (e.g. `docs/`). See [](customize:source-files).
@@ -48,9 +45,6 @@ The following options are available via `html_theme_options`
* - `show_navbar_depth`
- int
- Show children in the navigation bar down to the depth listed here. See [](sidebar:navbar-depth).
* - `extra_navbar`
- str
- Extra HTML to add below the sidebar footer. See [](custom-footer).
* - `extra_footer`
- str
- Extra HTML to add in the footer of each page.
@@ -72,5 +66,4 @@ header.md
download.md
source-files.md
custom-css.md
single-page.md
```
15 changes: 0 additions & 15 deletions docs/customize/sidebar-primary.md
Original file line number Diff line number Diff line change
@@ -38,21 +38,6 @@ By default, this theme comes with these three theme-specific sidebar elements en
- `sbt-sidebar-nav.html`: A bootstrap-based navigation menu for your book.
- `sbt-sidebar-footer`: A [configurable](custom-footer) snippet of HTML to add to the sidebar (by default it is placed at the bottom).

(custom-footer)=
## Customize the sidebar footer

You may choose your own HTML to include in the footer of your sidebar (or set it to be empty). To do so, set the following option in `conf.py`:

```python
html_theme_options = {
...
"extra_navbar": "<p>Your HTML</p>",
...
}
```

This text will be placed at the bottom of the sidebar by default.


## Add a header to your Table of Contents

14 changes: 0 additions & 14 deletions docs/customize/single-page.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -4,9 +4,7 @@

<div class="col py-1 d-flex header-article-main">
<div class="header-article__left">
{% if theme_single_page != True %}
{{ render_label_input_button(for_input="__primary", tooltip="Toggle navigation", icon="fas fa-bars", tooltip_placement="right") }}
{% endif %}
</div>
<div class="header-article__right">
{%- for button in header_buttons -%}
3 changes: 0 additions & 3 deletions src/sphinx_book_theme/theme/sphinx_book_theme/theme.conf
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ stylesheet = styles/sphinx-book-theme.css

[options]
announcement =
single_page = False
# Removes the extra page-specific links from sidebar
secondary_sidebar_items = page-toc.html
footer_content_items = author.html, copyright.html, last-updated.html, extra-footer.html
@@ -18,7 +17,6 @@ home_page_in_toc = False
logo_only =
show_navbar_depth = 1
toc_title = Contents
extra_navbar = Theme by the <a href="https://ebp.jupyterbook.org">Executable Book Project</a>
extra_footer =
use_download_button = True
use_fullscreen_button = True
@@ -30,4 +28,3 @@ use_sidenotes = False

# DEPRECATE after a few release cycles
expand_toc_sections = []
navbar_footer_text =
18 changes: 0 additions & 18 deletions tests/test_build.py
Original file line number Diff line number Diff line change
@@ -153,27 +153,9 @@ def test_navbar_options_home_page_in_toc(sphinx_build_factory):
assert "Index with code in title" in str(li)


def test_navbar_options_single_page(sphinx_build_factory):
"""Test that"""
sphinx_build = sphinx_build_factory(
"base", confoverrides={"html_theme_options.single_page": True}
).build(
assert_pass=True
) # type: SphinxBuild
sidebar = sphinx_build.html_tree("section1", "ntbk.html").find(
"div", attrs={"class": "bd-sidebar-primary"}
)
assert len(sidebar.find_all("div")) == 0 # Sidebar should be empty
# HTML structure for below assertion is not supported in the latest version,
# the class just removes a border as of now, which we can do without.
# assert "single-page" in sidebar.attrs["class"] # Class added on single page


@pytest.mark.parametrize(
"option,value",
[
("extra_navbar", "<div>EXTRA NAVBAR</div>"),
("navbar_footer_text", "<div>EXTRA NAVBAR</div>"),
("extra_footer", "<div>EXTRA FOOTER</div>"),
],
)