feat(theme): add base header in one column layout

This commit is contained in:
tibing 2017-04-17 08:28:11 +03:00
parent ed658566b3
commit 43f174a051
4 changed files with 20 additions and 12 deletions

View file

@ -1,14 +1,14 @@
:host {
& > nga-layout-header {
:host /deep/ {
nga-layout-header > nav {
display: flex;
justify-content: space-between;
}
& > nga-sidebar {
nga-sidebar {
}
& > nga-layout-footer {
nga-layout-footer {
}
}

View file

@ -9,12 +9,20 @@
* */
import { Component } from '@angular/core';
@Component({
selector: 'one-coll-layout',
styleUrls: ['./one-coll.layout.scss'],
template: `
<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>
<ng-content select="nga-menu"></ng-content>
</nga-sidebar>
@ -25,6 +33,5 @@ import { Component } from '@angular/core';
</nga-layout>
`,
})
export class RootLayoutComponent {
constructor() { }
export class OneCollLayoutComponent {
}

View file

@ -12,7 +12,7 @@ import {
NgaUserModule
} from '@nga/theme';
import { RootLayoutComponent } from './layouts';
import { OneCollLayoutComponent } from './layouts';
const BASE_MODULES = [
CommonModule,
@ -25,24 +25,25 @@ const NGA_MODULES = [
NgaLayoutModule,
NgaTabsetModule,
NgaRouteTabsetModule,
NgaSidebarModule,
NgaMenuModule,
NgaUserModule
];
const LAYOUT_COMPONENTS = [
RootLayoutComponent
OneCollLayoutComponent
];
@NgModule({
imports: [
...BASE_MODULES,
...NGA_MODULES,
NgaSidebarModule.forRoot(),
],
exports: [
...BASE_MODULES,
...NGA_MODULES,
...LAYOUT_COMPONENTS
...LAYOUT_COMPONENTS,
NgaSidebarModule
],
declarations: [
...LAYOUT_COMPONENTS

View file

@ -1,4 +1,4 @@
import { NgaMenuItem } from '@nga/theme/components/menu/menu.options';
import { NgaMenuItem } from '@nga/theme';
import { List } from 'immutable';