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

166 lines
3.5 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-wrapper {
2018-03-22 18:41:33 +08:00
background-color: $color-white;
2018-05-12 00:02:17 +08:00
box-shadow: 0 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: 1000;
2016-02-12 23:52:43 +08:00
#slide-panel {
height: 100%;
.sidebar-header {
height: $toggle-btn-size;
2018-03-28 19:54:01 +08:00
background: $brand-primary;
border-bottom: 2px solid darken($brand-primary, 10%);
2016-02-12 23:52:43 +08:00
.sidebar-header-title {
width: inherit;
color: $color-white;
display: inline-block;
margin-left: 15px;
margin-top: 6px;
text-transform: uppercase;
max-width: ($wrapper-width - $toggle-btn-size);
overflow: hidden;
text-overflow: ellipsis;
opacity: 1;
2016-08-03 22:16:09 +08:00
2016-02-12 23:52:43 +08:00
// Animations
@include transition(opacity 0.5s ease);
}
}
.sidebar-header-toggle {
height: $toggle-btn-size;
width: $toggle-btn-size;
margin-left: ($wrapper-width - $toggle-btn-size);
margin-top: -$toggle-btn-size;
2018-03-30 15:54:57 +08:00
font-size: $font-size-h3;
2018-03-28 19:54:01 +08:00
background: $brand-primary;
border-left: 2px solid darken($brand-primary, 10%);
border-bottom: 2px solid darken($brand-primary, 10%);
2016-02-12 23:52:43 +08:00
// Animations
@include transition(margin-left 0.5s ease);
span {
margin: 10px;
color: $color-white;
// Animations
@include rotate-animation(0.5s, 180deg);
@include transition(color 0.5s ease);
}
}
.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 {
.sidebar-header .sidebar-header-title {
width: 0;
opacity: 0;
@include transition(width 0.5s ease);
@include transition(opacity 0.5s ease);
}
.sidebar-header-toggle {
margin-left: 0;
background: none;
border: none;
@include transition(margin-left 0.5s ease);
span {
2018-03-28 19:54:01 +08:00
color: darken($brand-primary, 10%);
2016-02-12 23:52:43 +08:00
@include rotate-animation(0.5s, 0deg);
@include transition(color 0.5s ease);
}
}
.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;
}