@import '_mixins'; @import '_vars'; @mixin panel-icon { color: $color-border-dark; font-size: 1.2rem; font-weight: 400; text-decoration: none; text-align: center; padding: .6rem; cursor: pointer; &:hover, &:focus { text-decoration: none; cursor: pointer; color: darken($color-border-dark, 10%); } &.active { color: $color-theme-blue; } } // // Panel container to enforce horizontal stacking and scrolling. // .panel-container { @include fixed($size-navbar-height, 0, 0, $size-sidebar-width); @include scrollbars(8px, $color-border-dark); overflow-x: auto; overflow-y: hidden; } // // Panel element. // .panel { & { @include flex-box; @include flex-flow(column); height: 100%; background: $color-background; border-right: 1px solid $color-border; position: relative; } // First row of the panel with the header. Fixed height. &-header { & { background: $panel-light-background; min-height: $panel-header; max-height: $panel-header; padding: $panel-padding; position: relative; } &-row { @include flex-box; @include flex-flow(row); margin-top: 1.2rem; position: relative; } &.large { min-height: 8rem; max-height: 8rem; } .form-inline { display: inline-block; } } // Second row of the panel with the content. &-main { @include flex-box; @include flex-flow(row); @include flex-grow(1); overflow: hidden; } // First column of the main row (second row) with the main content. &-content { // Content area is gray by default to contain scrollable content, e.g. lists. & { @include flex-grow(1); border-top: 1px solid $color-border; background: $color-background; padding: $panel-padding; overflow-x: hidden; overflow-y: auto; } // White content area, e.g. for history panel. &-blank { background: $panel-light-background; border: 0; } &-blank-bordered { border-top: 1px solid $color-border; } // Scrolling must be enabled optionally to prevent bugs. &-scroll { overflow-y: scroll; } &-scroll-x { overflow-y: auto; } & .nav-panel { & { margin-left: -$panel-padding; margin-right: -$panel-padding; } & .nav-link { padding-left: $panel-padding; padding-right: $panel-padding; } } } // Error or alert on top of the panel content. &-alert { & { padding: .5 * $panel-padding $panel-padding; margin: -$panel-padding; margin-bottom: $panel-padding; font-size: .9rem; font-weight: normal; color: $color-dark-foreground; } a { & { color: $color-dark-foreground !important; } &, &:hover { text-decoration: underline; } } &-success { background: $color-theme-green-dark; } &-danger { background: $color-theme-error-dark; } } // Second column of the main row (second row) with additional links. &-sidebar { & { background: $panel-light-background; border-left: 1px solid $color-border; min-width: $panel-sidebar; max-width: $panel-sidebar; } &.wide { min-width: 16rem; max-width: 16rem; } & .panel-nav { min-width: $panel-sidebar; max-width: $panel-sidebar; position: absolute; } & .panel-link { & { @include transition(background-color .3s ease); @include panel-icon; display: block; padding-top: .6rem; padding-bottom: .6rem; position: relative; border-top: 1px solid transparent; border-bottom: 1px solid transparent; } &:hover { color: $color-theme-blue-dark; } &.active { & { border-color: $color-border; } &::before { @include absolute(0, -1px, 0, auto); width: 2px; color: transparent; content: ''; background: $panel-light-background; } } &-gray { &.active { &::before { background: transparent; } } } } } // Panel title. &-title { @include truncate; line-height: 2rem; font-size: 1.5rem; font-weight: 400; padding-right: 2rem; } // Keep some space on the right side for the close icon. &-title-row { padding-right: $panel-sidebar - $panel-padding; } // Close button to close the panel. &-close { @include absolute($panel-padding - .2rem, $panel-padding - .8rem, auto, auto); @include panel-icon; font-size: 1rem; font-weight: 300; } } // // Dark panel. // .panel-dark { & { @include box-shadow(2px, 0, 1px, .3); border-right: 1px solid darken($color-dark2-foreground, 15%); background: $color-dark2-background; color: $color-dark2-foreground; } .panel-content, .panel-header { background: $color-dark2-background; border: 0; } .panel-content { @include scrollbars(8px, darken($color-dark2-foreground, 10%), transparent); } .panel-close { & { color: $color-dark2-foreground; } &:hover { color: lighten($color-dark2-foreground, 15%); } } .nav-link { @include transition(color .4s ease); } } // // Fixed main sidebar. // .sidebar { & { @include fixed($size-navbar-height, auto, 0, 0); @include box-shadow(2px, 0, 1px, .1); min-width: $size-sidebar-width; max-width: $size-sidebar-width; border-right: 1px solid $color-dark1-border1; background: $color-dark1-background; z-index: 100; } .nav { &-icon { font-size: 2rem; } &-text { font-size: .9rem; } &-link { & { @include transition(color .3s ease); padding: 1.25rem; display: block; text-align: center; text-decoration: none; color: $color-dark1-foreground; } &:hover, &.active { color: $color-dark1-focus-foreground; .nav-icon { color: $color-theme-blue; } } &.active { background: $color-dark1-active-background; } } } &-item { & { @include border-radius; padding: .25rem 1rem; display: block; font-size: .9rem; font-weight: normal; margin-bottom: .25rem; } &-remove { visibility: hidden; } &.active { font-weight: bold; } &.active, &:hover { background: $color-theme-secondary; } &.inactive { background: none; } &:hover { .sidebar-item-remove { visibility: visible; } } } } a { &.sidebar-item { cursor: pointer !important; } } // // Grid with footer and header // .grid { & { @include flex-box; @include flex-direction(column); overflow: hidden; padding: 0; } .grid-content, .grid-header, .grid-footer { padding: 0 $panel-padding; } .grid-content { @include flex-grow(1); padding-top: .5rem; padding-bottom: .5rem; overflow-y: scroll; } .grid-header { & { border: 0; border-bottom: 2px solid $color-border; } th { padding: .75rem; } .table-items { margin: 0; } } .grid-footer { border-top: 2px solid $color-border; } .pagination { margin: .25rem 0; } }