Updated control sidebar to get rid of the need for javascript to keep up with its height

pull/325/merge
Abdullah Almsaeed 2015-04-03 11:57:46 -04:00
parent 9a122a39d6
commit a00ab59882
6 changed files with 32 additions and 12 deletions

View File

@ -1,34 +1,52 @@
/*
* Component: Control sidebar. By deafult, this is the right sidebar.
*/
//The sidebar's backhround control class
//This is a hack to make the background visible while scrolling
.control-sidebar-bg {
position: fixed;
z-index: 900;
top: 0;
right: 0;
bottom: 0;
width: @control-sidebar-width;
background: @sidebar-dark-bg;
}
//Transitions
.control-sidebar-bg,
.control-sidebar {
.translate(@control-sidebar-width, 0);
.transition-transform(@transition-speed ease-in-out);
}
.control-sidebar {
position: absolute;
top: @navbar-height;
right: 0;
width: @control-sidebar-width;
z-index: 1010;
background: @sidebar-dark-bg;
z-index: 1010;
color: @sidebar-dark-color;
//Make it hide in small screens
//Fix position after header collapse
@media (max-width: @screen-sm) {
top: @navbar-height + 50;
//.translate(@control-sidebar-width, 0);
top: @navbar-height + 50;
}
//Tab panes
> .tab-content {
padding: 10px 15px;
}
//Open state
//Open state with slide over content effect
&.control-sidebar-open {
.translate(0, 0);
&,
+ .control-sidebar-bg {
.translate(0, 0);
}
}
}
//Open without silde over content
.control-sidebar-open {
.control-sidebar-bg,
.control-sidebar {
.translate(0,0);
.translate(0,0);
}
.content-wrapper,
.right-side,
@ -37,6 +55,7 @@
}
}
//Control sidebar tabs
.control-sidebar-tabs {
border-bottom: darken(@sidebar-dark-bg, 3%);

View File

@ -82,7 +82,7 @@ body {
background: #fff;
padding: 15px;
color: #444;
border-top: 1px solid #eee;
border-top: 1px solid @gray;
}
/* Fixed layout */

View File

@ -50,6 +50,7 @@
> .image > img {
width: 45px;
height: 45px;
max-width: 100%!important;
}
> .info {
font-weight: 600;

View File

@ -51,5 +51,5 @@
}
//Create the sidebar skin
.skin-dark-sidebar(@purple);
.skin-light-sidebar(@purple);
}

View File

@ -51,5 +51,5 @@
}
//Create the sidebar skin
.skin-dark-sidebar(@red);
.skin-light-sidebar(@red);
}

View File

@ -51,5 +51,5 @@
}
//Create the sidebar skin
.skin-dark-sidebar(@yellow);
.skin-light-sidebar(@yellow);
}