mirror of
https://github.com/danbulant/api_docs
synced 2026-05-24 12:27:29 +00:00
Adjust search info appearance, fix Firefox bug
This commit is contained in:
parent
7386fd2e21
commit
0feb513407
4 changed files with 18 additions and 35 deletions
|
|
@ -40,9 +40,6 @@
|
||||||
.on('keyup', search)
|
.on('keyup', search)
|
||||||
.on('focus', active)
|
.on('focus', active)
|
||||||
.on('blur', inactive);
|
.on('blur', inactive);
|
||||||
|
|
||||||
$global.on('resize', resize);
|
|
||||||
resize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function search (event) {
|
function search (event) {
|
||||||
|
|
@ -93,8 +90,4 @@
|
||||||
content.unhighlight(highlightOpts);
|
content.unhighlight(highlightOpts);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resize () {
|
|
||||||
searchInfo.innerWidth(content.innerWidth() - darkBox.innerWidth());
|
|
||||||
}
|
|
||||||
|
|
||||||
})(window);
|
})(window);
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ under the License.
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<input type="text" class="search" id="input-search">
|
<input type="text" class="search" id="input-search">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="search-info"></div>
|
||||||
<div id="toc">
|
<div id="toc">
|
||||||
</div>
|
</div>
|
||||||
<% if current_page.data.toc_footers %>
|
<% if current_page.data.toc_footers %>
|
||||||
|
|
@ -52,7 +53,6 @@ under the License.
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-wrapper">
|
<div class="page-wrapper">
|
||||||
<div class="search-info"></div>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<% current_page.data.includes && current_page.data.includes.each do |include| %>
|
<% current_page.data.includes && current_page.data.includes.each do |include| %>
|
||||||
|
|
|
||||||
|
|
@ -65,23 +65,35 @@ html, body {
|
||||||
border-width: 0 0 1px 0;
|
border-width: 0 0 1px 0;
|
||||||
border-color: $search-box-border-color;
|
border-color: $search-box-border-color;
|
||||||
padding: 6px 0 6px 20px;
|
padding: 6px 0 6px 20px;
|
||||||
box-sizing: border-box;
|
@include box-sizing(border-box);
|
||||||
margin: 10px 15px;
|
margin: 10px 15px;
|
||||||
width: $nav-width - 30;
|
width: $nav-width - 30;
|
||||||
outline: none;
|
outline: none;
|
||||||
color: $nav-text;
|
color: $nav-text;
|
||||||
letter-spacing: 0.07em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
@extend %icon-search;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 16px;
|
top: 17px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
color: $nav-text;
|
color: $nav-text;
|
||||||
|
@extend %icon-search;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search-info {
|
||||||
|
margin-top: 0;
|
||||||
|
padding: 1em $nav-padding;
|
||||||
|
font-size: 0.9em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-shadow: 0 1px 0 lighten($search-notice-bg, 15%);
|
||||||
|
background: $search-notice-bg;
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
@include box-sizing(border-box);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.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;
|
||||||
|
|
@ -422,28 +434,6 @@ html, body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-info {
|
|
||||||
margin-top: 0;
|
|
||||||
min-height: 52px;
|
|
||||||
padding: 1em 1.75em;
|
|
||||||
font-size: 1.2em;
|
|
||||||
font-weight: bold;
|
|
||||||
text-shadow: 0 1px 0 lighten($search-notice-bg, 15%);
|
|
||||||
background: $search-notice-bg;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 75;
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
@include box-sizing(border-box);
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
@extend %icon-search;
|
|
||||||
vertical-align: middle;
|
|
||||||
padding-right: 0.5em;
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// CODE SAMPLE STYLES
|
// CODE SAMPLE STYLES
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ $main-bg: #eaf2f6;
|
||||||
$aside-notice-bg: #8fbcd4;
|
$aside-notice-bg: #8fbcd4;
|
||||||
$aside-warning-bg: #c97a7e;
|
$aside-warning-bg: #c97a7e;
|
||||||
$aside-success-bg: #6ac174;
|
$aside-success-bg: #6ac174;
|
||||||
$search-notice-bg: #8fbcd4;
|
$search-notice-bg: #c97a7e;
|
||||||
|
|
||||||
|
|
||||||
// TEXT COLORS
|
// TEXT COLORS
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue