mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-02-24 17:04:07 +01:00
fix(demo): replace @akveo with @nebular
This commit is contained in:
parent
b772882cd6
commit
210c6f2355
129 changed files with 1010 additions and 1010 deletions
|
|
@ -1,6 +1,6 @@
|
|||
@import '../../../@theme/styles/variables';
|
||||
|
||||
@include nga-install-component() {
|
||||
@include nb-install-component() {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
a {
|
||||
padding: 0.4rem;
|
||||
color: nga-theme(color-fg);
|
||||
color: nb-theme(color-fg);
|
||||
transition: color ease-out 0.1s;
|
||||
|
||||
&:hover {
|
||||
color: nga-theme(color-fg-heading);
|
||||
color: nb-theme(color-fg-heading);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@import '../../styles/variables';
|
||||
|
||||
@include nga-install-component() {
|
||||
@include nb-install-component() {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
|
|
@ -19,18 +19,18 @@
|
|||
align-items: center;
|
||||
|
||||
.navigation {
|
||||
padding-right: nga-theme(padding);
|
||||
padding-right: nb-theme(padding);
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
padding: 0 nga-theme(padding);
|
||||
padding: 0 nb-theme(padding);
|
||||
font-size: 1.75rem;
|
||||
font-weight: nga-theme(font-weight-bolder);
|
||||
border-left: 1px solid nga-theme(separator);
|
||||
font-weight: nb-theme(font-weight-bolder);
|
||||
border-left: 1px solid nb-theme(separator);
|
||||
|
||||
span {
|
||||
font-weight: nga-theme(font-weight-normal);
|
||||
font-weight: nb-theme(font-weight-normal);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Component, Input, OnInit } from '@angular/core';
|
||||
|
||||
import { NgaMenuService, NgaSidebarService } from '@akveo/nga-theme';
|
||||
import { NgaThemeService } from '@akveo/nga-theme/services/theme.service';
|
||||
import { NbMenuService, NbSidebarService } from '@nebular/theme';
|
||||
import { NbThemeService } from '@nebular/theme';
|
||||
import { UserService } from '../../../@core/data/users.service';
|
||||
|
||||
@Component({
|
||||
|
|
@ -18,21 +18,21 @@ import { UserService } from '../../../@core/data/users.service';
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<nga-actions
|
||||
<nb-actions
|
||||
size="medium"
|
||||
class="header-container"
|
||||
[class.right]="position === 'normal'"
|
||||
[class.left]="position === 'inverse'">
|
||||
<nga-action icon="ion-ios-gear-outline" (click)="toggleSettings()"></nga-action>
|
||||
<nga-action>
|
||||
<nga-user [menu]="userMenu" [name]="user?.name" [picture]="user?.picture"></nga-user>
|
||||
</nga-action>
|
||||
<nga-action disabled icon="ion-ios-bell-outline"></nga-action>
|
||||
<nga-action icon="ion-ios-email-outline"></nga-action>
|
||||
<nga-action>
|
||||
<nga-search type="rotate-layout"></nga-search>
|
||||
</nga-action>
|
||||
</nga-actions>
|
||||
<nb-action icon="ion-ios-gear-outline" (click)="toggleSettings()"></nb-action>
|
||||
<nb-action>
|
||||
<nb-user [menu]="userMenu" [name]="user?.name" [picture]="user?.picture"></nb-user>
|
||||
</nb-action>
|
||||
<nb-action disabled icon="ion-ios-bell-outline"></nb-action>
|
||||
<nb-action icon="ion-ios-email-outline"></nb-action>
|
||||
<nb-action>
|
||||
<nb-search type="rotate-layout"></nb-search>
|
||||
</nb-action>
|
||||
</nb-actions>
|
||||
`,
|
||||
})
|
||||
export class HeaderComponent implements OnInit {
|
||||
|
|
@ -51,9 +51,9 @@ export class HeaderComponent implements OnInit {
|
|||
},
|
||||
];
|
||||
|
||||
constructor(private sidebarService: NgaSidebarService,
|
||||
private menuService: NgaMenuService,
|
||||
private themeService: NgaThemeService,
|
||||
constructor(private sidebarService: NbSidebarService,
|
||||
private menuService: NbMenuService,
|
||||
private themeService: NbThemeService,
|
||||
private userService: UserService) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@import '../../styles/variables';
|
||||
|
||||
@include nga-install-component() {
|
||||
@include nb-install-component() {
|
||||
.settings-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
|
@ -11,10 +11,10 @@
|
|||
a {
|
||||
font-size: 2rem;
|
||||
margin-right: 1rem;
|
||||
color: nga-theme(color-white);
|
||||
color: nb-theme(color-white);
|
||||
|
||||
&.selected {
|
||||
color: nga-theme(color-success);
|
||||
color: nb-theme(color-success);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
@import '../../styles/variables';
|
||||
|
||||
@include nga-install-root-component() {
|
||||
@include nb-install-root-component() {
|
||||
|
||||
nga-sidebar.menu-sidebar {
|
||||
nb-sidebar.menu-sidebar {
|
||||
|
||||
margin-top: nga-theme(sidebar-header-gap);
|
||||
margin-top: nb-theme(sidebar-header-gap);
|
||||
|
||||
/deep/ .main-container {
|
||||
height:
|
||||
calc(#{nga-theme(sidebar-height)} - #{nga-theme(header-height)} - #{nga-theme(sidebar-header-gap)}) !important;
|
||||
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
|
||||
border-top-right-radius: 0.75rem;
|
||||
}
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-bottom: 0.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
&.compacted {
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,28 +5,28 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-one-column-layout',
|
||||
styleUrls: ['./one-column.layout.scss'],
|
||||
template: `
|
||||
<nga-layout>
|
||||
<nga-layout-header fixed>
|
||||
<nb-layout>
|
||||
<nb-layout-header fixed>
|
||||
<ngx-header></ngx-header>
|
||||
</nga-layout-header>
|
||||
</nb-layout-header>
|
||||
|
||||
<nga-sidebar class="menu-sidebar" tag="menu-sidebar" responsive>
|
||||
<nga-sidebar-header>
|
||||
<nb-sidebar class="menu-sidebar" tag="menu-sidebar" responsive>
|
||||
<nb-sidebar-header>
|
||||
<button class="btn btn-hero-success main-btn">
|
||||
<i class="ion ion-social-github"></i> <span>Support Us</span>
|
||||
</button>
|
||||
</nga-sidebar-header>
|
||||
<ng-content select="nga-menu"></ng-content>
|
||||
</nga-sidebar>
|
||||
</nb-sidebar-header>
|
||||
<ng-content select="nb-menu"></ng-content>
|
||||
</nb-sidebar>
|
||||
|
||||
<nga-layout-column>
|
||||
<nb-layout-column>
|
||||
<ng-content select="router-outlet"></ng-content>
|
||||
</nga-layout-column>
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-footer fixed>
|
||||
<nb-layout-footer fixed>
|
||||
<ngx-footer></ngx-footer>
|
||||
</nga-layout-footer>
|
||||
</nga-layout>
|
||||
</nb-layout-footer>
|
||||
</nb-layout>
|
||||
`,
|
||||
})
|
||||
export class OneColumnLayoutComponent {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
@import '../../styles/variables';
|
||||
|
||||
@include nga-install-root-component() {
|
||||
@include nb-install-root-component() {
|
||||
|
||||
nga-layout-column.small {
|
||||
nb-layout-column.small {
|
||||
flex: 0.15 !important;
|
||||
}
|
||||
|
||||
nga-sidebar.settings-sidebar {
|
||||
nb-sidebar.settings-sidebar {
|
||||
width: 7rem;
|
||||
/deep/ .main-container {
|
||||
width: 7rem;
|
||||
|
|
@ -21,17 +21,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
nga-sidebar.menu-sidebar {
|
||||
nb-sidebar.menu-sidebar {
|
||||
|
||||
margin-top: nga-theme(sidebar-header-gap);
|
||||
margin-top: nb-theme(sidebar-header-gap);
|
||||
|
||||
/deep/ .main-container {
|
||||
height:
|
||||
calc(#{nga-theme(sidebar-height)} - #{nga-theme(header-height)} - #{nga-theme(sidebar-header-gap)}) !important;
|
||||
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
|
||||
border-top-right-radius: 0.75rem;
|
||||
}
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-bottom: 0.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
&.compacted {
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Component, Input, OnDestroy } from '@angular/core';
|
||||
import { List } from 'immutable';
|
||||
import { NgaMenuItem } from '@akveo/nga-theme';
|
||||
import { NbMenuItem } from '@nebular/theme';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
|
||||
import { StateService } from '../../../@core/data/state.service';
|
||||
|
|
@ -10,52 +10,52 @@ import { StateService } from '../../../@core/data/state.service';
|
|||
selector: 'ngx-sample-layout',
|
||||
styleUrls: ['./sample.layout.scss'],
|
||||
template: `
|
||||
<nga-layout [center]="layout.id === 'center-column'" windowMode>
|
||||
<nga-layout-header fixed>
|
||||
<nb-layout [center]="layout.id === 'center-column'" windowMode>
|
||||
<nb-layout-header fixed>
|
||||
<ngx-header [position]="sidebar.id === 'left' ? 'normal': 'inverse'"></ngx-header>
|
||||
</nga-layout-header>
|
||||
</nb-layout-header>
|
||||
|
||||
<nga-sidebar class="menu-sidebar"
|
||||
<nb-sidebar class="menu-sidebar"
|
||||
tag="menu-sidebar"
|
||||
responsive
|
||||
[right]="sidebar.id === 'right'">
|
||||
<nga-sidebar-header>
|
||||
<nb-sidebar-header>
|
||||
<button class="btn btn-hero-success main-btn">
|
||||
<i class="ion ion-social-github"></i> <span>Support Us</span>
|
||||
</button>
|
||||
</nga-sidebar-header>
|
||||
<ng-content select="nga-menu"></ng-content>
|
||||
</nga-sidebar>
|
||||
</nb-sidebar-header>
|
||||
<ng-content select="nb-menu"></ng-content>
|
||||
</nb-sidebar>
|
||||
|
||||
<nga-layout-column>
|
||||
<nb-layout-column>
|
||||
<ng-content select="router-outlet"></ng-content>
|
||||
</nga-layout-column>
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-column left class="small" *ngIf="layout.id === 'two-column' || layout.id === 'three-column'">
|
||||
<nga-menu [items]="subMenu"></nga-menu>
|
||||
</nga-layout-column>
|
||||
<nb-layout-column left class="small" *ngIf="layout.id === 'two-column' || layout.id === 'three-column'">
|
||||
<nb-menu [items]="subMenu"></nb-menu>
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-column right class="small" *ngIf="layout.id === 'three-column'">
|
||||
<nga-menu [items]="subMenu"></nga-menu>
|
||||
</nga-layout-column>
|
||||
<nb-layout-column right class="small" *ngIf="layout.id === 'three-column'">
|
||||
<nb-menu [items]="subMenu"></nb-menu>
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-footer fixed>
|
||||
<nb-layout-footer fixed>
|
||||
<ngx-footer></ngx-footer>
|
||||
</nga-layout-footer>
|
||||
</nb-layout-footer>
|
||||
|
||||
<nga-sidebar class="settings-sidebar"
|
||||
<nb-sidebar class="settings-sidebar"
|
||||
tag="settings-sidebar"
|
||||
state="collapsed"
|
||||
fixed
|
||||
[right]="sidebar.id !== 'right'">
|
||||
<ngx-theme-settings></ngx-theme-settings>
|
||||
</nga-sidebar>
|
||||
</nga-layout>
|
||||
</nb-sidebar>
|
||||
</nb-layout>
|
||||
`,
|
||||
})
|
||||
export class SampleLayoutComponent implements OnDestroy {
|
||||
|
||||
subMenu: List<NgaMenuItem> = List(
|
||||
subMenu: List<NbMenuItem> = List(
|
||||
[
|
||||
{
|
||||
title: 'PAGE LEVEL MENU',
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
@import '../../styles/variables';
|
||||
|
||||
@include nga-install-root-component() {
|
||||
@include nb-install-root-component() {
|
||||
|
||||
nga-layout-column.small {
|
||||
nb-layout-column.small {
|
||||
flex: 0.15 !important;
|
||||
}
|
||||
|
||||
nga-sidebar.menu-sidebar {
|
||||
nb-sidebar.menu-sidebar {
|
||||
|
||||
margin-top: nga-theme(sidebar-header-gap);
|
||||
margin-top: nb-theme(sidebar-header-gap);
|
||||
|
||||
/deep/ .main-container {
|
||||
height:
|
||||
calc(#{nga-theme(sidebar-height)} - #{nga-theme(header-height)} - #{nga-theme(sidebar-header-gap)}) !important;
|
||||
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
|
||||
border-top-right-radius: 0.75rem;
|
||||
}
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-bottom: 0.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
&.compacted {
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,34 +5,34 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-three-columns-layout',
|
||||
styleUrls: ['./three-columns.layout.scss'],
|
||||
template: `
|
||||
<nga-layout>
|
||||
<nga-layout-header fixed>
|
||||
<nb-layout>
|
||||
<nb-layout-header fixed>
|
||||
<ngx-header></ngx-header>
|
||||
</nga-layout-header>
|
||||
</nb-layout-header>
|
||||
|
||||
<nga-sidebar class="menu-sidebar" tag="menu-sidebar" responsive >
|
||||
<nga-sidebar-header>
|
||||
<nb-sidebar class="menu-sidebar" tag="menu-sidebar" responsive >
|
||||
<nb-sidebar-header>
|
||||
<button class="btn btn-hero-success main-btn">
|
||||
<i class="ion ion-social-github"></i> <span>Support Us</span>
|
||||
</button>
|
||||
</nga-sidebar-header>
|
||||
<ng-content select="nga-menu"></ng-content>
|
||||
</nga-sidebar>
|
||||
</nb-sidebar-header>
|
||||
<ng-content select="nb-menu"></ng-content>
|
||||
</nb-sidebar>
|
||||
|
||||
<nga-layout-column class="small">
|
||||
</nga-layout-column>
|
||||
<nb-layout-column class="small">
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-column right>
|
||||
<nb-layout-column right>
|
||||
<ng-content select="router-outlet"></ng-content>
|
||||
</nga-layout-column>
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-column class="small">
|
||||
</nga-layout-column>
|
||||
<nb-layout-column class="small">
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-footer fixed>
|
||||
<nb-layout-footer fixed>
|
||||
<ngx-footer></ngx-footer>
|
||||
</nga-layout-footer>
|
||||
</nga-layout>
|
||||
</nb-layout-footer>
|
||||
</nb-layout>
|
||||
`,
|
||||
})
|
||||
export class ThreeColumnsLayoutComponent {
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
@import '../../styles/variables';
|
||||
|
||||
@include nga-install-root-component() {
|
||||
@include nb-install-root-component() {
|
||||
|
||||
nga-layout-column.small {
|
||||
nb-layout-column.small {
|
||||
flex: 0.15 !important;
|
||||
}
|
||||
|
||||
nga-sidebar.menu-sidebar {
|
||||
nb-sidebar.menu-sidebar {
|
||||
|
||||
margin-top: nga-theme(sidebar-header-gap);
|
||||
margin-top: nb-theme(sidebar-header-gap);
|
||||
|
||||
/deep/ .main-container {
|
||||
height:
|
||||
calc(#{nga-theme(sidebar-height)} - #{nga-theme(header-height)} - #{nga-theme(sidebar-header-gap)}) !important;
|
||||
calc(#{nb-theme(sidebar-height)} - #{nb-theme(header-height)} - #{nb-theme(sidebar-header-gap)}) !important;
|
||||
border-top-right-radius: 0.75rem;
|
||||
}
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-bottom: 0.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
&.compacted {
|
||||
|
||||
/deep/ nga-sidebar-header {
|
||||
/deep/ nb-sidebar-header {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,32 +5,32 @@ import { Component } from '@angular/core';
|
|||
selector: 'ngx-two-columns-layout',
|
||||
styleUrls: ['./two-columns.layout.scss'],
|
||||
template: `
|
||||
<nga-layout>
|
||||
<nga-layout-header fixed>
|
||||
<nb-layout>
|
||||
<nb-layout-header fixed>
|
||||
<ngx-header></ngx-header>
|
||||
</nga-layout-header>
|
||||
</nb-layout-header>
|
||||
|
||||
<nga-sidebar class="menu-sidebar" tag="menu-sidebar" responsive >
|
||||
<nga-sidebar-header>
|
||||
<nb-sidebar class="menu-sidebar" tag="menu-sidebar" responsive >
|
||||
<nb-sidebar-header>
|
||||
<button class="btn btn-hero-success main-btn">
|
||||
<i class="ion ion-social-github"></i> <span>Support Us</span>
|
||||
</button>
|
||||
</nga-sidebar-header>
|
||||
<ng-content select="nga-menu"></ng-content>
|
||||
</nga-sidebar>
|
||||
</nb-sidebar-header>
|
||||
<ng-content select="nb-menu"></ng-content>
|
||||
</nb-sidebar>
|
||||
|
||||
<nga-layout-column class="small">
|
||||
</nga-layout-column>
|
||||
<nb-layout-column class="small">
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-column right>
|
||||
<nb-layout-column right>
|
||||
<ng-content select="router-outlet"></ng-content>
|
||||
</nga-layout-column>
|
||||
</nb-layout-column>
|
||||
|
||||
<nga-layout-footer fixed>
|
||||
<nb-layout-footer fixed>
|
||||
<ngx-footer></ngx-footer>
|
||||
</nga-layout-footer>
|
||||
</nb-layout-footer>
|
||||
|
||||
</nga-layout>
|
||||
</nb-layout>
|
||||
`,
|
||||
})
|
||||
export class TwoColumnsLayoutComponent {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// any global, non-component styles go here
|
||||
}
|
||||
|
||||
.nga-theme-cosmic {
|
||||
.nb-theme-cosmic {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
@import 'variables';
|
||||
|
||||
// framework component themes (styles tied to theme variables)
|
||||
@import '~@akveo/nga-theme/styles/globals';
|
||||
@import '~@akveo/nga-auth/styles/all';
|
||||
@import '~@nebular/theme/styles/globals';
|
||||
@import '~@nebular/auth/styles/all';
|
||||
|
||||
// custom global styles
|
||||
@import 'global';
|
||||
|
||||
// install the framework and custom global styles
|
||||
@include nga-install() {
|
||||
@include nga-theme-global();
|
||||
@include nga-auth-global();
|
||||
@include nb-install() {
|
||||
@include nb-theme-global();
|
||||
@include nb-auth-global();
|
||||
@include ngx-global-theme();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
// nga theming framework
|
||||
@import '~@akveo/nga-theme/styles/theming';
|
||||
// nga our of the box themes
|
||||
@import '~@akveo/nga-theme/styles/themes';
|
||||
// @nebular theming framework
|
||||
@import '~@nebular/theme/styles/theming';
|
||||
// @nebular our of the box themes
|
||||
@import '~@nebular/theme/styles/themes';
|
||||
|
||||
// which themes you what to enable (empty to enable all - not recommended)
|
||||
$nga-enabled-themes: (default, light, cosmic);
|
||||
$nb-enabled-themes: (default, light, cosmic);
|
||||
|
||||
$nga-themes: nga-register-theme((
|
||||
$nb-themes: nb-register-theme((
|
||||
// app wise variables for each theme
|
||||
sidebar-header-gap: 2rem,
|
||||
sidebar-header-height: initial,
|
||||
layout-content-width: 1400px,
|
||||
), default, default);
|
||||
|
||||
$nga-themes: nga-register-theme((
|
||||
$nb-themes: nb-register-theme((
|
||||
// app wise variables for each theme
|
||||
sidebar-header-gap: 2rem,
|
||||
sidebar-header-height: initial,
|
||||
layout-content-width: 1400px,
|
||||
), cosmic, cosmic);
|
||||
|
||||
$nga-themes: nga-register-theme((
|
||||
$nb-themes: nb-register-theme((
|
||||
// app wise variables for each theme
|
||||
sidebar-header-gap: 2rem,
|
||||
sidebar-header-height: initial,
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@ import { CommonModule } from '@angular/common';
|
|||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import {
|
||||
NgaActionsModule,
|
||||
NgaCardModule,
|
||||
NgaLayoutModule,
|
||||
NgaMenuModule,
|
||||
NgaRouteTabsetModule,
|
||||
NgaSearchModule,
|
||||
NgaSidebarModule,
|
||||
NgaTabsetModule,
|
||||
NgaThemeModule,
|
||||
NgaUserModule,
|
||||
} from '@akveo/nga-theme';
|
||||
NbActionsModule,
|
||||
NbCardModule,
|
||||
NbLayoutModule,
|
||||
NbMenuModule,
|
||||
NbRouteTabsetModule,
|
||||
NbSearchModule,
|
||||
NbSidebarModule,
|
||||
NbTabsetModule,
|
||||
NbThemeModule,
|
||||
NbUserModule,
|
||||
} from '@nebular/theme';
|
||||
|
||||
import {
|
||||
FooterComponent,
|
||||
|
|
@ -34,16 +34,16 @@ import { COSMIC_THEME } from './styles/theme.cosmic';
|
|||
|
||||
const BASE_MODULES = [CommonModule, FormsModule, ReactiveFormsModule];
|
||||
|
||||
const NGA_MODULES = [
|
||||
NgaCardModule,
|
||||
NgaLayoutModule,
|
||||
NgaTabsetModule,
|
||||
NgaRouteTabsetModule,
|
||||
NgaMenuModule,
|
||||
NgaUserModule,
|
||||
NgaActionsModule,
|
||||
NgaSearchModule,
|
||||
NgaSidebarModule,
|
||||
const NB_MODULES = [
|
||||
NbCardModule,
|
||||
NbLayoutModule,
|
||||
NbTabsetModule,
|
||||
NbRouteTabsetModule,
|
||||
NbMenuModule,
|
||||
NbUserModule,
|
||||
NbActionsModule,
|
||||
NbSearchModule,
|
||||
NbSidebarModule,
|
||||
];
|
||||
|
||||
const COMPONENTS = [
|
||||
|
|
@ -60,28 +60,28 @@ const COMPONENTS = [
|
|||
|
||||
const PIPES = [CapitalizePipe, PluralPipe, RoundPipe];
|
||||
|
||||
const NGA_THEME_PROVIDERS = [
|
||||
...NgaThemeModule.forRoot(
|
||||
const NB_THEME_PROVIDERS = [
|
||||
...NbThemeModule.forRoot(
|
||||
{
|
||||
name: 'default',
|
||||
},
|
||||
[DEFAULT_THEME, COSMIC_THEME],
|
||||
).providers,
|
||||
...NgaSidebarModule.forRoot().providers,
|
||||
...NgaSidebarModule.forRoot().providers,
|
||||
...NgaMenuModule.forRoot().providers,
|
||||
...NbSidebarModule.forRoot().providers,
|
||||
...NbSidebarModule.forRoot().providers,
|
||||
...NbMenuModule.forRoot().providers,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [...BASE_MODULES, ...NGA_MODULES],
|
||||
exports: [...BASE_MODULES, ...NGA_MODULES, ...COMPONENTS, ...PIPES],
|
||||
imports: [...BASE_MODULES, ...NB_MODULES],
|
||||
exports: [...BASE_MODULES, ...NB_MODULES, ...COMPONENTS, ...PIPES],
|
||||
declarations: [...COMPONENTS, ...PIPES],
|
||||
})
|
||||
export class ThemeModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return <ModuleWithProviders>{
|
||||
ngModule: ThemeModule,
|
||||
providers: [...NGA_THEME_PROVIDERS],
|
||||
providers: [...NB_THEME_PROVIDERS],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue