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

124 lines
2.2 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.
*/
2020-01-24 20:22:04 +08:00
@import "constants";
2016-02-12 23:52:43 +08:00
@import "mixins";
2020-01-24 20:22:04 +08:00
:root {
--wrapper-width: 280px;
}
2016-02-12 23:52:43 +08:00
@mixin sidebar-shown {
// This rule is always overriden (show()) in JS
// after document is loaded
display: none;
2020-01-24 20:22:04 +08:00
padding-left: var(--wrapper-width);
2016-02-12 23:52:43 +08:00
padding-right: 0;
2020-01-24 20:22:04 +08:00
transition: .4s $timing-function-sharp;
2016-02-12 23:52:43 +08:00
#sidebar-arrow {
2020-01-24 20:22:04 +08:00
background-color: $color-concrete;
border-bottom-right-radius: 10px;
border-top-right-radius: 10px;
bottom: 50%;
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 {
2020-01-24 20:22:04 +08:00
background-color: $color-concrete;
2016-02-12 23:52:43 +08:00
height: 100%;
2020-01-24 20:22:04 +08:00
left: 83px;
2018-05-09 19:56:32 +08:00
position: fixed;
2020-01-24 20:22:04 +08:00
transition: .4s $timing-function-sharp;
width: var(--wrapper-width);
z-index: 999;
2016-02-12 23:52:43 +08:00
#slide-panel {
height: 100%;
2020-01-24 20:22:04 +08:00
overflow: hidden;
2016-02-12 23:52:43 +08:00
.disabled {
opacity: 1;
}
2016-02-12 23:52:43 +08:00
.tree {
margin-bottom: 0;
opacity: 1;
2018-03-22 18:41:33 +08:00
overflow-y: auto;
padding: 20px 0;
2020-01-24 20:22:04 +08:00
position: absolute;
right: 0;
width: var(--wrapper-width);
2016-02-12 23:52:43 +08:00
}
}
}
}
@mixin sidebar-hidden {
padding-left: 0;
#sidebar-wrapper {
2020-01-24 20:22:04 +08:00
left: calc(83px - var(--wrapper-width));
2016-02-12 23:52:43 +08:00
#slide-panel {
.tree {
2020-01-24 20:22:04 +08:00
@include transition(opacity .5s ease);
2016-02-12 23:52:43 +08:00
}
}
}
}
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: "";
2020-01-24 20:22:04 +08:00
left: 34px;
2016-08-08 14:33:18 +08:00
position: absolute;
top: 25px;
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;
}