Skip to content

Commit 5344a73

Browse files
committed
fix sidebar link issues
1 parent 367cc49 commit 5344a73

File tree

8 files changed

+81
-174
lines changed

8 files changed

+81
-174
lines changed

_includes/docs/docs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<section id="docs" class="container">
1+
<section id="docs" class="container bs-docs-container">
22
<div class="row">
33

44
{% include docs/side-nav.html %}

_includes/docs/footer.html

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,23 @@
3636
Copyright &copy; 2016 Shawn McKay (<a href="https://twitter.com/sh_mck" target="_blank">@Sh_McK</a>), Vancouver, BC. All Rights Reserved.
3737
</p>
3838
</div>
39-
<div class="col-md-5 col-xs-12" id="mc_embed_signup">
40-
<form class="form-inline"
41-
action="//herokuapp.us11.list-manage.com/subscribe/post?u=324732fa284e63ca555b47978&amp;id=5f3f4f5086"
42-
method="post"
43-
id="mc-embedded-subscribe-form"
44-
name="mc-embedded-subscribe-form"
45-
class="validate"
46-
target="_blank"
47-
novalidate>
48-
<label class="sr-only" style="text-align:center">Subscribe to our mailing list</label>
49-
<div class="form-group">
50-
<input type="email" value="" class="form-control" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" style="font-family: Lato,Helvetica,Arial,sans-serif" required />
51-
<button type="submit" name="subscribe" id="mc-embedded-subscribe" class="btn btn-default">
52-
<i class="fa fa-envelope-o fa-fw"></i>
53-
<span class="network-name">
39+
<div class="col-md-5 col-xs-12" id="mc_embed_signup">
40+
<form class="form-inline" action="//herokuapp.us11.list-manage.com/subscribe/post?u=324732fa284e63ca555b47978&amp;id=5f3f4f5086" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
41+
<label class="sr-only" style="text-align:center">Subscribe to our mailing list</label>
42+
<div class="form-group">
43+
<input type="email" value="" class="form-control" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" style="font-family: Lato,Helvetica,Arial,sans-serif" required />
44+
<button type="submit" name="subscribe" id="mc-embedded-subscribe" class="btn btn-default">
45+
<i class="fa fa-envelope-o fa-fw"></i>
46+
<span class="network-name">
5447
Subscribe To Mail List</span>
55-
</button>
56-
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
57-
<div style="position: absolute; left: -5000px;" aria-hidden="true">
58-
<input type="text" name="b_324732fa284e63ca555b47978_5f3f4f5086" tabindex="-1" value="" />
59-
</div>
48+
</button>
49+
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
50+
<div style="position: absolute; left: -5000px;" aria-hidden="true">
51+
<input type="text" name="b_324732fa284e63ca555b47978_5f3f4f5086" tabindex="-1" value="" />
6052
</div>
61-
</form>
62-
</div>
53+
</div>
54+
</form>
55+
</div>
6356
</div>
6457
</div>
6558
</footer>

_includes/docs/js.html

Lines changed: 2 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,2 @@
1-
<script>
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-
} else {
29-
$('.bs-docs-sidenav').html(html);
30-
}
31-
32-
$('[data-bootbox]').on('click', function() {
33-
var $target = $('#' + $(this).data('bootbox'));
34-
bootbox.alert({
35-
title: $target.attr('title'),
36-
message: $target.html()
37-
});
38-
});
39-
40-
/*!
41-
* JavaScript for Bootstrap's docs (http://getbootstrap.com)
42-
* Copyright 2011-2014 Twitter, Inc.
43-
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
44-
* details, see http://creativecommons.org/licenses/by/3.0/.
45-
*/
46-
! function(a) {
47-
a(function() {
48-
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
49-
var b = document.createElement("style");
50-
b.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),
51-
document.querySelector("head").appendChild(b)
52-
} {
53-
var c = a(window),
54-
d = a(document.body);
55-
a(".navbar").outerHeight(!0) + 10
56-
}
57-
d.scrollspy({
58-
target: ".bs-docs-sidebar"
59-
}),
60-
c.on("load", function() {
61-
d.scrollspy("refresh")
62-
}),
63-
a(".bs-docs-container [href=#]").click(function(a) {
64-
a.preventDefault()
65-
}),
66-
setTimeout(function() {
67-
var b = a(".bs-docs-sidebar");
68-
b.affix({
69-
offset: {
70-
top: function() {
71-
var c = b.offset().top,
72-
d = parseInt(b.children(0).css("margin-top"), 10),
73-
e = a(".bs-docs-nav").height();
74-
return this.top = c - e - d
75-
},
76-
bottom: function() {
77-
return this.bottom = a(".bs-docs-footer").outerHeight(!0)
78-
}
79-
}
80-
})
81-
}, 100),
82-
setTimeout(function() {
83-
a(".bs-top").affix()
84-
}, 100)
85-
})
86-
}(jQuery);
87-
});
88-
</script>
89-
90-
<script>
91-
$(function() {
92-
$('.gif').hover(function() {
93-
// on mouse enter
94-
var path = $(this).attr('src');
95-
var gif = path.substring(0, path.lastIndexOf('.')) + '.gif';
96-
$(this).attr('src', gif);
97-
}, function() {
98-
// on mouse leave
99-
var path = $(this).attr('src');
100-
var png = path.substring(0, path.lastIndexOf('.')) + '.png';
101-
$(this).attr('src', png);
102-
});
103-
});
104-
</script>
1+
<script src="/js/png2gif.min.js"></script>
2+
<!-- <script async src="/js/bs-docs-sidebar.js"></script> -->

_includes/docs/side-nav.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
1-
<aside class="col-md-3 col-xs-12" role="complementary">
2-
<div class="bs-docs-sidebar hidden-print">
3-
<ul class="nav sidebar">
1+
<div class="col-md-3" role="complementary">
2+
<div class="bs-docs-sidebar hidden-print affix-top">
3+
<ul class="nav bs-docs-sidenav">
44
<li>
55
<a class="page-scroll" href="#overview">
66
Overview
77
</a>
88
</li>
9-
109
{% for post in site.categories.docs reversed %}
1110
<li>
12-
<a class="page-scroll" href="#{{ post.id }}">{{ post.title }}</a>
11+
<a class="page-scroll" href="#{{ post.id }}">
12+
{{ post.title }}
13+
</a>
1314
</li>
1415
{% endfor %}
1516

1617
</ul>
17-
<a class="back-to-top" href="https://github.com/coderoad/coderoad.github.io/issues">
18-
<i class="fa fa-question"></i> Questions
19-
</a>
20-
<a class="back-to-top" href="https://github.com/coderoad/coderoad.github.io/issues">
21-
<i class="fa fa-exclamation"></i> Issues
18+
<a class="page-scroll back-to-top" href="https://github.com/coderoad/coderoad.github.io/issues">
19+
<i class="fa fa-question"></i> Questions or Issues
2220
</a>
23-
<a class="back-to-top" href="#top">
24-
<i class="fa fa-chevron-up"></i> Back to top
21+
<a class="page-scroll back-to-top" href="#top">
22+
<i class="glyphicon glyphicon-chevron-up"></i> Back to top
2523
</a>
2624

2725

2826

2927
</div>
3028

31-
</aside>
29+
</div>

_includes/js.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
<script src="/js/bootstrap.min.js"></script>
2020

2121
<!-- Custom Theme JavaScript -->
22-
<script src="/js/landing-page.min.js"></script>
23-
2422
<script src="/js/fontsmoothie.min.js" async></script>
2523

2624
<script src="/js/prism.js"></script>

js/bs-docs-sidebar.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
$(function() {
2+
// build side menu
3+
$('[data-bootbox]').on('click', function() {
4+
var $target = $('#' + $(this).data('bootbox'));
5+
bootbox.alert({
6+
title: $target.attr('title'),
7+
message: $target.html()
8+
});
9+
});
10+
/*!
11+
* JavaScript for Bootstrap's docs (http://getbootstrap.com)
12+
* Copyright 2011-2014 Twitter, Inc.
13+
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
14+
* details, see http://creativecommons.org/licenses/by/3.0/.
15+
*/
16+
! function(a) {
17+
a(function() {
18+
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
19+
var b = document.createElement("style");
20+
b.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")), document.querySelector("head").appendChild(b)
21+
} {
22+
var c = a(window),
23+
d = a(document.body);
24+
a(".navbar").outerHeight(!0) + 10
25+
}
26+
d.scrollspy({
27+
target: ".bs-docs-sidebar"
28+
}), c.on("load", function() {
29+
d.scrollspy("refresh")
30+
}), a(".bs-docs-container [href=#]").click(function(a) {
31+
a.preventDefault()
32+
}), setTimeout(function() {
33+
var b = a(".bs-docs-sidebar");
34+
b.affix({
35+
offset: {
36+
top: function() {
37+
var c = b.offset().top,
38+
d = parseInt(b.children(0).css("margin-top"), 10),
39+
e = a(".bs-docs-nav").height();
40+
return this.top = c - e - d
41+
},
42+
bottom: function() {
43+
return this.bottom = a(".bs-docs-footer").outerHeight(!0)
44+
}
45+
}
46+
})
47+
}, 100), setTimeout(function() {
48+
a(".bs-top").affix()
49+
}, 100)
50+
})
51+
}(jQuery);
52+
});

js/landing-page.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

js/landing-page.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)