scinote-web/app/assets/stylesheets/partials/_sidebar.scss

129 lines
2.4 KiB
SCSS
Raw Normal View History

2016-02-12 23:52:43 +08:00
/*!
* Start Bootstrap - Simple Sidebar HTML Template (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
@import 'constants';
2016-02-12 23:52:43 +08:00
@import "mixins";
$wrapper-width: 280px;
$toggle-btn-size: 50px;
@mixin sidebar-shown {
// This rule is always overriden (show()) in JS
// after document is loaded
display: none;
padding-left: $wrapper-width;
padding-right: 0;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
#sidebar-arrow {
background-color: $brand-default;
border-bottom-right-radius: 10px;
border-top-right-radius: 10px;
bottom: 50%;
box-shadow: 2px 0 4px $color-alto;
display: block;
position: absolute;
right: -18px;
span {
padding: 9px 5px;
}
}
#sidebar-arrow:hover {
background-color: $color-concrete;
cursor: pointer;
}
#sidebar-arrow > span {
transform: rotateY(0deg);
transition: .6s; }
#sidebar-arrow[data-shown] > span {
padding-left: 7px;
padding-right: 3px;
transform: rotateY(180deg);
transition: .6s;
}
2016-02-12 23:52:43 +08:00
#sidebar-wrapper {
2018-03-22 18:41:33 +08:00
background-color: $color-white;
box-shadow: 1px 3px 6px $color-alto;
2016-02-12 23:52:43 +08:00
height: 100%;
margin-left: -$wrapper-width;
2018-05-09 19:56:32 +08:00
position: fixed;
2016-02-12 23:52:43 +08:00
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
2018-05-09 19:56:32 +08:00
-webkit-transition: all 0.5s ease;
2016-02-12 23:52:43 +08:00
transition: all 0.5s ease;
2018-05-09 19:56:32 +08:00
width: $wrapper-width;
z-index: 999;
2016-02-12 23:52:43 +08:00
#slide-panel {
height: 100%;
.tree {
margin-bottom: 0;
opacity: 1;
2018-03-22 18:41:33 +08:00
overflow-y: auto;
padding: 20px 0;
2016-02-12 23:52:43 +08:00
// Animations
@include transition(opacity 0.5s ease);
}
}
}
}
@mixin sidebar-hidden {
padding-left: 0;
#sidebar-wrapper {
2018-03-14 21:33:34 +08:00
margin-left: 0;
2016-02-12 23:52:43 +08:00
width: 0;
#slide-panel {
.tree {
opacity: 0;
@include transition(opacity 0.5s ease);
}
}
}
}
2016-08-08 14:37:22 +08:00
.my-module-group-element::before {
2016-08-08 14:40:24 +08:00
border-left: 1px dotted $color-emperor;
2016-08-08 14:37:22 +08:00
bottom: 20px;
content: "";
2016-08-08 14:33:18 +08:00
position: absolute;
top: 25px;
left: 34px;
2016-08-03 22:16:09 +08:00
}
2016-02-12 23:52:43 +08:00
#wrapper {
@include sidebar-shown;
}
#wrapper.no-animation * {
@include no-animation;
}
#wrapper.toggled {
@include sidebar-hidden;
}
#wrapper.hidden2 {
@include sidebar-hidden;
}
.sidebar-no-module-group {
color: $color-silver-chalice;
}