Commit 67ed1039 authored by key-amb's avatar key-amb
Browse files

Add search form powered by Google site search

parent c15134f0
......@@ -51,6 +51,17 @@
</li>
{{ end }}
</ul>
{{ if .Site.Params.searchDomain }}
<form class="navbar-form navbar-left" role="search" action="https://www.google.co.jp/search" method="get">
<div class="input-group doc-search-form">
<input type="hidden" name="as_sitesearch" value="{{ .Site.Params.searchDomain }}">
<input type="text" name="as_q" class="search-query doc-search-input-text" placeholder="Search Site">
<span class="input-group-addon input-group-btn doc-search-input-btn">
<button class="btn" type="submit"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</form>
{{ end }}
</div><!--/.nav-collapse -->
</div>
</nav>
......
......@@ -34,6 +34,56 @@ h2, .h2 {
}
}
/*
* Header navbar
*/
/* To override Bootstrap's form-control style */
.doc-search-input-text {
font-size: 14px;
line-height: 20px;
height: 34px;
padding: 6px 12px;
border: 1px solid #ccc;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.doc-search-input-text:focus {
border: 1px solid #ffff99;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}
.doc-search-input-text::-moz-placeholder {
color: #999;
opacity: 1;
}
.doc-search-input-text:-ms-input-placeholder {
color: #999;
}
.doc-search-input-text::-webkit-input-placeholder {
color: #999;
}
.doc-search-input-text::-ms-expand {
background-color: transparent;
border: 0;
}
div.doc-search-form {
border-radius: 4px;
}
.doc-search-input-btn {
padding: 0;
}
.doc-search-input-btn > button {
padding: 5px 10px;
}
/*
* Main column and sidebar layout
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment