Skip to content

Commit fa3029d

Browse files
committed
sidenav follows
1 parent 51f51a2 commit fa3029d

File tree

5 files changed

+8
-37
lines changed

5 files changed

+8
-37
lines changed

_includes/docs/js.html

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1 @@
1-
<script type="text/javascript">
2-
$(function(){
3-
// build side menu
4-
var html = '';
5-
6-
$('.bs-docs-section').each(function() {
7-
var h1 = $(this).find('h1[id]').first(),
8-
h23 = $(this).find('h2[id], h3[id]');
9-
10-
if (h1.length) {
11-
html+= '<li><a href="#' + h1[0].id +'">'+ h1.clone().children().remove().end().text() +'</a>';
12-
13-
if (h23.length) {
14-
html+= '<ul class="nav">';
15-
h23.each(function() {
16-
html+= '<li><a href="#' + this.id +'">'+ $(this).clone().children().remove().end().text() +'</a></li>';
17-
});
18-
html+= '</ul>';
19-
}
20-
21-
html+= '</li>';
22-
}
23-
});
24-
25-
if (html == '') {
26-
$('[role=complementary]').hide();
27-
$('[role=main]').toggleClass('col-md-9 col-md-12');
28-
}
29-
else {
30-
$('.bs-docs-sidenav').html(html);
31-
}
32-
33-
!function(a){a(function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var b=document.createElement("style");b.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.querySelector("head").appendChild(b)}{var c=a(window),d=a(document.body);a(".navbar").outerHeight(!0)+10}d.scrollspy({target:".bs-docs-sidebar"}),c.on("load",function(){d.scrollspy("refresh")}),a(".bs-docs-container [href=#]").click(function(a){a.preventDefault()}),setTimeout(function(){var b=a(".bs-docs-sidebar");b.affix({offset:{top:function(){var c=b.offset().top,d=parseInt(b.children(0).css("margin-top"),10),e=a(".bs-docs-nav").height();return this.top=c-e-d},bottom:function(){return this.bottom=a(".bs-docs-footer").outerHeight(!0)}}})},100),setTimeout(function(){a(".bs-top").affix()},100)})}(jQuery);
34-
</script>
1+
<script>$(function(){var o=$(".docs-sidenav"),n=$(window),t=o.offset(),a=120;n.scroll(function(){n.scrollTop()>t.top?o.stop().animate({marginTop:n.scrollTop()-t.top+a}):o.stop().animate({marginTop:40})})});</script>

_includes/docs/side-nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="col-md-3 col-sm-12" role="complementary">
22
<div class="bs-docs-sidebar hidden-print affix-top">
3-
<ul class="nav bs-docs-sidenav">
3+
<ul class="nav docs-sidenav">
44
<li>
55
<a class="page-scroll" href="#overview">
66
Overview

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<link href="/css/bootstrap.min.css" rel="stylesheet">
1515

1616
<!-- Custom CSS -->
17-
<link href="/css/landing-page.css" rel="stylesheet">
17+
<link href="/css/landing-page.min.css" rel="stylesheet">
1818
<link href="/css/prism.min.css" rel="stylesheet">
1919

2020
<!-- Custom Fonts -->

css/landing-page.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,7 @@ code {
224224
padding: 20px;
225225
text-align: left;
226226
}
227+
228+
.docs-sidenav {
229+
margin-top: 40px;
230+
}

css/landing-page.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)