Skip to content

Commit

Permalink
feat(cpt-hierarchy): create solution from branch step-03-solution
Browse files Browse the repository at this point in the history
  • Loading branch information
nlm-pro committed Nov 25, 2018
1 parent 9e00ded commit b2a1eea
Show file tree
Hide file tree
Showing 29 changed files with 550 additions and 0 deletions.
99 changes: 99 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,105 @@
}
}
}
},
"cpt-hierarchy-solution": {
"root": "steps/cpt-hierarchy-solution/",
"sourceRoot": "steps/cpt-hierarchy-solution/src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/cpt-hierarchy-solution",
"index": "steps/cpt-hierarchy-solution/src/index.html",
"main": "steps/cpt-hierarchy-solution/src/main.ts",
"polyfills": "steps/cpt-hierarchy-solution/src/polyfills.ts",
"tsConfig": "steps/cpt-hierarchy-solution/tsconfig.app.json",
"assets": [
"steps/cpt-hierarchy-solution/src/favicon.ico",
"steps/cpt-hierarchy-solution/src/assets"
],
"styles": [
"steps/cpt-hierarchy-solution/src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "steps/cpt-hierarchy-solution/src/environments/environment.ts",
"with": "steps/cpt-hierarchy-solution/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "cpt-hierarchy-solution:build"
},
"configurations": {
"production": {
"browserTarget": "cpt-hierarchy-solution:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "cpt-hierarchy-solution:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "steps/cpt-hierarchy-solution/src/test.ts",
"polyfills": "steps/cpt-hierarchy-solution/src/polyfills.ts",
"tsConfig": "steps/cpt-hierarchy-solution/tsconfig.spec.json",
"karmaConfig": "steps/cpt-hierarchy-solution/karma.conf.js",
"styles": [
"steps/cpt-hierarchy-solution/src/styles.css"
],
"scripts": [],
"assets": [
"steps/cpt-hierarchy-solution/src/favicon.ico",
"steps/cpt-hierarchy-solution/src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"steps/cpt-hierarchy-solution/tsconfig.app.json",
"steps/cpt-hierarchy-solution/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "angular-200",
Expand Down
11 changes: 11 additions & 0 deletions steps/cpt-hierarchy-solution/browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11
46 changes: 46 additions & 0 deletions steps/cpt-hierarchy-solution/src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
mat-toolbar.extend-toolbar {
background-color: #0168AB;
background-image: url('/assets/images/bg_right.png');
background-repeat: no-repeat;
background-position: right;
top: 0px;
box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
width: 100%;
z-index: 1;
color: white;
margin-bottom: 10px;
}

mat-toolbar .flex {
flex: 1 1 auto;
}

mat-toolbar a {
color: inherit;
text-decoration: none;
height: 100%;
margin: 0px 10px 0px 10px;
border-bottom: 2px solid transparent;
font-size: 1.1em;
font-weight: normal;
font-family: 'Open Sans', sans-serif;
}

mat-toolbar a:not(.active):hover {
border-bottom: 2px solid white;
}

mat-toolbar a img {
height: 100%;
margin-left: -60px;
}

mat-toolbar-row:nth-child(1) {
margin-bottom: 66px;
}
mat-toolbar-row:nth-child(2) {
padding-left: 30px;
text-align: center;
height: 56px;
margin-top: 56px;
}
16 changes: 16 additions & 0 deletions steps/cpt-hierarchy-solution/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<mat-toolbar class="extend-toolbar">
<span>
<a href="#/home">
<img src="assets/images/logo-sfeir.svg" aria-label="sfeir" alt="Sfeir">
</a>
</span>

<span class="flex"></span>

<span>
<a href="#/locator">Maps</a>
<a href="#/people">List</a>
</span>
</mat-toolbar>

<sfeir-home></sfeir-home>
11 changes: 11 additions & 0 deletions steps/cpt-hierarchy-solution/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Component } from '@angular/core';

@Component({
selector: 'sfeir-app',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css']
})
export class PeopleAppComponent {

constructor() {}
}
44 changes: 44 additions & 0 deletions steps/cpt-hierarchy-solution/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// CORE DEPS
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
// MATERIAL DESIGN MODULES
import {
MatToolbarModule,
MatCardModule,
MatTabsModule,
MatButtonModule,
MatInputModule,
MatCheckboxModule,
MatRadioModule,
MatIconModule,
MatListModule
} from '@angular/material';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

import { PeopleAppComponent } from './app.component';
import { HomeComponent } from './home';

@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
MatToolbarModule,
MatCardModule,
MatTabsModule,
MatButtonModule,
MatInputModule,
MatCheckboxModule,
MatRadioModule,
MatIconModule,
MatListModule
],
declarations: [
PeopleAppComponent,
HomeComponent
],
providers: [ ],
bootstrap: [
PeopleAppComponent
]
})
export class AppModule { }
Empty file.
3 changes: 3 additions & 0 deletions steps/cpt-hierarchy-solution/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<mat-card align="center">
Hello {{ name }}
</mat-card>
20 changes: 20 additions & 0 deletions steps/cpt-hierarchy-solution/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'sfeir-home',
templateUrl: 'home.component.html',
styleUrls: ['home.component.css']
})
export class HomeComponent implements OnInit {
name: string;

constructor() {
this.name = 'Angular 2';
}

/**
* OnInit implementation
*/
ngOnInit() {
}
}
1 change: 1 addition & 0 deletions steps/cpt-hierarchy-solution/src/app/home/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './home.component';
2 changes: 2 additions & 0 deletions steps/cpt-hierarchy-solution/src/app/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './app.component';
export * from './app.module';
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions steps/cpt-hierarchy-solution/src/assets/images/icon-maps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions steps/cpt-hierarchy-solution/src/assets/images/logo-sfeir.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions steps/cpt-hierarchy-solution/src/assets/images/search-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
production: true
};
8 changes: 8 additions & 0 deletions steps/cpt-hierarchy-solution/src/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `angular-cli.json`.

export const environment = {
production: false
};
Binary file added steps/cpt-hierarchy-solution/src/favicon.ico
Binary file not shown.
21 changes: 21 additions & 0 deletions steps/cpt-hierarchy-solution/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Angular2200</title>
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<sfeir-app>
<div class="loader">
<svg class="circular">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>
</svg>
</div>
</sfeir-app>
</body>
</html>
12 changes: 12 additions & 0 deletions steps/cpt-hierarchy-solution/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
Loading

0 comments on commit b2a1eea

Please sign in to comment.