mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-09-21 21:40:49 +02:00
feat(theme): add base header in one column layout
This commit is contained in:
parent
ed658566b3
commit
43f174a051
4 changed files with 20 additions and 12 deletions
|
@ -1,14 +1,14 @@
|
||||||
:host {
|
:host /deep/ {
|
||||||
& > nga-layout-header {
|
nga-layout-header > nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > nga-sidebar {
|
nga-sidebar {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
& > nga-layout-footer {
|
nga-layout-footer {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,12 +9,20 @@
|
||||||
* */
|
* */
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'one-coll-layout',
|
selector: 'one-coll-layout',
|
||||||
styleUrls: ['./one-coll.layout.scss'],
|
styleUrls: ['./one-coll.layout.scss'],
|
||||||
template: `
|
template: `
|
||||||
<nga-layout>
|
<nga-layout>
|
||||||
<nga-layout-header fixed></nga-layout-header>
|
<nga-layout-header fixed>
|
||||||
|
<section>
|
||||||
|
<h1>Logo</h1>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<nga-user></nga-user>
|
||||||
|
</section>
|
||||||
|
</nga-layout-header>
|
||||||
<nga-sidebar fixed>
|
<nga-sidebar fixed>
|
||||||
<ng-content select="nga-menu"></ng-content>
|
<ng-content select="nga-menu"></ng-content>
|
||||||
</nga-sidebar>
|
</nga-sidebar>
|
||||||
|
@ -25,6 +33,5 @@ import { Component } from '@angular/core';
|
||||||
</nga-layout>
|
</nga-layout>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
export class RootLayoutComponent {
|
export class OneCollLayoutComponent {
|
||||||
constructor() { }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
NgaUserModule
|
NgaUserModule
|
||||||
} from '@nga/theme';
|
} from '@nga/theme';
|
||||||
|
|
||||||
import { RootLayoutComponent } from './layouts';
|
import { OneCollLayoutComponent } from './layouts';
|
||||||
|
|
||||||
const BASE_MODULES = [
|
const BASE_MODULES = [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@ -25,24 +25,25 @@ const NGA_MODULES = [
|
||||||
NgaLayoutModule,
|
NgaLayoutModule,
|
||||||
NgaTabsetModule,
|
NgaTabsetModule,
|
||||||
NgaRouteTabsetModule,
|
NgaRouteTabsetModule,
|
||||||
NgaSidebarModule,
|
|
||||||
NgaMenuModule,
|
NgaMenuModule,
|
||||||
NgaUserModule
|
NgaUserModule
|
||||||
];
|
];
|
||||||
|
|
||||||
const LAYOUT_COMPONENTS = [
|
const LAYOUT_COMPONENTS = [
|
||||||
RootLayoutComponent
|
OneCollLayoutComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
...BASE_MODULES,
|
...BASE_MODULES,
|
||||||
...NGA_MODULES,
|
...NGA_MODULES,
|
||||||
|
NgaSidebarModule.forRoot(),
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
...BASE_MODULES,
|
...BASE_MODULES,
|
||||||
...NGA_MODULES,
|
...NGA_MODULES,
|
||||||
...LAYOUT_COMPONENTS
|
...LAYOUT_COMPONENTS,
|
||||||
|
NgaSidebarModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
...LAYOUT_COMPONENTS
|
...LAYOUT_COMPONENTS
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { NgaMenuItem } from '@nga/theme/components/menu/menu.options';
|
import { NgaMenuItem } from '@nga/theme';
|
||||||
|
|
||||||
import { List } from 'immutable';
|
import { List } from 'immutable';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue