mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
364 lines
7.9 KiB
364 lines
7.9 KiB
@import '_mixins';
|
|
@import '_vars';
|
|
|
|
@mixin panel-icon {
|
|
color: $color-border-dark;
|
|
cursor: pointer;
|
|
font-size: 1.2rem;
|
|
font-weight: 400;
|
|
padding: .6rem;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
|
|
&:hover,
|
|
&:focus {
|
|
color: darken($color-border-dark, 10%);
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
}
|
|
|
|
&.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 {
|
|
& {
|
|
background: $color-background;
|
|
border-right: 1px solid $color-border;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
position: relative;
|
|
}
|
|
|
|
// First row of the panel with the header. Fixed height.
|
|
&-header {
|
|
& {
|
|
@include force-height($panel-header);
|
|
background: $panel-light-background;
|
|
padding: $panel-padding;
|
|
position: relative;
|
|
}
|
|
|
|
&-row {
|
|
display: flex;
|
|
flex-direction: row;
|
|
margin-bottom: 0;
|
|
margin-top: 1.2rem;
|
|
position: relative;
|
|
}
|
|
|
|
&.large {
|
|
@include force-height(8rem);
|
|
}
|
|
|
|
.form-inline {
|
|
display: inline-block;
|
|
}
|
|
}
|
|
|
|
// Second row of the panel with the content.
|
|
&-main {
|
|
display: flex;
|
|
flex-direction: row;
|
|
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.
|
|
& {
|
|
background: $color-background;
|
|
border-top: 1px solid $color-border;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
padding: $panel-padding;
|
|
}
|
|
|
|
// 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;
|
|
}
|
|
|
|
&.grid {
|
|
display: flex;
|
|
padding: 0;
|
|
}
|
|
|
|
& .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 {
|
|
& {
|
|
color: $color-dark-foreground;
|
|
font-size: .9rem;
|
|
font-weight: normal;
|
|
padding: .5 * $panel-padding $panel-padding;
|
|
}
|
|
|
|
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 {
|
|
& {
|
|
@include force-width($panel-sidebar);
|
|
background: $panel-light-background;
|
|
border-left: 1px solid $color-border;
|
|
}
|
|
|
|
&.wide {
|
|
@include force-width(16rem);
|
|
}
|
|
|
|
& .panel-nav {
|
|
@include force-width($panel-sidebar);
|
|
position: absolute;
|
|
}
|
|
|
|
& .panel-link {
|
|
& {
|
|
@include panel-icon;
|
|
border-bottom: 1px solid transparent;
|
|
border-top: 1px solid transparent;
|
|
display: block;
|
|
padding-bottom: .6rem;
|
|
padding-top: .6rem;
|
|
position: relative;
|
|
transition: background-color .3s ease;
|
|
}
|
|
|
|
&:hover {
|
|
color: $color-theme-blue-dark;
|
|
}
|
|
|
|
&.active {
|
|
& {
|
|
border-color: $color-border;
|
|
}
|
|
|
|
&::before {
|
|
@include absolute(0, -1px, 0, auto);
|
|
background: $panel-light-background;
|
|
color: transparent;
|
|
content: '';
|
|
width: 2px;
|
|
}
|
|
}
|
|
|
|
&-gray {
|
|
&.active {
|
|
&::before {
|
|
background: transparent;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Panel title.
|
|
&-title {
|
|
@include truncate;
|
|
font-size: 1.5rem;
|
|
font-weight: 400;
|
|
line-height: 2rem;
|
|
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-outer(2px, 0, 1px, .3);
|
|
background: $color-dark2-background;
|
|
border-right: 1px solid darken($color-dark2-foreground, 15%);
|
|
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 {
|
|
transition: color .4s ease;
|
|
}
|
|
}
|
|
|
|
//
|
|
// Fixed main sidebar.
|
|
//
|
|
.sidebar {
|
|
& {
|
|
@include fixed($size-navbar-height, auto, 0, 0);
|
|
@include box-shadow-outer(2px, 0, 1px, .1);
|
|
@include force-width($size-sidebar-width);
|
|
background: $color-dark1-background;
|
|
border-right: 1px solid $color-dark1-border1;
|
|
z-index: 100;
|
|
}
|
|
|
|
.nav {
|
|
&-icon {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
&-text {
|
|
font-size: .9rem;
|
|
}
|
|
|
|
&-link {
|
|
& {
|
|
color: $color-dark1-foreground;
|
|
display: block;
|
|
padding: 1.25rem;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
transition: color .3s ease;
|
|
}
|
|
|
|
&:hover,
|
|
&.active {
|
|
color: $color-dark1-focus-foreground;
|
|
|
|
.nav-icon {
|
|
color: $color-theme-blue;
|
|
}
|
|
}
|
|
|
|
&.active {
|
|
background: $color-dark1-active-background;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-item {
|
|
& {
|
|
@include border-radius;
|
|
display: block;
|
|
font-size: .9rem;
|
|
font-weight: normal;
|
|
margin-bottom: .25rem;
|
|
padding: .25rem 1rem;
|
|
}
|
|
|
|
&-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;
|
|
}
|
|
}
|