-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
searchfield.html is similar to the existing searchbox.html, but does not have the heading "Quick Search". Instead, it uses "Search" as a placeholder text. This gives a cleaner and less cluttered appearance. The searchfield component is added to the basic theme and thus can be used in any derivative theme. It is not used by default for backward compatibility. The searchfield compenent is made the default in the new sphinx13 theme. CSS adaptions ensure that the top of the search field is aligned with the top of the main content.
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{# | ||
basic/searchfield.html | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Sphinx sidebar template: search field. | ||
This | ||
|
||
|
||
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. | ||
:license: BSD, see LICENSE for details. | ||
#} | ||
{%- if pagename != "search" and builder != "singlehtml" %} | ||
<div id="searchbox" style="display: none" role="search"> | ||
<div class="searchformwrapper"> | ||
<form class="search" action="{{ pathto('search') }}" method="get"> | ||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/> | ||
<input type="submit" value="{{ _('Go') }}" /> | ||
</form> | ||
</div> | ||
</div> | ||
<script>document.getElementById('searchbox').style.display = "block"</script> | ||
{%- endif %} |