-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
172 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
<ng-content></ng-content> | ||
<div class="page-layout"> | ||
<div class="top-bg"></div> | ||
|
||
<div class="wrapper"> | ||
<div class="header" fxLayout="row" fxLayoutAlign="start center"> | ||
<ng-content select="base-layout-header"></ng-content> | ||
</div> | ||
|
||
<div class="card"> | ||
<div class="toolbar" fxLayout="row" fxLayoutAlign="start center"></div> | ||
<div class="content"> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,71 @@ | ||
:host { | ||
display: block; | ||
.layout-container { | ||
display: flex; | ||
flex: 1; | ||
width: 100%; | ||
} | ||
|
||
.layout-strategy { | ||
height: 100%; | ||
} | ||
|
||
.page-layout { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1 0 auto; | ||
width: 100%; | ||
min-width: 100%; | ||
position: relative; | ||
} | ||
|
||
.top-bg { | ||
position: absolute; | ||
z-index: 1; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
height: 200px; | ||
background: #c471f3; | ||
background-size: cover; | ||
} | ||
|
||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
position: relative; | ||
z-index: 2; | ||
padding: 0 32px; | ||
width: 100%; | ||
min-width: 100%; | ||
max-width: 100%; | ||
max-height: 100%; | ||
box-sizing: border-box; | ||
>.header { | ||
height: 136px; | ||
min-height: 136px; | ||
max-height: 136px; | ||
} | ||
>.card { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
overflow: hidden; | ||
background: #fff; | ||
box-shadow: 0 4px 5px -2px rgba(0, 0, 0, .2), 0 7px 10px 1px rgba(0, 0, 0, .14), 0 2px 16px 1px rgba(0, 0, 0, .12); | ||
} | ||
} | ||
|
||
.toolbar { | ||
border-bottom: 1px solid rgba(0, 0, 0, .12); | ||
height: 64px; | ||
min-height: 64px; | ||
max-height: 64px; | ||
padding: 0 24px; | ||
} | ||
|
||
.content { | ||
display: flex; | ||
flex: 1; | ||
padding: 24px; | ||
overflow: auto | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,49 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
/** | ||
* @license | ||
* Copyright Stbui All Rights Reserved. | ||
*/ | ||
|
||
import { Component, OnInit, Input, ViewEncapsulation } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'stbui-base-layout', | ||
templateUrl: './base-layout.component.html', | ||
styleUrls: ['./base-layout.component.scss'] | ||
styleUrls: ['./base-layout.component.scss'], | ||
encapsulation: ViewEncapsulation.None, | ||
host: { | ||
class: 'layout-container', | ||
'[class.layout-strategy]': 'scrollStrategy === "strategy"' | ||
} | ||
}) | ||
export class BaseLayoutComponent implements OnInit { | ||
@Input() scrollStrategy; | ||
constructor() {} | ||
|
||
constructor() { } | ||
ngOnInit() {} | ||
} | ||
|
||
ngOnInit() { | ||
@Component({ | ||
selector: 'stbui-base-layout-header', | ||
template: '<ng-content></ng-content>', | ||
host: { | ||
class: 'base-layout-header' | ||
} | ||
}) | ||
export class BaseLayoutHeaderComponent implements OnInit { | ||
constructor() {} | ||
|
||
ngOnInit() {} | ||
} | ||
|
||
@Component({ | ||
selector: 'stbui-base-layout-content', | ||
template: '<ng-content></ng-content>', | ||
host: { | ||
class: 'base-layout-content' | ||
} | ||
}) | ||
export class BaseLayoutContentComponent implements OnInit { | ||
constructor() {} | ||
|
||
ngOnInit() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
/** | ||
* @license | ||
* Copyright Stbui All Rights Reserved. | ||
*/ | ||
|
||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { BaseLayoutComponent } from './base-layout.component'; | ||
import { | ||
BaseLayoutComponent, | ||
BaseLayoutHeaderComponent | ||
} from './base-layout.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule | ||
], | ||
declarations: [BaseLayoutComponent], | ||
exports: [BaseLayoutComponent] | ||
imports: [CommonModule], | ||
declarations: [BaseLayoutComponent, BaseLayoutHeaderComponent], | ||
exports: [BaseLayoutComponent, BaseLayoutHeaderComponent] | ||
}) | ||
export class BaseLayoutModule { } | ||
export class BaseLayoutModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @license | ||
* Copyright Stbui All Rights Reserved. | ||
*/ | ||
|
||
export * from './public-api'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* @license | ||
* Copyright Stbui All Rights Reserved. | ||
*/ | ||
|
||
export * from './base-layout.module'; | ||
export * from './base-layout.component'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './base-layout/base-layout.module'; | ||
export * from './base-layout'; |
17 changes: 3 additions & 14 deletions
17
src/app/page-layouts/carded/fullwidth/fullwidth.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,3 @@ | ||
<div class="page-layout"> | ||
<div class="top-bg"></div> | ||
|
||
<div class="wrapper"> | ||
<div class="header" fxLayout="row" fxLayoutAlign="start center"></div> | ||
|
||
<div class="card"> | ||
<div class="toolbar" fxLayout="row" fxLayoutAlign="start center"></div> | ||
<div class="content"> | ||
<app-demo-content></app-demo-content> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<stbui-base-layout> | ||
<app-demo-content></app-demo-content> | ||
</stbui-base-layout> |
68 changes: 0 additions & 68 deletions
68
src/app/page-layouts/carded/fullwidth/fullwidth.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +0,0 @@ | ||
:host { | ||
display: flex; | ||
flex: 1; | ||
width: 100%; | ||
min-width: 100%; | ||
} | ||
|
||
.page-layout { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1 0 auto; | ||
width: 100%; | ||
min-width: 100%; | ||
position: relative; | ||
} | ||
|
||
.top-bg { | ||
position: absolute; | ||
z-index: 1; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
height: 200px; | ||
background: #c471f3; | ||
background-size: cover; | ||
} | ||
|
||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
position: relative; | ||
z-index: 2; | ||
padding: 0 32px; | ||
width: 100%; | ||
min-width: 100%; | ||
max-width: 100%; | ||
max-height: 100%; | ||
box-sizing: border-box; | ||
>.header { | ||
height: 136px; | ||
min-height: 136px; | ||
max-height: 136px; | ||
} | ||
>.card { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
overflow: hidden; | ||
background: #fff; | ||
box-shadow: 0 4px 5px -2px rgba(0, 0, 0, .2), 0 7px 10px 1px rgba(0, 0, 0, .14), 0 2px 16px 1px rgba(0, 0, 0, .12); | ||
} | ||
} | ||
|
||
.toolbar { | ||
border-bottom: 1px solid rgba(0, 0, 0, .12); | ||
height: 64px; | ||
min-height: 64px; | ||
max-height: 64px; | ||
padding: 0 24px; | ||
} | ||
|
||
.content { | ||
display: flex; | ||
flex: 1; | ||
padding: 24px; | ||
overflow: auto | ||
} | ||
16 changes: 3 additions & 13 deletions
16
src/app/page-layouts/carded/fullwidth2/fullwidth2.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,3 @@ | ||
<div class="page-layout"> | ||
<div class="top-bg"></div> | ||
|
||
<div class="wrapper"> | ||
<div class="header" fxLayout="row" fxLayoutAlign="start center"></div> | ||
<div class="card"> | ||
<div class="toolbar" fxLayout="row" fxLayoutAlign="start center"></div> | ||
<div class="content"> | ||
<app-demo-content></app-demo-content> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<stbui-base-layout scrollStrategy="strategy"> | ||
<app-demo-content></app-demo-content> | ||
</stbui-base-layout> |
69 changes: 0 additions & 69 deletions
69
src/app/page-layouts/carded/fullwidth2/fullwidth2.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +0,0 @@ | ||
:host { | ||
display: flex; | ||
flex: 1; | ||
width: 100%; | ||
min-width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.page-layout { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1 0 auto; | ||
width: 100%; | ||
min-width: 100%; | ||
position: relative; | ||
} | ||
|
||
.top-bg { | ||
position: absolute; | ||
z-index: 1; | ||
top: 0; | ||
right: 0; | ||
left: 0; | ||
height: 200px; | ||
background: #c471f3; | ||
background-size: cover; | ||
} | ||
|
||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
position: relative; | ||
z-index: 2; | ||
padding: 0 32px; | ||
width: 100%; | ||
min-width: 100%; | ||
max-width: 100%; | ||
max-height: 100%; | ||
box-sizing: border-box; | ||
>.header { | ||
height: 136px; | ||
min-height: 136px; | ||
max-height: 136px; | ||
} | ||
>.card { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
overflow: hidden; | ||
background: #fff; | ||
box-shadow: 0 4px 5px -2px rgba(0, 0, 0, .2), 0 7px 10px 1px rgba(0, 0, 0, .14), 0 2px 16px 1px rgba(0, 0, 0, .12); | ||
} | ||
} | ||
|
||
.toolbar { | ||
border-bottom: 1px solid rgba(0, 0, 0, .12); | ||
height: 64px; | ||
min-height: 64px; | ||
max-height: 64px; | ||
padding: 0 24px; | ||
} | ||
|
||
.content { | ||
display: flex; | ||
flex: 1; | ||
padding: 24px; | ||
overflow: auto | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters