ngx-admin/src/app/@theme/components/header/header.component.scss

198 lines
3.4 KiB
SCSS
Raw Normal View History

2017-08-03 13:53:18 +03:00
@import '../../styles/themes';
2017-09-05 16:41:03 +03:00
@import '~@nebular/theme/styles/global/bootstrap/hero-buttons';
2017-09-11 11:44:04 +03:00
@import '~bootstrap/scss/mixins/breakpoints';
@import '~@nebular/theme/styles/global/bootstrap/breakpoints';
2017-06-21 17:34:10 +03:00
@include nb-install-component() {
display: flex;
justify-content: space-between;
width: 100%;
.left {
2017-09-11 11:44:04 +03:00
display: flex;
width: 100%;
order: 0;
flex-direction: row;
}
.right {
order: 1;
flex-direction: row-reverse;
}
2017-09-11 11:44:04 +03:00
.logo-containter {
display: flex;
align-items: center;
}
.switcher-container {
display: flex;
flex-direction: column;
align-items: center;
width: 50%;
}
2017-09-12 18:35:39 +03:00
.control-item {
2017-09-11 11:44:04 +03:00
display: block;
}
.header-container {
display: flex;
align-items: center;
2017-09-11 11:44:04 +03:00
width: 100%;
.navigation {
padding-right: nb-theme(padding);
2017-06-21 17:34:10 +03:00
font-size: 2.5rem;
}
.logo {
padding: 0 nb-theme(padding);
font-size: 1.75rem;
font-weight: nb-theme(font-weight-bolder);
border-left: 1px solid nb-theme(separator);
span {
font-weight: nb-theme(font-weight-normal);
}
}
}
.theme-switch {
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
2017-09-12 21:55:09 +03:00
margin: 0;
2017-09-05 16:41:03 +03:00
& > span {
font-size: 1.125rem;
font-weight: nb-theme(font-weight-bold);
transition: opacity 0.3s ease;
2017-09-05 16:41:03 +03:00
&.light {
color: nb-theme(color-fg-text);
2017-09-12 21:55:09 +03:00
padding-right: 10px;
}
2017-09-05 16:41:03 +03:00
&.cosmic {
color: nb-theme(color-fg);
2017-09-12 21:55:09 +03:00
padding-left: 10px;
}
@include nb-for-theme(cosmic) {
&.light {
2017-09-05 16:41:03 +03:00
color: nb-theme(color-fg);
}
&.cosmic {
color: nb-theme(color-white);
2017-09-05 16:41:03 +03:00
}
}
&:active {
opacity: 0.78;
2017-09-05 16:41:03 +03:00
}
}
}
2017-09-05 16:41:03 +03:00
.switch {
position: relative;
display: inline-block;
width: 4rem;
height: 1.75rem;
margin: 0;
2017-09-05 16:41:03 +03:00
input {
display: none;
2017-09-05 16:41:03 +03:00
&:checked + .slider::before {
transform: translateX(2.25rem);
2017-09-05 16:41:03 +03:00
}
}
2017-09-05 16:41:03 +03:00
.slider {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 1.75rem;
background-color: nb-theme(layout-bg);
}
2017-09-05 16:41:03 +03:00
.slider::before {
position: absolute;
content: '';
height: 1.75rem;
width: 1.75rem;
border-radius: 50%;
background-color: nb-theme(color-success);
transition: 0.2s;
2017-09-05 16:41:03 +03:00
box-shadow: 0 0 0.25rem 0 rgba(nb-theme(color-fg), 0.4);
2017-09-05 16:41:03 +03:00
@include nb-for-theme(cosmic) {
@include btn-hero-primary-gradient();
}
}
}
2017-08-30 17:22:05 +03:00
.toggle-layout /deep/ a {
2017-09-11 11:44:04 +03:00
display: block;
2017-08-30 17:22:05 +03:00
text-decoration: none;
line-height: 1;
i {
2017-08-31 12:35:55 +03:00
color: nb-theme(color-success);
font-size: 2.25rem;
2017-08-31 12:35:55 +03:00
@include nb-for-theme(cosmic) {
color: nb-theme(link-color);
2017-08-31 12:35:55 +03:00
}
2017-08-30 17:22:05 +03:00
}
}
2017-09-11 11:44:04 +03:00
@include media-breakpoint-down(md) {
2017-09-12 18:35:39 +03:00
.control-item {
2017-09-11 11:44:04 +03:00
display: none;
}
}
@include media-breakpoint-down(sm) {
nb-user /deep/ .user-name {
display: none;
}
}
2017-09-12 21:55:09 +03:00
@include media-breakpoint-down(is) {
.header-container {
.logo {
font-size: 1.25rem;
}
}
2017-09-11 11:44:04 +03:00
.toggle-layout {
display: none;
}
.switcher-container {
2017-09-12 21:55:09 +03:00
.light, .cosmic {
display: none;
}
}
}
@include media-breakpoint-down(xs) {
.right /deep/ {
2017-09-11 11:44:04 +03:00
display: none;
}
2017-09-12 21:55:09 +03:00
.switcher-container {
align-items: flex-end;
}
2017-09-11 11:44:04 +03:00
}
}