-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stark-ui): example Viewer + basic showcase layout
- Loading branch information
Showing
34 changed files
with
567 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
/** | ||
* Load karma config from Stark | ||
*/ | ||
module.exports = require("./node_modules/@nationalbankbelgium/stark-testing/karma.conf.ci.js"); | ||
const defaultKarmaCIConfig = require("./node_modules/@nationalbankbelgium/stark-testing/karma.conf.ci.js").rawKarmaConfig; | ||
const karmaTypescriptExclusions = require("./karma.conf").karmaTypescriptExclusions; | ||
|
||
// start customizing the KarmaCI configuration from stark-testing | ||
const starkShowcaseSpecificConfiguration = Object.assign({}, defaultKarmaCIConfig, { | ||
exclude: [...defaultKarmaCIConfig.exclude, ...karmaTypescriptExclusions] | ||
}); | ||
|
||
// export the configuration function that karma expects and simply return the stark configuration | ||
module.exports = config => { | ||
return config.set(starkShowcaseSpecificConfiguration); | ||
}; |
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,26 @@ | ||
/** | ||
* Load karma config from Stark | ||
*/ | ||
module.exports = require("./node_modules/@nationalbankbelgium/stark-testing/karma.conf.js"); | ||
const helpers = require("./node_modules/@nationalbankbelgium/stark-testing/helpers"); | ||
|
||
/** | ||
* Load karma config from Stark | ||
*/ | ||
const defaultKarmaConfig = require("./node_modules/@nationalbankbelgium/stark-testing/karma.conf.js").rawKarmaConfig; | ||
|
||
// entry files of the "@nationalbankbelgium/stark-ui" module imported in mock files | ||
const karmaTypescriptExclusions = [...defaultKarmaConfig.exclude, "src/assets/examples/*"]; | ||
|
||
// start customizing the KarmaCI configuration from stark-testing | ||
const starkShowcaseSpecificConfiguration = Object.assign({}, defaultKarmaConfig, { | ||
// list of files to exclude | ||
exclude: karmaTypescriptExclusions | ||
}); | ||
|
||
// export the configuration function that karma expects and simply return the stark configuration | ||
module.exports = { | ||
default: function(config) { | ||
return config.set(starkShowcaseSpecificConfiguration); | ||
}, | ||
karmaTypescriptExclusions: karmaTypescriptExclusions | ||
}; |
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 |
---|---|---|
@@ -1,9 +1,4 @@ | ||
html, | ||
body { | ||
height: 100%; | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
|
||
a.active { | ||
background-color: #888; | ||
} |
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,5 +1,34 @@ | ||
<stark-app-logo></stark-app-logo> | ||
<header class="stark-header aah-stark"> | ||
<div class="stark-container"> | ||
<div class="stark-app-bar"> | ||
<button mat-icon-button><mat-icon svgIcon="home"></mat-icon></button> | ||
<button (click)="sidenav.toggle()" mat-icon-button><mat-icon svgIcon="menu"></mat-icon></button> | ||
<button mat-icon-button><mat-icon svgIcon="arrow-left"></mat-icon></button> | ||
|
||
<main> | ||
<ui-view></ui-view> | ||
</main> | ||
<stark-app-logo></stark-app-logo> | ||
|
||
<div class="stark-header-extra"> | ||
<button mat-mini-fab color="warn"><mat-icon svgIcon="power"></mat-icon></button> | ||
</div> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<mat-sidenav-container class="stark-main-content"> | ||
<mat-sidenav #sidenav mode="side" [fixedInViewport]="true" [fixedTopGap]="128" [fixedBottomGap]="0" closed> | ||
<mat-nav-list class="nav-main"> | ||
<a mat-list-item uiSref="home" uiSrefActive="active"> | ||
<span matLine>Home</span> | ||
</a> | ||
<a mat-list-item uiSref="demo-example-viewer" uiSrefActive="active"> | ||
<span matLine>Example Viewer</span> | ||
</a> | ||
</mat-nav-list> | ||
</mat-sidenav> | ||
<mat-sidenav-content class="px4 py2"> | ||
<main> | ||
<ui-view></ui-view> | ||
</main> | ||
|
||
</mat-sidenav-content> | ||
</mat-sidenav-container> |
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { DemoComponent } from "./demo"; | ||
import { HomeComponent } from "./home"; | ||
import { NoContentComponent } from "./no-content"; | ||
import { Ng2StateDeclaration } from "@uirouter/angular"; | ||
|
||
export const APP_STATES: Ng2StateDeclaration[] = [ | ||
{ name: "index", url: "/", component: HomeComponent }, | ||
{ name: "home", url: "/home", component: HomeComponent }, | ||
{ name: "home", url: "/", component: HomeComponent }, | ||
{ name: "demo-example-viewer", url: "/demo-example-viewer", component: DemoComponent }, | ||
{ name: "otherwise", url: "/otherwise", component: NoContentComponent } | ||
]; |
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,11 @@ | ||
<example-viewer filesPath="test" title="Example Viewer"> | ||
<h3>Raised Buttons</h3> | ||
<div class="button-row"> | ||
<button mat-raised-button>Basic</button> | ||
<button mat-raised-button color="primary">Primary</button> | ||
<button mat-raised-button color="accent">Accent</button> | ||
<button mat-raised-button color="warn">Warn</button> | ||
<button mat-raised-button disabled>Disabled</button> | ||
<a mat-raised-button routerLink=".">Link</a> | ||
</div> | ||
</example-viewer> |
Empty file.
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,26 @@ | ||
import { HttpClientModule } from "@angular/common/http"; | ||
import { async, ComponentFixture, TestBed } from "@angular/core/testing"; | ||
import { DemoComponent } from "./demo.component"; | ||
import { SharedModule } from "../shared/shared.module"; | ||
|
||
describe("DemoComponent", () => { | ||
let component: DemoComponent; | ||
let fixture: ComponentFixture<DemoComponent>; | ||
|
||
beforeEach(async(() => { | ||
return TestBed.configureTestingModule({ | ||
declarations: [DemoComponent], | ||
imports: [HttpClientModule, SharedModule] | ||
}).compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DemoComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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,8 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "showcase-demo", | ||
templateUrl: "./demo.component.html", | ||
styleUrls: ["./demo.component.scss"] | ||
}) | ||
export class DemoComponent {} |
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 "./demo.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,8 +1,19 @@ | ||
<div> | ||
<h1 translate>SHOWCASE.HOME.TITLE</h1> | ||
|
||
<hr> | ||
|
||
Coming soon! | ||
|
||
</div> | ||
<div class="mb3"> | ||
<mat-card> | ||
<mat-card-header> | ||
<mat-card-title> | ||
<h1>Angular Material components</h1> | ||
</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-content> | ||
<div class="mb2"> | ||
<button mat-raised-button>Basic</button> | ||
<button mat-raised-button color="primary">Primary</button> | ||
<button mat-raised-button color="accent">Accent</button> | ||
<button mat-raised-button color="warn">Warn</button> | ||
<button mat-raised-button disabled>Disabled</button> | ||
</div> | ||
</mat-card-content> | ||
</mat-card> | ||
</div> |
This file was deleted.
Oops, something went wrong.
Empty file.
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
Oops, something went wrong.