Skip to content

Commit

Permalink
Add search-bar Go button.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkratky committed Jan 10, 2024
1 parent f2504fe commit b2552a3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/.sphinx/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,19 @@ details summary {
.highlight button.copybtn {
opacity: 0;
}

/* Mimicking the 'Give feedback' button for UX consistency */
.sidebar-search-container input[type=submit] {
color: #FFFFFF;
border: 2px solid #D6410D;
padding: var(--sidebar-search-input-spacing-vertical) var(--sidebar-search-input-spacing-horizontal);
background: #D6410D;
font-weight: bold;
font-size: var(--font-size--small);
cursor: pointer;
}

.sidebar-search-container input[type=submit]:hover {
text-decoration: underline;
}

7 changes: 7 additions & 0 deletions doc/.sphinx/_templates/sidebar/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<form class="sidebar-search-container" method="get" action="{{ pathto('search') }}" role="search">
<input class="sidebar-search" placeholder="{{ _("Search") }}" name="q" aria-label="{{ _("Search" ) }}">
<input type="submit" value="Go">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form>
<div id="searchbox"></div>

0 comments on commit b2552a3

Please sign in to comment.