Skip to content

Commit 20d3ed9

Browse files
committed
Update narik-ngx-admin module
1 parent 90d6efb commit 20d3ed9

10 files changed

+74
-340
lines changed

angular.json

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"styles": [
3838
"node_modules/bootstrap/dist/css/bootstrap.css",
3939
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
40+
"node_modules/roboto-fontface/css/roboto/roboto-fontface.css",
41+
"node_modules/typeface-exo/index.css",
4042
"node_modules/ngx-toastr/toastr.css",
4143
"node_modules/narik-ui-ng-bootstrap/styles/narik-ui-ng-bootstrap.css",
4244
"node_modules/narik-ui-swimlane/styles/narik-ui-swimlane.css",

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
"localforage": "^1.7.3",
3636
"lodash": "^4.17.11",
3737
"ng2-validation": "^4.2.0",
38+
"roboto-fontface": "^0.10.0",
39+
"typeface-exo": "0.0.61",
3840
"narik-app-core": "^2.0.2",
3941
"narik-client-storage": "^2.0.0",
4042
"narik-common": "^2.0.1",

src/app/modules/narik-ngx-admin/narik-ngx-admin.module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
NbSearchModule,
1212
NbSidebarModule,
1313
NbSidebarService,
14-
NbUserModule
14+
NbUserModule,
15+
NbIconModule
1516
} from "@nebular/theme";
1617
import { RouterModule } from "@angular/router";
1718

@@ -25,6 +26,7 @@ import { RouterModule } from "@angular/router";
2526
NbMenuModule.forRoot(),
2627
NbSearchModule,
2728
NbSidebarModule,
29+
NbIconModule,
2830
NbUserModule
2931
],
3032
declarations: [COMPONENTS],

src/app/modules/narik-ngx-admin/ngx-main-view/ngx-main-view.component.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33
<ngx-view-header [headerTitle]='headerTitle' [position]="'normal'"></ngx-view-header>
44
</nb-layout-header>
55

6-
<nb-sidebar [end]='false' class="menu-sidebar" tag="menu-sidebar" responsive>
7-
<nb-sidebar-header>
6+
7+
<nb-sidebar class="menu-sidebar" tag="menu-sidebar" responsive>
8+
<!-- <nb-sidebar-header >
89
<a class="btn btn-hero-success main-btn">
910
<i class="nb-menu"></i> <span>{{menuHeader}}</span>
1011
</a>
11-
</nb-sidebar-header>
12+
</nb-sidebar-header> -->
1213
<nb-menu [items]="menuItems"></nb-menu>
1314
</nb-sidebar>
1415

16+
1517
<nb-layout-column>
1618
<nb-card>
1719
<nb-card-header>
@@ -21,6 +23,5 @@
2123
<router-outlet></router-outlet>
2224
</nb-card-body>
2325
</nb-card>
24-
2526
</nb-layout-column>
2627
</nb-layout>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
@import '../../../../styles/themes';
2-
@import '~bootstrap/scss/mixins/breakpoints';
3-
@import '~@nebular/theme/styles/global/breakpoints';
1+
@import "../../../../styles/themes";
2+
@import "~bootstrap/scss/mixins/breakpoints";
3+
@import "~@nebular/theme/styles/global/breakpoints";
44

55
@include nb-install-component() {
66
nb-layout-column.small {
@@ -29,129 +29,11 @@
2929

3030
::ng-deep .main-container {
3131
width: $sidebar-width;
32-
background: nb-theme(color-bg);
3332
transition: width 0.3s ease;
3433
overflow: hidden;
35-
3634
.scrollable {
3735
width: $sidebar-width;
3836
}
39-
40-
@include nb-for-theme(cosmic) {
41-
background: nb-theme(layout-bg);
42-
}
43-
}
44-
}
45-
46-
nb-sidebar.menu-sidebar {
47-
48-
margin-top: nb-theme(sidebar-header-gap);
49-
50-
@include nb-for-theme(corporate) {
51-
margin-top: 0;
52-
}
53-
54-
::ng-deep .main-container {
55-
height:
56-
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
57-
@include nb-ltr(border-top-right-radius, nb-theme(radius));
58-
@include nb-rtl(border-top-left-radius, nb-theme(radius));
59-
60-
@include nb-for-theme(corporate) {
61-
border: 1px solid nb-theme(separator);
62-
height:
63-
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)}) !important;
64-
}
65-
}
66-
67-
::ng-deep .scrollable {
68-
@include nb-for-theme(corporate) {
69-
padding-top: 0;
70-
71-
.menu-item:first-child {
72-
border-top: none;
73-
}
74-
}
75-
}
76-
77-
::ng-deep nb-sidebar-header {
78-
padding-bottom: 0.5rem;
79-
text-align: center;
80-
}
81-
82-
background: transparent;
83-
84-
.main-btn {
85-
padding: 0.75rem 2.5rem;
86-
margin-top: -2rem;
87-
font-weight: bold;
88-
transition: padding 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.48);
89-
90-
@include nb-for-theme(corporate) {
91-
border-radius: nb-theme(radius);
92-
}
93-
94-
i {
95-
font-size: 2rem;
96-
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
97-
}
98-
span {
99-
@include nb-ltr(padding-left, 0.25rem);
100-
@include nb-rtl(padding-right, 0.25rem);
101-
}
102-
103-
i, span {
104-
vertical-align: middle;
105-
}
106-
}
107-
108-
&.compacted {
109-
110-
::ng-deep nb-sidebar-header {
111-
padding-left: 0;
112-
padding-right: 0;
113-
}
114-
115-
.main-btn {
116-
width: 46px;
117-
height: 44px;
118-
padding: 0.375rem;
119-
border-radius: 5px;
120-
transition: none;
121-
122-
span {
123-
display: none;
124-
}
125-
}
126-
}
127-
}
128-
129-
@include media-breakpoint-down(xs) {
130-
.main-content {
131-
padding: 0.75rem !important;
132-
133-
}
134-
}
135-
136-
@include media-breakpoint-down(sm) {
137-
138-
nb-sidebar.menu-sidebar {
139-
140-
margin-top: 0;
141-
142-
::ng-deep .main-container {
143-
height: calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)}) !important;
144-
@include nb-ltr(border-top-right-radius, 0);
145-
@include nb-rtl(border-top-left-radius, 0);
146-
147-
.scrollable {
148-
padding-top: 0;
149-
}
150-
}
151-
}
152-
153-
.main-btn {
154-
display: none;
15537
}
15638
}
15739
}
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
<div class="header-container" [class.left]="position === 'normal'" [class.right]="position === 'inverse'">
2-
<div class="logo-containter">
3-
<a (click)="toggleSidebar()" href="#" class="navigation"><i class="nb-menu"></i></a>
4-
<div class="logo" (click)="goToHome()">{{headerTitle}}</div>
1+
2+
<div class="header-container">
3+
<div class="logo-container">
4+
<a (click)="toggleSidebar()" href="#" class="sidebar-toggle">
5+
<nb-icon icon="menu-2-outline"></nb-icon>
6+
</a>
7+
<a class="logo" href="#" (click)="goToHome()">{{headerTitle}}</a>
58
</div>
69
</div>
7-
810
<div class="header-container">
9-
<nb-actions size="medium" [class.right]="position === 'normal'" [class.left]="position === 'inverse'">
10-
<!-- <nb-action icon="nb-gear" class="toggle-layout"></nb-action> -->
11-
<nb-action style="margin-left:50px">
12-
<nb-user nbContextMenuTag="user-context-menu" [nbContextMenu]="userMenu" [name]="user?.title" [picture]="'assets/images/user-avatar.png'"></nb-user>
11+
<nb-actions size="small">
12+
<nb-action>
13+
<nb-user nbContextMenuTag="user-context-menu" [nbContextMenu]="userMenu" [name]="user?.title"
14+
[picture]="'assets/images/user-avatar.png'"></nb-user>
1315
</nb-action>
14-
<!-- <nb-action class="control-item" disabled icon="nb-notifications"></nb-action>
15-
<nb-action class="control-item" icon="nb-email"></nb-action>
16-
<nb-action class="control-item">
17-
<nb-search type="rotate-layout"></nb-search>
18-
</nb-action> -->
1916
</nb-actions>
2017
</div>

0 commit comments

Comments
 (0)