mirror of
https://github.com/danbulant/api_docs
synced 2026-05-24 12:27:29 +00:00
Add search frontmatter key to specify visibility of search
This commit is contained in:
parent
0316c0c5e9
commit
84b3e5e3d6
4 changed files with 12 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ toc_footers:
|
||||||
includes:
|
includes:
|
||||||
- errors
|
- errors
|
||||||
|
|
||||||
|
search: true
|
||||||
---
|
---
|
||||||
|
|
||||||
# Introduction
|
# Introduction
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,12 @@ 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" %>
|
||||||
|
<% if current_page.data.search %>
|
||||||
<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 class="search-info"></div>
|
||||||
|
<% end %>
|
||||||
<div id="toc">
|
<div id="toc">
|
||||||
</div>
|
</div>
|
||||||
<% if current_page.data.toc_footers %>
|
<% if current_page.data.toc_footers %>
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,10 @@ html, body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img+.tocify {
|
||||||
|
margin-top: $logo-margin;
|
||||||
|
}
|
||||||
|
|
||||||
.search-info {
|
.search-info {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
padding: 1em $nav-padding;
|
padding: 1em $nav-padding;
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ $lang-select-pressed-text: #fff; // color of language tab text when mouse is pre
|
||||||
////////////////////
|
////////////////////
|
||||||
$nav-width: 230px; // width of the navbar
|
$nav-width: 230px; // width of the navbar
|
||||||
$examples-width: 50%; // portion of the screen taken up by code examples
|
$examples-width: 50%; // portion of the screen taken up by code examples
|
||||||
$logo-margin: 20px; // margin between nav items and logo
|
$logo-margin: 20px; // margin between nav items and logo, ignored if search is active
|
||||||
$main-padding: 28px; // padding to left and right of content & examples
|
$main-padding: 28px; // padding to left and right of content & examples
|
||||||
$nav-padding: 15px; // padding to left and right of navbar
|
$nav-padding: 15px; // padding to left and right of navbar
|
||||||
$nav-indent: 10px; // extra padding for ToC subitems
|
$nav-indent: 10px; // extra padding for ToC subitems
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue