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

Add #searchbox to sidebar for "Hide Search Matches" link #925

Merged
merged 2 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,21 @@
padding-left: 1rem;
}
}

// The 'Hide Search Matches' link
div#searchbox {
p.highlight-link {
// remove excess margin from p tag
margin-bottom: 0px;
a {
// add icon via CSS because the link is created by javascript
// match padding to .toc-item > i above
// f010 is magnifying glass minus
&:before {
content: "\f010";
font-family: FontAwesome;
padding-right: 0.5rem;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{# div#searchbox hosts the "Hide Search Matches" link #}
<div id="searchbox"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ navbar_end = theme-switcher.html, navbar-icon-links.html
header_links_before_dropdown = 5
left_sidebar_end = sidebar-ethical-ads.html
footer_items = copyright.html, sphinx-version.html
page_sidebar_items = page-toc.html, edit-this-page.html, sourcelink.html
page_sidebar_items = page-toc.html, searchbox.html, edit-this-page.html, sourcelink.html
switcher =
pygment_light_style = tango
pygment_dark_style = native
Expand Down