-
Notifications
You must be signed in to change notification settings - Fork 325
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
Fix extra whitespace in sidebars #1115
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
07bc733
Fix extra whitespace in sidebars
choldgraf 2c2d859
Searchbox
choldgraf a13655e
Update src/pydata_sphinx_theme/__init__.py
choldgraf 82a704b
make test pass
drammock 287bf9e
Fix template filter to remove empty files
choldgraf 59b2e59
ABlog in template test
choldgraf 23074b1
Move clear search button to primary sidebar
choldgraf 0ed3919
Move search clear button to top of article
choldgraf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
- header: "@bollwyvl" | ||
image: https://avatars.githubusercontent.com/u/45380 | ||
link: https://github.com/bollwyvl | ||
website: https://github.com/bollwyvl | ||
- header: "@jarrodmillman" | ||
image: https://avatars.githubusercontent.com/u/123428 | ||
link: https://github.com/jarrodmillman | ||
website: https://github.com/jarrodmillman | ||
- header: "@hoetmaaiers" | ||
image: https://avatars.githubusercontent.com/u/468045 | ||
link: https://github.com/hoetmaaiers | ||
website: https://github.com/hoetmaaiers | ||
- header: "@jorisvandenbossche" | ||
image: https://avatars.githubusercontent.com/u/1020496 | ||
link: https://github.com/jorisvandenbossche | ||
website: https://github.com/jorisvandenbossche | ||
- header: "@damianavila" | ||
image: https://avatars.githubusercontent.com/u/1640669 | ||
link: https://github.com/damianavila | ||
website: https://github.com/damianavila | ||
- header: "@drammock" | ||
image: https://avatars.githubusercontent.com/u/1810515 | ||
link: https://github.com/drammock | ||
website: https://github.com/drammock | ||
- header: "@choldgraf" | ||
image: https://avatars.githubusercontent.com/u/1839645 | ||
link: https://github.com/choldgraf | ||
website: https://github.com/choldgraf | ||
- header: "@12rambau" | ||
image: https://avatars.githubusercontent.com/u/12596392 | ||
link: https://github.com/12rambau | ||
website: https://github.com/12rambau |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/pydata_sphinx_theme/assets/styles/components/_searchbox.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* The 'Hide Search Matches' button. | ||
* This only shows up when a person lands on a page after clicking a search result. | ||
* Clicking it removes the highlighting of the search term from the page. | ||
* We want it to behave like a button. | ||
*/ | ||
div#searchbox { | ||
// Leave `#searchbox` rules empty so that it doesn't show at all when it is empty | ||
p.highlight-link { | ||
margin: 1rem 0; | ||
width: fit-content; | ||
|
||
// A bit more margin on wide screens to mimic article behavior | ||
@include media-breakpoint-up($breakpoint-sidebar-secondary) { | ||
margin-left: 2rem; | ||
} | ||
|
||
// Put outer shadow on this one so that we can darken the link w/ an inner shadow | ||
@include box-shadow(); | ||
|
||
// Style the button to look like a Sphinx Design button | ||
a { | ||
border-radius: 0.25rem; | ||
font-size: 1.25rem; | ||
padding: 0.75rem; | ||
background-color: var(--pst-color-primary); | ||
// Button text is always white with Sphinx Design buttons | ||
color: white; | ||
|
||
// The box shadow is inset so that it darkens the button on hover | ||
transition: box-shadow 0.25s ease-out; | ||
&:hover { | ||
box-shadow: inset 0px 0px 50px 50px rgba(0, 0, 0, 0.25); | ||
|
||
// Remove underline for link | ||
text-decoration: none; | ||
} | ||
|
||
// add icon via CSS because the link is created by javascript | ||
// match padding to .toc-item > i above | ||
&:before { | ||
content: var(--pst-icon-search-minus); | ||
color: unset; | ||
font-family: "Font Awesome 6 Free"; | ||
font-weight: 900; | ||
margin-right: 0.5rem; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ I did not know this shorcut, I've been using
--no-reuse-existing-virtualenvs
which is so long to type that it hurts.