forked from NationalBankBelgium/stark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stark-demo): add
styleguide/layout
page for documenting the us…
…e of Angular Flex-layout ISSUES CLOSED: NationalBankBelgium#668
- Loading branch information
1 parent
3c6045c
commit e1d157c
Showing
18 changed files
with
177 additions
and
4 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
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
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 @@ | ||
export * from "./styleguide-layout-page.component"; |
30 changes: 30 additions & 0 deletions
30
showcase/src/app/styleguide/pages/layout/styleguide-layout-page.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<h1 class="mat-display-3" translate>SHOWCASE.STYLEGUIDE.LAYOUT.TITLE</h1> | ||
<h2 class="mat-display-2" translate>SHOWCASE.STYLEGUIDE.LAYOUT.ANGULAR_FLEX_LAYOUT</h2> | ||
<p [innerHTML]="'SHOWCASE.STYLEGUIDE.LAYOUT.INTRO' | translate"></p> | ||
|
||
<example-viewer filesPath="flex-layout/flex" [extensions]="['HTML', 'SCSS']" exampleTitle="SHOWCASE.STYLEGUIDE.LAYOUT.FLEX"> | ||
<div class="layout-demo" fxLayout="column" fxLayout.gt-sm="row" fxLayoutGap="10px"> | ||
<div fxFlex>1</div> | ||
<div class="accent" fxFlex fxFlex.gt-md="75%"> | ||
2 | ||
</div> | ||
<div fxFlex>3</div> | ||
<div fxFlex>4</div> | ||
</div> | ||
</example-viewer> | ||
|
||
<!--FIXME: add example back when chrome is updated to 57 or higher--> | ||
<!--<example-viewer filesPath="flex-layout/grid" [extensions]="['HTML', 'SCSS']" exampleTitle="SHOWCASE.STYLEGUIDE.LAYOUT.GRID">--> | ||
<!--<div class="warning">--> | ||
<!--<mat-icon svgIcon="alert-circle" starkSvgViewBox></mat-icon>--> | ||
<!--<span [innerHTML]="'SHOWCASE.STYLEGUIDE.LAYOUT.GRID_WARNING' | translate"></span>--> | ||
<!--</div>--> | ||
<!--<div class="layout-demo" gdAuto="row" gdAuto.gt-sm="column" gdGap="10px">--> | ||
<!--<div>1</div>--> | ||
<!--<div class="accent" gdRow.gt-md="1" gdColumn.gt-md="1">--> | ||
<!--2--> | ||
<!--</div>--> | ||
<!--<div>3</div>--> | ||
<!--<div>4</div>--> | ||
<!--</div>--> | ||
<!--</example-viewer>--> |
14 changes: 14 additions & 0 deletions
14
showcase/src/app/styleguide/pages/layout/styleguide-layout-page.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.styleguide-layout-page { | ||
.warning { | ||
margin-bottom: 24px; | ||
|
||
mat-icon > svg { | ||
margin-bottom: -5px; | ||
} | ||
} | ||
|
||
.layout-demo > * { | ||
text-align: center; | ||
padding: 10px; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
showcase/src/app/styleguide/pages/layout/styleguide-layout-page.component.ts
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,15 @@ | ||
import { Component, HostBinding, Inject } from "@angular/core"; | ||
import { STARK_LOGGING_SERVICE, StarkLoggingService } from "@nationalbankbelgium/stark-core"; | ||
|
||
const componentName: string = "styleguide-layout-page"; | ||
|
||
@Component({ | ||
selector: "demo-layout", | ||
templateUrl: "./styleguide-layout-page.component.html" | ||
}) | ||
export class StyleguideLayoutPageComponent { | ||
@HostBinding("class") | ||
public class: string = componentName; | ||
|
||
public constructor(@Inject(STARK_LOGGING_SERVICE) public logger: StarkLoggingService) {} | ||
} |
15 changes: 15 additions & 0 deletions
15
showcase/src/app/styleguide/pages/layout/styleguide-layout-page.theme.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.styleguide-layout-page { | ||
.warning { | ||
color: mat-color($warning-palette, 500); | ||
} | ||
|
||
.layout-demo > * { | ||
background-color: mat-color($primary-palette, 500); | ||
color: mat-contrast($primary-palette, 500); | ||
|
||
&.accent { | ||
background-color: mat-color($accent-palette, 500); | ||
color: mat-contrast($accent-palette, 500); | ||
} | ||
} | ||
} |
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
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
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,13 @@ | ||
<div class="layout-demo" | ||
fxLayout="column" | ||
fxLayout.gt-sm="row" | ||
fxLayoutGap="10px"> | ||
<div fxFlex>1</div> | ||
<div class="accent" | ||
fxFlex | ||
fxFlex.gt-md="75%"> | ||
2 | ||
</div> | ||
<div fxFlex>3</div> | ||
<div fxFlex>4</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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.layout-demo { | ||
> * { | ||
text-align: center; | ||
padding: 10px; | ||
|
||
background-color: mat-color($primary-palette, 500); | ||
color: mat-contrast($primary-palette, 500); | ||
&.accent { | ||
background-color: mat-color($accent-palette, 500); | ||
color: mat-contrast($accent-palette, 500); | ||
} | ||
} | ||
} |
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,13 @@ | ||
<div class="layout-demo" | ||
gdAuto="row" | ||
gdAuto.gt-sm="column" | ||
gdGap="10px"> | ||
<div>1</div> | ||
<div class="accent" | ||
gdRow.gt-md="1" | ||
gdColumn.gt-md="1"> | ||
2 | ||
</div> | ||
<div>3</div> | ||
<div>4</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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.layout-demo { | ||
> * { | ||
text-align: center; | ||
padding: 10px; | ||
|
||
background-color: mat-color($primary-palette, 500); | ||
color: mat-contrast($primary-palette, 500); | ||
&.accent { | ||
background-color: mat-color($accent-palette, 500); | ||
color: mat-contrast($accent-palette, 500); | ||
} | ||
} | ||
} |
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
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
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
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
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