Skip to content

Commit

Permalink
fix: update layout based on corporate theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-haji committed Jul 20, 2018
1 parent ced05b8 commit c58edcb
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 2 deletions.
24 changes: 24 additions & 0 deletions src/app/@theme/layouts/one-column/one-column.layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,31 @@

margin-top: nb-theme(sidebar-header-gap);

@include nb-for-theme(corporate) {
margin-top: 0;
}

/deep/ .main-container {
height:
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
@include nb-ltr(border-top-right-radius, nb-theme(radius));
@include nb-rtl(border-top-left-radius, nb-theme(radius));

@include nb-for-theme(corporate) {
border: 1px solid nb-theme(separator);
height:
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)}) !important;
}
}

/deep/ .scrollable {
@include nb-for-theme(corporate) {
padding-top: 0;

.menu-item:first-child {
border-top: none;
}
}
}

/deep/ nb-sidebar-header {
Expand All @@ -67,6 +87,10 @@
font-weight: bold;
transition: padding 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.48);

@include nb-for-theme(corporate) {
border-radius: nb-theme(radius);
}

i {
font-size: 2rem;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
Expand Down
38 changes: 36 additions & 2 deletions src/app/@theme/layouts/sample/sample.layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,45 @@
}
}

.main-btn {
@include nb-for-theme(corporate) {
display: none;
}
}

nb-sidebar-header {
@include nb-for-theme(corporate) {
padding: 0;
}
}

nb-sidebar.menu-sidebar {

margin-top: nb-theme(sidebar-header-gap);

@include nb-for-theme(corporate) {
margin-top: 0rem;
}

/deep/ .main-container {
height:
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
height: calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
@include nb-ltr(border-top-right-radius, nb-theme(radius));
@include nb-rtl(border-top-left-radius, nb-theme(radius));

@include nb-for-theme(corporate) {
border: 1px solid nb-theme(separator);
height: calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)}) !important;
}
}

/deep/ .scrollable {
@include nb-for-theme(corporate) {
padding-top: 0;

.menu-item:first-child {
border-top: none;
}
}
}

/deep/ nb-sidebar-header {
Expand All @@ -67,6 +97,10 @@
font-weight: bold;
transition: padding 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.48);

@include nb-for-theme(corporate) {
border-radius: nb-theme(radius);
}

i {
font-size: 2rem;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
Expand Down

0 comments on commit c58edcb

Please sign in to comment.