Add sidebar anchor navigation to the "Examples" page.
This commit is contained in:
parent
3ed07a6fda
commit
bf7d273f89
67
docs/_includes/nav/examples.html
Normal file
67
docs/_includes/nav/examples.html
Normal file
@ -0,0 +1,67 @@
|
||||
<nav class="s2-docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav s2-docs-sidenav">
|
||||
<li>
|
||||
<a href="#basic">The basics</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#multiple">Multiple select boxes</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#placeholders">Placeholders</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#templating">Templating</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#data-array">Loading array data</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#data-ajax">Loading remote data</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#responsive">Responsive design</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#disabled">Disabled mode</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#disabled-results">Disabled results</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#programmatic">Programmatic access</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#multiple-max">Limiting the number of selections</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#hide-search">Hiding the search box</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#events">Events</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#tags">Tagging support</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#tokenizer">Automatic tokenization</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#matcher">Custom matcher</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#diacritics">Diacritics support</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#language">Multiple languages</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#themes">Theme support</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#rtl">RTL support</a>
|
||||
</li>
|
||||
</ul>
|
||||
<a class="back-to-top" href="#top">
|
||||
Back to top
|
||||
</a>
|
||||
</nav>
|
@ -28,11 +28,11 @@
|
||||
padding: 9px 14px;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #e8e8e8;
|
||||
border: 1px solid #eee;
|
||||
&.linenums {
|
||||
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
||||
-webkit-box-shadow: inset 40px 0 0 #fbfbfb, inset 41px 0 0 #f6f6f6;
|
||||
-moz-box-shadow: inset 40px 0 0 #fbfbfb, inset 41px 0 0 #f6f6f6;
|
||||
box-shadow: inset 40px 0 0 #fbfbfb, inset 41px 0 0 #f6f6f6;
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,6 +42,6 @@ ol.linenums {
|
||||
}
|
||||
ol.linenums li {
|
||||
padding-left: 12px;
|
||||
color: #bebec5;
|
||||
color: #bebebe;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
83
docs/_sass/_s2-docs-examples.scss
Normal file
83
docs/_sass/_s2-docs-examples.scss
Normal file
@ -0,0 +1,83 @@
|
||||
.s2-example + pre,
|
||||
.s2-event-log + pre {
|
||||
margin: -15px -15px 15px;
|
||||
border-radius: 0;
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.s2-example + pre,
|
||||
.s2-event-log + pre {
|
||||
margin-top: -16px;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
border-width: 1px;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.s2-event-log {
|
||||
background: #002451;
|
||||
font-family: Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Consolas, monospace;
|
||||
color: white;
|
||||
position: relative;
|
||||
padding: 45px 15px 15px;
|
||||
margin: 0 -15px 15px;
|
||||
}
|
||||
|
||||
.s2-event-log:after {
|
||||
content: "Event Log";
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #BBB;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.s2-example {
|
||||
position: relative;
|
||||
padding: 45px 15px 15px;
|
||||
margin: 0 -15px 15px;
|
||||
background-color: #FAFAFA;
|
||||
box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.05);
|
||||
border-color: #E5E5E5 #EEE #EEE;
|
||||
border-style: solid;
|
||||
border-width: 1px 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.s2-example {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
background-color: #FFF;
|
||||
border-width: 1px;
|
||||
border-color: #eee;
|
||||
border-radius: 4px 4px 0 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.s2-event-log {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: -15px;
|
||||
border-width: 1px;
|
||||
border-color: #eee;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.s2-example:after {
|
||||
content: "Example";
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #BBB;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
@ -8,6 +8,7 @@
|
||||
@import "s2-docs-footer";
|
||||
@import "s2-docs-alert";
|
||||
@import "s2-docs-home";
|
||||
@import "s2-docs-examples";
|
||||
@import "anchorjs";
|
||||
@import "jumbotron";
|
||||
@import "prettify";
|
||||
@ -62,11 +63,3 @@ pre {
|
||||
background-color: #f7f7f9;
|
||||
border: 1px solid #e1e1e8;
|
||||
}
|
||||
|
||||
.s2-docs-headline-example {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: #959595;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user