2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-02 16:04:07 +03:00

unaffix sidebar and simplify styles of docs side nav to be more like v3

This commit is contained in:
Mark Otto
2015-08-05 00:38:36 -07:00
parent 0156fc1c9d
commit d80f26fe49
15 changed files with 4477 additions and 7676 deletions
+3 -10
View File
@@ -1,18 +1,11 @@
<header class="navbar navbar-static-top bd-sidebar" id="top" role="banner">
<a href="{{ site.baseurl }}/" class="navbar-brand">
Bootstrap 4 Alpha
</a>
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#docsNavbarContent">
&#9776;
</button>
<div class="bd-sidebar">
<form class="bd-search hidden-sm-down">
<input type="text" class="form-control" id="search-input" placeholder="Search...">
<ul class="dropdown-menu bd-search-results" id="search-results"></ul>
</form>
<nav class="bd-links collapse navbar-toggleable-xs" id="docsNavbarContent">
<nav class="bd-links" id="docsNavbarContent">
{% for group in site.data.nav %}
{% assign link = group.pages | first %}
{% assign slug = group.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' %}
@@ -64,4 +57,4 @@
</div>
{% endfor %}
</nav>
</header>
</div>
+11 -6
View File
@@ -2,10 +2,15 @@
layout: default
---
{% include nav-docs.html %}
<div class="bd-container bd-content">
{% include ads.html %}
<h1 class="bd-title">{{ page.title }}</h1>
{{ content }}
<div class="container">
<div class="row">
<div class="col-sm-3 col-sm-push-9 bd-sidebar">
{% include nav-docs.html %}
</div>
<div class="col-sm-9 col-sm-pull-3 bd-content">
{% include ads.html %}
<h1 class="bd-title">{{ page.title }}</h1>
{{ content }}
</div>
</div>
</div>
+1 -45
View File
@@ -5,7 +5,7 @@
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
.bd-docs {
padding-top: 3.7rem; }
padding-top: 5rem; }
.bd-container {
position: relative;
@@ -61,50 +61,6 @@
#markdown-toc > li:first-child {
display: none; }
.bd-sidebar {
padding: 0;
margin-bottom: 0;
background-color: #fafafa; }
.bd-sidebar .navbar-toggler {
position: absolute;
top: 1rem;
right: 0;
z-index: 5; }
.bd-sidebar .navbar-header {
float: none;
margin-right: -15px; }
.bd-sidebar .navbar-collapse {
padding: 0;
border: 0; }
@media (min-width: 992px) {
.bd-docs {
margin-left: 240px; }
.bd-sidebar {
position: fixed;
top: 3.7rem;
bottom: 0;
left: 0;
width: 240px;
overflow-y: auto;
border-right: 1px solid #eee;
-webkit-transform: translated3d(0, 0, 0); } }
.bd-sidebar .navbar-brand {
display: block;
float: none;
height: auto;
padding: 1.55rem 1.25rem;
font-size: 20px;
font-weight: 500;
line-height: 1; }
.bd-sidebar-brand:hover,
.bd-sidebar-brand:focus {
text-decoration: none; }
.bd-search {
position: relative;
margin-right: 1.25rem;
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
.bd-docs {
padding-top: 3.7rem;
padding-top: 5rem;
}
// Custom container
+49 -49
View File
@@ -3,59 +3,59 @@
//
.bd-sidebar {
padding: 0;
margin-bottom: 0;
background-color: #fafafa;
// padding: 0;
// margin-bottom: 0;
// background-color: #fafafa;
.navbar-toggler {
position: absolute;
top: 1rem;
right: 0;
z-index: 5;
}
// .navbar-toggler {
// position: absolute;
// top: 1rem;
// right: 0;
// z-index: 5;
// }
}
.bd-sidebar .navbar-header {
float: none;
margin-right: -15px;
}
// .bd-sidebar .navbar-header {
// float: none;
// margin-right: -15px;
// }
//
// .bd-sidebar .navbar-collapse {
// padding: 0;
// border: 0;
// }
.bd-sidebar .navbar-collapse {
padding: 0;
border: 0;
}
@media (min-width: 992px) {
.bd-docs {
margin-left: 240px;
}
.bd-sidebar {
position: fixed;
top: 3.7rem;
bottom: 0;
left: 0;
width: 240px;
overflow-y: auto;
border-right: 1px solid #eee;
-webkit-transform: translated3d(0,0,0); // Ensure proper scrolling of sidebar
}
}
.bd-sidebar .navbar-brand {
display: block;
float: none;
height: auto;
padding: 1.55rem 1.25rem;
font-size: 20px;
font-weight: 500;
line-height: 1;
// color: #fff;
}
.bd-sidebar-brand:hover,
.bd-sidebar-brand:focus {
// color: #fff;
text-decoration: none;
}
// @media (min-width: 992px) {
// .bd-docs {
// margin-left: 240px;
// }
// .bd-sidebar {
// position: fixed;
// top: 3.7rem;
// bottom: 0;
// left: 0;
// width: 240px;
// overflow-y: auto;
// border-right: 1px solid #eee;
// -webkit-transform: translated3d(0,0,0); // Ensure proper scrolling of sidebar
// }
// }
//
// .bd-sidebar .navbar-brand {
// display: block;
// float: none;
// height: auto;
// padding: 1.55rem 1.25rem;
// font-size: 20px;
// font-weight: 500;
// line-height: 1;
// // color: #fff;
// }
// .bd-sidebar-brand:hover,
// .bd-sidebar-brand:focus {
// // color: #fff;
// text-decoration: none;
// }
.bd-search {
position: relative;