mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-18 08:20:13 +01:00
feat(ui-features): add the tabs component
This commit is contained in:
parent
ada9ac9c1d
commit
78e376bb5a
16 changed files with 90 additions and 28 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
"build:prod:aot": "npm run build:prod -- --aot",
|
"build:prod:aot": "npm run build:prod -- --aot",
|
||||||
"build:ci": "npm-run-all -p -r build:prod build:prod:aot",
|
"build:ci": "npm-run-all -p -r build:prod build:prod:aot",
|
||||||
"build:ghpages": "npm run build:prod:aot -- --base-href \"https://akveo.github.io/ng2-admin/\" && ngh",
|
"build:ghpages": "npm run build:prod:aot -- --base-href \"https://akveo.github.io/ng2-admin/\" && ngh",
|
||||||
|
"build:stg": "npm run build:prod:aot -- --base-href \"http://akveo.com/ngx-admin/\"",
|
||||||
"test": "ng test -sr",
|
"test": "ng test -sr",
|
||||||
"test:coverage": "rimraf coverage && npm run test -- -cc",
|
"test:coverage": "rimraf coverage && npm run test -- -cc",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,9 @@ import { NgaThemeService } from '@nga/theme/services/theme.service';
|
||||||
<i class="control-icon ion ion-navicon" (click)="toggleSidebar()"></i>
|
<i class="control-icon ion ion-navicon" (click)="toggleSidebar()"></i>
|
||||||
<span class="logo" (click)="goToHome()">NgX <a>Admin</a></span>
|
<span class="logo" (click)="goToHome()">NgX <a>Admin</a></span>
|
||||||
<button (click)="switchTheme()">Switch Theme!</button>
|
<button (click)="switchTheme()">Switch Theme!</button>
|
||||||
|
<button (click)="selectDefaultTheme()">Default Theme!</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nga-actions size="medium" inverse class="right">
|
<nga-actions size="medium" inverse class="right">
|
||||||
<nga-action><ngx-search-input></ngx-search-input></nga-action>
|
<nga-action><ngx-search-input></ngx-search-input></nga-action>
|
||||||
<nga-action icon="ion-ios-email-outline"></nga-action>
|
<nga-action icon="ion-ios-email-outline"></nga-action>
|
||||||
|
|
@ -55,4 +56,8 @@ export class HeaderComponent {
|
||||||
this.themeService.changeTheme('light');
|
this.themeService.changeTheme('light');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectDefaultTheme() {
|
||||||
|
this.themeService.changeTheme('default');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
* Copyright Akveo. All Rights Reserved.
|
* Copyright Akveo. All Rights Reserved.
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@import '../components';
|
@import '../components';
|
||||||
@import 'variables';
|
@import 'variables';
|
||||||
|
|
||||||
|
|
|
||||||
30
src/app/@theme/styles/default/default.theme.scss
Normal file
30
src/app/@theme/styles/default/default.theme.scss
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright Akveo. All Rights Reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@import '../components';
|
||||||
|
@import 'overrides/all';
|
||||||
|
|
||||||
|
@import '~@nga/theme/styles/themes/nga.theme.default';
|
||||||
|
|
||||||
|
$theme-name: 'default';
|
||||||
|
|
||||||
|
// @nga/theme module styles
|
||||||
|
@include nga-theme($theme-name) {
|
||||||
|
@include nga-theme-overrides($theme-name);
|
||||||
|
@include custom-components-theme($theme-name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @nga/bootstrap module styles
|
||||||
|
@import '~@nga/theme/overrides/bootstrap/styles/themes/nga.theme.default';
|
||||||
|
@include nga-bootstrap($theme-name);
|
||||||
|
|
||||||
|
// @nga/maps module styles
|
||||||
|
@import '~@nga/theme/overrides/maps/styles/themes/nga.theme.default';
|
||||||
|
@include nga-maps($theme-name);
|
||||||
|
|
||||||
|
// @nga/typography module styles
|
||||||
|
@import '~@nga/theme/overrides/typography/styles/themes/nga.theme.default';
|
||||||
|
@include nga-typography($theme-name);
|
||||||
2
src/app/@theme/styles/default/overrides/all.scss
Normal file
2
src/app/@theme/styles/default/overrides/all.scss
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
@mixin nga-theme-overrides($theme-name) {
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
* Copyright Akveo. All Rights Reserved.
|
* Copyright Akveo. All Rights Reserved.
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@import '../components';
|
@import '../components';
|
||||||
@import 'overrides/all';
|
@import 'overrides/all';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
import {
|
|
||||||
Component,
|
|
||||||
OnDestroy,
|
|
||||||
AfterViewInit,
|
|
||||||
Input,
|
|
||||||
Output,
|
|
||||||
EventEmitter,
|
|
||||||
} from '@angular/core';
|
|
||||||
|
|
||||||
import './ckeditor.loader';
|
|
||||||
import 'ckeditor';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'ngx-ckeditor',
|
|
||||||
template: `
|
|
||||||
<nga-card>
|
|
||||||
<nga-card-body>
|
|
||||||
<ckeditor [config]="{extraPlugins: 'divarea'}"></ckeditor>
|
|
||||||
</nga-card-body>
|
|
||||||
</nga-card>
|
|
||||||
`,
|
|
||||||
})
|
|
||||||
export class CKEditorComponent {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
window['CKEDITOR_BASEPATH'] = '//cdn.ckeditor.com/4.6.2/full-all/';
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { EditorsComponent } from './editors.component';
|
import { EditorsComponent } from './editors.component';
|
||||||
import { TinyMCEComponent } from './tiny-mce/tiny-mce.component';
|
import { TinyMCEComponent } from './tiny-mce/tiny-mce.component';
|
||||||
import { CKEditorComponent } from './ckeditor.component';
|
import { CKEditorComponent } from './ckeditor/ckeditor.component';
|
||||||
|
|
||||||
const routes: Routes = [{
|
const routes: Routes = [{
|
||||||
path: '',
|
path: '',
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ export const menuItems: List<NgaMenuItem> = List([{
|
||||||
}, {
|
}, {
|
||||||
title: 'Typography',
|
title: 'Typography',
|
||||||
link: '/pages/ui-features/typography',
|
link: '/pages/ui-features/typography',
|
||||||
|
}, {
|
||||||
|
title: 'Tabs',
|
||||||
|
link: '/pages/ui-features/tabs',
|
||||||
}]),
|
}]),
|
||||||
}, {
|
}, {
|
||||||
title: 'Components',
|
title: 'Components',
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { Component } from '@angular/core';
|
||||||
|
|
||||||
import 'style-loader!../@theme/styles/cosmic/cosmic.theme.scss';
|
import 'style-loader!../@theme/styles/cosmic/cosmic.theme.scss';
|
||||||
import 'style-loader!../@theme/styles/light/light.theme.scss';
|
import 'style-loader!../@theme/styles/light/light.theme.scss';
|
||||||
|
import 'style-loader!../@theme/styles/default/default.theme.scss';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ngx-pages',
|
selector: 'ngx-pages',
|
||||||
|
|
|
||||||
26
src/app/pages/ui-features/tabs/tabs.component.html
Normal file
26
src/app/pages/ui-features/tabs/tabs.component.html
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<nga-card>
|
||||||
|
<nga-card-header>Tabset</nga-card-header>
|
||||||
|
<nga-card-body>
|
||||||
|
<nga-tabset>
|
||||||
|
<nga-tab tabTitle="Tab #1">
|
||||||
|
<span>Content #1</span>
|
||||||
|
</nga-tab>
|
||||||
|
<nga-tab tabTitle="Tab #2">
|
||||||
|
<span>Content #2</span>
|
||||||
|
</nga-tab>
|
||||||
|
<nga-tab tabTitle="Tab #3">
|
||||||
|
<span>Content #3</span>
|
||||||
|
</nga-tab>
|
||||||
|
</nga-tabset>
|
||||||
|
</nga-card-body>
|
||||||
|
</nga-card>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<nga-card>
|
||||||
|
<nga-card-header>Route Tabset</nga-card-header>
|
||||||
|
<nga-card-body></nga-card-body>
|
||||||
|
</nga-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
0
src/app/pages/ui-features/tabs/tabs.component.scss
Normal file
0
src/app/pages/ui-features/tabs/tabs.component.scss
Normal file
9
src/app/pages/ui-features/tabs/tabs.component.ts
Normal file
9
src/app/pages/ui-features/tabs/tabs.component.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'ngx-tabs',
|
||||||
|
styleUrls: ['./tabs.component.scss'],
|
||||||
|
templateUrl: './tabs.component.html',
|
||||||
|
})
|
||||||
|
export class TabsComponent {
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,7 @@ import { GridComponent } from './grid/grid.component';
|
||||||
import { IconsComponent } from './icons/icons.component';
|
import { IconsComponent } from './icons/icons.component';
|
||||||
import { ModalsComponent } from './modals/modals.component';
|
import { ModalsComponent } from './modals/modals.component';
|
||||||
import { TypographyComponent } from './typography/typography.component';
|
import { TypographyComponent } from './typography/typography.component';
|
||||||
|
import { TabsComponent } from './tabs/tabs.component';
|
||||||
|
|
||||||
const routes: Routes = [{
|
const routes: Routes = [{
|
||||||
path: '',
|
path: '',
|
||||||
|
|
@ -26,6 +27,9 @@ const routes: Routes = [{
|
||||||
}, {
|
}, {
|
||||||
path: 'typography',
|
path: 'typography',
|
||||||
component: TypographyComponent,
|
component: TypographyComponent,
|
||||||
|
}, {
|
||||||
|
path: 'tabs',
|
||||||
|
component: TabsComponent,
|
||||||
}],
|
}],
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
|
import { NgaTabsetModule, NgaRouteTabsetModule } from '@nga/theme';
|
||||||
|
|
||||||
import { SharedModule } from '../../shared.module';
|
import { SharedModule } from '../../shared.module';
|
||||||
|
|
||||||
|
|
@ -18,6 +19,7 @@ import { GroupButtonsComponent } from './buttons/group/group.component';
|
||||||
import { LargeButtonsComponent } from './buttons/large/large.component';
|
import { LargeButtonsComponent } from './buttons/large/large.component';
|
||||||
import { ModalComponent } from './modals/modal/modal.component';
|
import { ModalComponent } from './modals/modal/modal.component';
|
||||||
import { TypographyComponent } from './typography/typography.component';
|
import { TypographyComponent } from './typography/typography.component';
|
||||||
|
import { TabsComponent } from './tabs/tabs.component';
|
||||||
|
|
||||||
const COMPONENTS = [
|
const COMPONENTS = [
|
||||||
UiFeaturesComponent,
|
UiFeaturesComponent,
|
||||||
|
|
@ -35,12 +37,15 @@ const COMPONENTS = [
|
||||||
LargeButtonsComponent,
|
LargeButtonsComponent,
|
||||||
ModalComponent,
|
ModalComponent,
|
||||||
TypographyComponent,
|
TypographyComponent,
|
||||||
|
TabsComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
SharedModule,
|
SharedModule,
|
||||||
UiFeaturesRoutingModule,
|
UiFeaturesRoutingModule,
|
||||||
|
NgaTabsetModule,
|
||||||
|
NgaRouteTabsetModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...COMPONENTS,
|
...COMPONENTS,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue