Commit 59ee05c6 authored by Christopher Rogers's avatar Christopher Rogers

Updates search field markup and style

Signed-off-by: 's avatarChristopher Rogers <chrissrogers@gmail.com>
parent f2d13879
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
} }
function bind () { function bind () {
$('#search').on('keyup', function () { $('#input-search').on('keyup', function () {
if (this.value) { if (this.value) {
var items = index.search(this.value); var items = index.search(this.value);
$('section, #toc .tocify-item').hide(); $('section, #toc .tocify-item').hide();
......
...@@ -38,7 +38,9 @@ under the License. ...@@ -38,7 +38,9 @@ under the License.
<body class="<%= page_classes %>"> <body class="<%= page_classes %>">
<div class="tocify-wrapper"> <div class="tocify-wrapper">
<%= image_tag "logo.png" %> <%= image_tag "logo.png" %>
<input type="text" id="search" placeholder="search"> <div class="search">
<input type="text" class="search" id="input-search">
</div>
<div id="toc"> <div id="toc">
</div> </div>
<% if current_page.data.toc_footers %> <% if current_page.data.toc_footers %>
......
...@@ -54,13 +54,37 @@ html, body { ...@@ -54,13 +54,37 @@ html, body {
// This is the logo at the top of the ToC // This is the logo at the top of the ToC
&>img { &>img {
display: block; display: block;
margin-bottom: $logo-margin; }
&>.search {
position: relative;
input {
background: $nav-bg;
border-width: 0 0 1px 0;
border-color: $nav-footer-border-color;
padding: 6px 0 6px 20px;
box-sizing: border-box;
margin: 10px 15px;
width: $nav-width - 30;
outline: none;
color: $nav-text;
letter-spacing: 0.07em;
}
&:before {
@extend %icon-search;
position: absolute;
top: 16px;
left: 15px;
color: $nav-text;
}
} }
.tocify-item>a, .toc-footer li { .tocify-item>a, .toc-footer li {
padding: 0 $nav-padding 0 $nav-padding; padding: 0 $nav-padding 0 $nav-padding;
display:block; display: block;
overflow-x:hidden; overflow-x: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
......
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