mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-19 08:50:13 +01:00
fix(header): improve header styles, add nebular icons
This commit is contained in:
parent
429fd095cf
commit
3febc37ed7
5 changed files with 99 additions and 105 deletions
30
src/app/@theme/components/header/header.component.html
Normal file
30
src/app/@theme/components/header/header.component.html
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="header-container"
|
||||||
|
[class.left]="position === 'normal'"
|
||||||
|
[class.right]="position === 'inverse'">
|
||||||
|
<a (click)="toggleSidebar()" href="#" class="navigation"><i class="ion-navicon"></i></a>
|
||||||
|
<div class="logo" (click)="goToHome()">NgX <span>Admin</span></div>
|
||||||
|
<label class="theme-switch">
|
||||||
|
<span class="light">Light</span>
|
||||||
|
<div class="switch">
|
||||||
|
<input type="checkbox" (change)="toggleTheme(theme.checked)" #theme>
|
||||||
|
<span class="slider"></span>
|
||||||
|
</div>
|
||||||
|
<span class="cosmic">Cosmic</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nb-actions
|
||||||
|
size="medium"
|
||||||
|
class="header-container"
|
||||||
|
[class.right]="position === 'normal'"
|
||||||
|
[class.left]="position === 'inverse'">
|
||||||
|
<nb-action icon="nb-grid-b" class="toggle-layout" (click)="toggleSettings()"></nb-action>
|
||||||
|
<nb-action>
|
||||||
|
<nb-user [menu]="userMenu" [name]="user?.name" [picture]="user?.picture"></nb-user>
|
||||||
|
</nb-action>
|
||||||
|
<nb-action disabled icon="nb-notifications"></nb-action>
|
||||||
|
<nb-action icon="nb-email"></nb-action>
|
||||||
|
<nb-action>
|
||||||
|
<nb-search type="rotate-layout"></nb-search>
|
||||||
|
</nb-action>
|
||||||
|
</nb-actions>
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
font-weight: nb-theme(font-weight-normal);
|
font-weight: nb-theme(font-weight-normal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.theme-switch {
|
.theme-switch {
|
||||||
margin: 0 6rem;
|
margin: 0 6rem;
|
||||||
|
|
@ -113,7 +114,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.toggle-layout /deep/ a {
|
.toggle-layout /deep/ a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
|
||||||
|
|
@ -6,36 +6,7 @@ import { UserService } from '../../../@core/data/users.service';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ngx-header',
|
selector: 'ngx-header',
|
||||||
styleUrls: ['./header.component.scss'],
|
styleUrls: ['./header.component.scss'],
|
||||||
template: `
|
templateUrl: './header.component.html',
|
||||||
<div class="header-container" [class.left]="position === 'normal'" [class.right]="position === 'inverse'">
|
|
||||||
<a (click)="toggleSidebar()" href="#" class="navigation"><i class="ion-navicon"></i></a>
|
|
||||||
<div class="logo" (click)="goToHome()">NgX <span>Admin</span></div>
|
|
||||||
<label class="theme-switch">
|
|
||||||
<span class="light">Light</span>
|
|
||||||
<div class="switch">
|
|
||||||
<input type="checkbox" (change)="toggleTheme(theme.checked)" #theme>
|
|
||||||
<span class="slider"></span>
|
|
||||||
</div>
|
|
||||||
<span class="cosmic">Cosmic</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nb-actions
|
|
||||||
size="medium"
|
|
||||||
class="header-container"
|
|
||||||
[class.right]="position === 'normal'"
|
|
||||||
[class.left]="position === 'inverse'">
|
|
||||||
<nb-action icon="nb-grid-b" class="toggle-layout" (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 {
|
export class HeaderComponent implements OnInit {
|
||||||
|
|
||||||
|
|
@ -44,14 +15,7 @@ export class HeaderComponent implements OnInit {
|
||||||
|
|
||||||
user: any;
|
user: any;
|
||||||
|
|
||||||
userMenu = [
|
userMenu = [{ title: 'Profile' }, { title: 'Log out' }];
|
||||||
{
|
|
||||||
title: 'Profile',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Log out',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
constructor(private sidebarService: NbSidebarService,
|
constructor(private sidebarService: NbSidebarService,
|
||||||
private menuService: NbMenuService,
|
private menuService: NbMenuService,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
@import '../../styles/themes';
|
@import '../../styles/themes';
|
||||||
|
|
||||||
@include nb-install-component() {
|
@include nb-install-component() {
|
||||||
h5 {
|
h6 {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-row {
|
.settings-row {
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 0 auto 2rem;
|
margin: 0 0 1rem;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { StateService } from '../../../@core/data/state.service';
|
||||||
selector: 'ngx-theme-settings',
|
selector: 'ngx-theme-settings',
|
||||||
styleUrls: ['./theme-settings.component.scss'],
|
styleUrls: ['./theme-settings.component.scss'],
|
||||||
template: `
|
template: `
|
||||||
<h5>LAYOUTS</h5>
|
<h6>LAYOUTS</h6>
|
||||||
<div class="settings-row">
|
<div class="settings-row">
|
||||||
<a *ngFor="let layout of layouts"
|
<a *ngFor="let layout of layouts"
|
||||||
href="#"
|
href="#"
|
||||||
|
|
@ -16,7 +16,7 @@ import { StateService } from '../../../@core/data/state.service';
|
||||||
<i [attr.class]="layout.icon"></i>
|
<i [attr.class]="layout.icon"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<h5>SIDEBAR</h5>
|
<h6>SIDEBAR</h6>
|
||||||
<div class="settings-row">
|
<div class="settings-row">
|
||||||
<a *ngFor="let sidebar of sidebars"
|
<a *ngFor="let sidebar of sidebars"
|
||||||
href="#"
|
href="#"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue