1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

add basic back to top link to docs sidenavs, fixes #12589

This commit is contained in:
Mark Otto 2014-02-05 13:46:24 -08:00
parent 7861f6e8a5
commit f16a2376c1
4 changed files with 28 additions and 4 deletions

View file

@ -1,4 +1,4 @@
<header class="navbar navbar-static-top bs-docs-nav" role="banner">
<header class="navbar navbar-static-top bs-docs-nav" role="banner" id="top">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">

View file

@ -44,6 +44,9 @@
{% include nav-migration.html %}
{% endif %}
</ul>
<a class="back-to-top" href="#top">
Back to top
</a>
</div>
</div>
</div>

View file

@ -560,8 +560,8 @@ body {
padding-bottom: 10px;
}
.bs-sidebar .nav .nav > li > a {
padding-top: 2px;
padding-bottom: 2px;
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
font-size: 12px;
font-weight: normal;
@ -577,6 +577,27 @@ body {
padding-left: 28px;
}
/* Back to top (hidden on mobile) */
.back-to-top {
display: none;
margin-top: 10px;
margin-left: 10px;
padding: 4px 10px;
font-size: 12px;
font-weight: 500;
color: #999;
}
.back-to-top:hover {
text-decoration: none;
color: #563d7c;
}
@media (min-width: 768px) {
.back-to-top {
display: block;
}
}
/* Show and affix the side nav when space allows it */
@media (min-width: 992px) {
.bs-sidebar .nav > .active > ul {

File diff suppressed because one or more lines are too long