Skip to content

Commit c2c8692

Browse files
committed
fix scroll bug
1 parent fa3029d commit c2c8692

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

_includes/docs/js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
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>
1+
<script>$(function(){var o=$(".docs-sidenav"),n=$(window),i=o.offset(),t=120;$(window).width()>991&&n.scroll(function(){n.scrollTop()>i.top?o.stop().animate({marginTop:n.scrollTop()-i.top+t}):o.stop().animate({marginTop:40})})});</script>

_includes/docs/side-nav.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
Overview
77
</a>
88
</li>
9+
910
{% for post in site.posts reversed %}
1011
<li>
11-
<a class="page-scroll" href="#{{ post.id }}">
12-
{{ post.title }}
13-
</a>
12+
<a class="page-scroll" href="#{{ post.id }}">{{ post.title }}</a>
1413
</li>
1514
{% endfor %}
1615

1716
</ul>
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
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
2022
</a>
21-
<a class="page-scroll back-to-top" href="#top">
23+
<a class="back-to-top" href="#top">
2224
<i class="glyphicon glyphicon-chevron-up"></i> Back to top
2325
</a>
2426

0 commit comments

Comments
 (0)