123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438 |
- //
- // Component: Main Sidebar
- //
- .main-sidebar {
- height: 100vh;
- overflow-y: hidden;
- z-index: $zindex-main-sidebar;
- }
- .sidebar {
- height: calc(100% - 4rem);
- overflow-y: auto;
- padding-bottom: $sidebar-padding-y;
- padding-left: $sidebar-padding-x;
- padding-right: $sidebar-padding-x;
- padding-top: $sidebar-padding-y;
- }
- // Sidebar user panel
- .user-panel {
- position: relative;
- [class*='sidebar-dark'] & {
- border-bottom: 1px solid lighten($dark, 12%);
- }
- [class*='sidebar-light'] & {
- border-bottom: 1px solid $gray-300;
- }
- &,
- .info {
- overflow: hidden;
- white-space: nowrap;
- }
- .image {
- display: inline-block;
- padding-left: $nav-link-padding-x - .2;
- }
- img {
- height: auto;
- width: $sidebar-user-image-width;
- }
- .info {
- display: inline-block;
- padding: 5px 5px 5px 10px;
- }
- .status,
- .dropdown-menu {
- font-size: $font-size-sm;
- }
- }
- // Sidebar navigation menu
- .nav-sidebar {
- // All levels
- .nav-item {
- > .nav-link {
- margin-bottom: .2rem;
- .right {
- @include transition(transform $transition-fn $transition-speed);
- }
- }
- }
- .nav-link > .right,
- .nav-link > p > .right {
- position: absolute;
- right: 1rem;
- top: .7rem;
- i,
- span {
- margin-left: .5rem;
- }
- &:nth-child(2) {
- right: 2.2rem;
- }
- }
- .menu-open {
- > .nav-treeview {
- display: block;
- }
- > .nav-link {
- i.right {
- @include rotate(-90deg);
- }
- }
- }
- // First Level
- > .nav-item {
- margin-bottom: 0;
- .nav-icon {
- font-size: 1.2rem;
- margin-right: .2rem;
- text-align: center;
- width: $sidebar-nav-icon-width;
- &.fa,
- &.fas,
- &.far,
- &.fab,
- &.glyphicon,
- &.ion {
- font-size: 1.1rem;
- }
- }
- .float-right {
- margin-top: 3px;
- }
- }
- // Tree view menu
- .nav-treeview {
- display: none;
- list-style: none;
- padding: 0;
- > .nav-item {
- > .nav-link {
- > .nav-icon {
- width: $sidebar-nav-icon-width;
- }
- }
- }
- }
- &.nav-child-indent {
- .nav-treeview {
- transition: padding $transition-speed $transition-fn;
- padding-left: 1rem;
- }
- }
- .nav-header {
- font-size: .9rem;
- padding: $nav-link-padding-y;
- &:not(:first-of-type) {
- padding: 1.7rem 1rem .5rem;
- }
- }
- .nav-link p {
- display: inline-block;
- margin: 0;
- }
- }
- #sidebar-overlay {
- @include media-breakpoint-down(md) {
- .sidebar-open & {
- display: block;
- }
- }
- background-color: rgba($black, 0.1);
- bottom: 0;
- display: none;
- left: 0;
- position: fixed;
- right: 0;
- top: 0;
- z-index: $zindex-main-sidebar - 1;
- }
- .sidebar-mini-md {
- &.sidebar-open {
- #sidebar-overlay {
- @include media-breakpoint-up(sm) {
- display: none;
- }
- @include media-breakpoint-down(sm) {
- display: block;
- }
- }
- }
- }
- [class*='sidebar-light-'] {
- // Sidebar background color
- background-color: $sidebar-light-bg;
- // User Panel (resides in the sidebar)
- .user-panel {
- a:hover {
- color: $sidebar-light-hover-color;
- }
- .status {
- background: $sidebar-light-hover-bg;
- color: $sidebar-light-color;
- &:hover,
- &:focus,
- &:active {
- background: darken($sidebar-light-hover-bg, 3%);
- color: $sidebar-light-hover-color;
- }
- }
- .dropdown-menu {
- @include box-shadow(0 2px 4px rgba(0, 0, 0, .4));
- border-color: darken($sidebar-light-hover-bg, 5%);
- }
- .dropdown-item {
- color: $body-color;
- }
- }
- // Sidebar Menu. First level links
- .nav-sidebar > .nav-item {
- // links
- > .nav-link {
- // border-left: 3px solid transparent;
- &:active,
- &:focus {
- color: $sidebar-light-color;
- }
- }
- // Hover and active states
- &.menu-open > .nav-link,
- &:hover > .nav-link {
- background-color: $sidebar-light-hover-bg;
- color: $sidebar-light-hover-color;
- }
- > .nav-link.active {
- color: $sidebar-light-active-color;
- @if $enable-shadows {
- @extend .elevation-1;
- }
- }
- // First Level Submenu
- > .nav-treeview {
- background: $sidebar-light-submenu-bg;
- }
- }
- // Section Heading
- .nav-header {
- background: inherit;
- color: darken($sidebar-light-color, 5%);
- }
- // All links within the sidebar menu
- .sidebar {
- a {
- color: $sidebar-light-color;
- &:hover {
- text-decoration: none;
- }
- }
- }
- // All submenus
- .nav-treeview {
- > .nav-item {
- > .nav-link {
- color: $sidebar-light-submenu-color;
- }
- > .nav-link.active {
- &,
- &:hover {
- background-color: $sidebar-light-submenu-active-bg;
- color: $sidebar-light-submenu-active-color;
- }
- }
- > .nav-link:hover {
- background-color: $sidebar-light-submenu-hover-bg;
- }
- }
- }
- }
- [class*='sidebar-dark-'] {
- // Sidebar background color
- background-color: $sidebar-dark-bg;
- // User Panel (resides in the sidebar)
- .user-panel {
- a:hover {
- color: $sidebar-dark-hover-color;
- }
- .status {
- background: $sidebar-dark-hover-bg;
- color: $sidebar-dark-color;
- &:hover,
- &:focus,
- &:active {
- background: darken($sidebar-dark-hover-bg, 3%);
- color: $sidebar-dark-hover-color;
- }
- }
- .dropdown-menu {
- @include box-shadow(0 2px 4px rgba(0, 0, 0, .4));
- border-color: darken($sidebar-dark-hover-bg, 5%);
- }
- .dropdown-item {
- color: $body-color;
- }
- }
- // Sidebar Menu. First level links
- .nav-sidebar > .nav-item {
- // links
- > .nav-link {
- // border-left: 3px solid transparent;
- &:active {
- color: $sidebar-dark-color;
- }
- }
- // Hover and active states
- &.menu-open > .nav-link,
- &:hover > .nav-link,
- & > .nav-link:focus {
- background-color: $sidebar-dark-hover-bg;
- color: $sidebar-dark-hover-color;
- }
- > .nav-link.active {
- color: $sidebar-dark-hover-color;
- @if $enable-shadows {
- @extend .elevation-1;
- }
- }
- // First Level Submenu
- > .nav-treeview {
- background: $sidebar-dark-submenu-bg;
- }
- }
- // Section Heading
- .nav-header {
- background: inherit; //darken($sidebar-dark-bg, 3%);
- color: lighten($sidebar-dark-color, 5%);
- }
- // All links within the sidebar menu
- .sidebar {
- a {
- color: $sidebar-dark-color;
- &:hover,
- &:focus {
- text-decoration: none;
- }
- }
- }
- // All submenus
- .nav-treeview {
- > .nav-item {
- > .nav-link {
- color: $sidebar-dark-submenu-color;
- &:hover,
- &:focus {
- background-color: $sidebar-dark-submenu-hover-bg;
- color: $sidebar-dark-submenu-hover-color;
- }
- }
- > .nav-link.active {
- &,
- &:hover,
- &:focus {
- background-color: $sidebar-dark-submenu-active-bg;
- color: $sidebar-dark-submenu-active-color;
- }
- }
- }
- }
- }
- // Sidebar variants
- @each $name, $color in $theme-colors {
- .sidebar-dark-#{$name},
- .sidebar-light-#{$name} {
- @include sidebar-color($color)
- }
- }
- @each $name, $color in $colors {
- .sidebar-dark-#{$name},
- .sidebar-light-#{$name} {
- @include sidebar-color($color)
- }
- }
- // Nav Compact
- .nav-compact {
- .nav-link,
- .nav-header {
- padding: ($nav-link-padding-y / 2) ($nav-link-padding-x / 2);
- }
- .nav-header:not(:first-of-type) {
- padding: ($nav-link-padding-y * 1.5) ($nav-link-padding-x / 2) ($nav-link-padding-y / 2);
- }
- .nav-link > .right,
- .nav-link > p > .right {
- top: .5rem;
- right: .5rem;
- &:nth-child(2) {
- right: 1.6rem;
- }
- }
- }
|