mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-22 02:10:12 +01:00
refactor(@theme): refactor app styles
This commit is contained in:
parent
6ad706f65a
commit
a126301343
9 changed files with 44 additions and 60 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
import { NgaSidebarService, NgaMenuService } from '@nga/theme';
|
||||
import { NgaThemeService } from '@nga/theme/services/theme.service';
|
||||
|
||||
@Component({
|
||||
selector: 'base-header',
|
||||
|
|
@ -8,7 +9,8 @@ import { NgaSidebarService, NgaMenuService } from '@nga/theme';
|
|||
template: `
|
||||
<div class="left">
|
||||
<i class="control-icon ion ion-navicon" (click)="toggleSidebar()"></i>
|
||||
<span class="logo" (click)="goToHome()">NgX <span>Admin</span></span>
|
||||
<span class="logo" (click)="goToHome()">NgX <a>Admin</a></span>
|
||||
<button (click)="switchTheme()">Switch Theme!</button>
|
||||
</div>
|
||||
<div class="right">
|
||||
<search-input></search-input>
|
||||
|
|
@ -21,7 +23,8 @@ import { NgaSidebarService, NgaMenuService } from '@nga/theme';
|
|||
})
|
||||
export class BaseHeaderComponent {
|
||||
constructor(private sidebarService: NgaSidebarService,
|
||||
private menuService: NgaMenuService) {
|
||||
private menuService: NgaMenuService,
|
||||
private themeService: NgaThemeService) {
|
||||
}
|
||||
|
||||
toggleSidebar() {
|
||||
|
|
@ -31,4 +34,12 @@ export class BaseHeaderComponent {
|
|||
goToHome() {
|
||||
this.menuService.navigateHome();
|
||||
}
|
||||
|
||||
switchTheme() {
|
||||
if (this.themeService.currentTheme == 'pure') {
|
||||
this.themeService.changeTheme('gorgeous');
|
||||
} else {
|
||||
this.themeService.changeTheme('pure');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue