Merge pull request #4377 from timhoffm/searchbar-style

Improved sidebar search field style
This commit is contained in:
Takeshi KOMIYA 2018-01-05 14:12:07 +09:00 committed by GitHub
commit ff61fb80c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 13 deletions

View File

@ -10,12 +10,14 @@
{%- if pagename != "search" and builder != "singlehtml" %} {%- if pagename != "search" and builder != "singlehtml" %}
<div id="searchbox" style="display: none" role="search"> <div id="searchbox" style="display: none" role="search">
<h3>{{ _('Quick search') }}</h3> <h3>{{ _('Quick search') }}</h3>
<div class="searchformwrapper">
<form class="search" action="{{ pathto('search') }}" method="get"> <form class="search" action="{{ pathto('search') }}" method="get">
<div><input type="text" name="q" /></div> <input type="text" name="q" />
<div><input type="submit" value="{{ _('Go') }}" /></div> <input type="submit" value="{{ _('Go') }}" />
<input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" /> <input type="hidden" name="area" value="default" />
</form> </form>
</div>
</div> </div>
<script type="text/javascript">$('#searchbox').show(0);</script> <script type="text/javascript">$('#searchbox').show(0);</script>
{%- endif %} {%- endif %}

View File

@ -82,9 +82,21 @@ div.sphinxsidebar input {
} }
div.sphinxsidebar #searchbox input[type="text"] { div.sphinxsidebar #searchbox input[type="text"] {
width: 170px; float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
} }
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img { img {
border: 0; border: 0;
max-width: 100%; max-width: 100%;

View File

@ -125,14 +125,11 @@ div.sphinxsidebar input {
font-size: 1em; font-size: 1em;
} }
div.sphinxsidebar input[type=text]{ div.sphinxsidebar .searchformwrapper {
margin-left: 20px; margin-left: 20px;
margin-right: 20px;
} }
div.sphinxsidebar input[type=submit]{
margin-left: 20px;
}
/* -- body styles ----------------------------------------------------------- */ /* -- body styles ----------------------------------------------------------- */
a { a {

View File

@ -148,12 +148,9 @@ div.sphinxsidebar input {
font-size: 1em; font-size: 1em;
} }
div.sphinxsidebar input[type=text]{ div.sphinxsidebar .searchformwrapper {
margin-left: 20px;
}
div.sphinxsidebar input[type=submit]{
margin-left: 20px; margin-left: 20px;
margin-right: 20px;
} }
/* -- sidebars -------------------------------------------------------------- */ /* -- sidebars -------------------------------------------------------------- */