Skip to content

Commit

Permalink
initial layout for labeller established
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmundy committed Aug 19, 2017
1 parent 292b992 commit 47b1d0b
Show file tree
Hide file tree
Showing 13 changed files with 175 additions and 50 deletions.
52 changes: 25 additions & 27 deletions .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,37 @@
"project": {
"name": "skill-labeller-ui"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
"apps": [{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap-grid.min.css",
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
],
}],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"lint": [{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
Expand Down
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^4.2.4",
"@angular/animations": "^4.3.5",
"@angular/cdk": "^2.0.0-beta.8",
"@angular/common": "^4.2.4",
"@angular/compiler": "^4.2.4",
"@angular/core": "^4.2.4",
"@angular/forms": "^4.2.4",
"@angular/http": "^4.2.4",
"@angular/material": "^2.0.0-beta.8",
"@angular/platform-browser": "^4.2.4",
"@angular/platform-browser-dynamic": "^4.2.4",
"@angular/router": "^4.2.4",
"bootstrap": "^4.0.0-beta",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"rxjs": "^5.4.2",
"zone.js": "^0.8.14"
},
Expand Down
3 changes: 3 additions & 0 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.fill-remaining-space {
flex: 1 1 auto;
}
23 changes: 4 additions & 19 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
<h1>
Welcome to {{title}}!
</h1>
<img width="300" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo=">
</div>
<h2>Here are some links to help you start: </h2>
<ul>
<li>
<h2><a target="_blank" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
</li>
<li>
<h2><a target="_blank" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
</li>
<li>
<h2><a target="_blank" href="https://blog.angular.io//">Angular blog</a></h2>
</li>
</ul>
<md-toolbar color="primary">
<span>Workforce Data Initiative Skill Labeller</span>
</md-toolbar>

<app-labeller></app-labeller>
1 change: 1 addition & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';


@Component({
selector: 'app-root',
templateUrl: './app.component.html',
Expand Down
19 changes: 17 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { LabellerComponent } from './labeller/label-display/labeller.component';

import {MdToolbarModule} from '@angular/material';
import {MdButtonModule} from '@angular/material';
import {MdIconModule} from '@angular/material';
import {MdCardModule} from '@angular/material';
import {MdDialogModule, MdDialogRef, MdDialog} from '@angular/material';

import 'hammerjs';

@NgModule({
declarations: [
AppComponent
AppComponent,
LabellerComponent
],
imports: [
BrowserModule
BrowserModule,
MdToolbarModule,
MdButtonModule,
MdIconModule,
MdCardModule,
MdDialogModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down
17 changes: 17 additions & 0 deletions src/app/labeller/label-display/labeller.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.card-container {
padding: 3rem 1.5rem;
text-align: center;
width: 30%;
}

.border:not([class*=mat-elevation-z]) {
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
}

.swipe-left {
background-color: #E53935;
}

.swipe-right {
background-color: #43A047;
}
15 changes: 15 additions & 0 deletions src/app/labeller/label-display/labeller.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="container card-container">
<md-toolbar class="border">Is this a skill?</md-toolbar>
<md-card (swipeleft)="onSwipeLeft()" (swiperight)="onSwipeRight()">
<md-card-content>
<h2>Ability to work under pressure.</h2>
</md-card-content>
<md-card-actions>
<button md-fab (click)="onSwipeLeft()" class="swipe-left"><md-icon>close</md-icon></button>
<button md-fab (click)="onSwipeRight()" class="swipe-right"><md-icon>check</md-icon></button>
</md-card-actions>
<md-card-footer>
<button md-button (click)="onRequestHelp()">Instructions</button>
</md-card-footer>
</md-card>
</div>
25 changes: 25 additions & 0 deletions src/app/labeller/label-display/labeller.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { LabellerComponent } from './labeller.component';

describe('LabellerComponent', () => {
let component: LabellerComponent;
let fixture: ComponentFixture<LabellerComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LabellerComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(LabellerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should be created', () => {
expect(component).toBeTruthy();
});
});
27 changes: 27 additions & 0 deletions src/app/labeller/label-display/labeller.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-labeller',
templateUrl: './labeller.component.html',
styleUrls: ['./labeller.component.css']
})
export class LabellerComponent implements OnInit {

constructor() { }

ngOnInit() {
}

onSwipeLeft() {
console.log('Left Swipe');
}

onSwipeRight() {
console.log('Right Swipe');
}

onRequestHelp() {
console.log('Request help');
}

}
5 changes: 5 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>SkillLabellerUi</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">
<link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono" rel="stylesheet">
</head>

<body>
<app-root></app-root>
</body>

</html>
6 changes: 5 additions & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/* You can add global styles to this file, and also import other style files */
@import "~@angular/material/prebuilt-themes/indigo-pink.css";
body {
padding: 0px;
margin: 0px;
}

0 comments on commit 47b1d0b

Please sign in to comment.