-
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.
add in team-members component to display all members. add in profile …
…component to display stats for an individual member. add in styling to pages. add in about component
- Loading branch information
Jason Ainsworth git config --global user.email [email protected] config --global user.name Jason
authored and
Jason Ainsworth git config --global user.email [email protected] config --global user.name Jason
committed
Jun 16, 2017
1 parent
09d8898
commit 1a16c84
Showing
26 changed files
with
232 additions
and
27 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
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,3 @@ | ||
<p> | ||
about works! | ||
</p> |
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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AboutComponent } from './about.component'; | ||
|
||
describe('AboutComponent', () => { | ||
let component: AboutComponent; | ||
let fixture: ComponentFixture<AboutComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ AboutComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(AboutComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should be created', () => { | ||
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,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-about', | ||
templateUrl: './about.component.html', | ||
styleUrls: ['./about.component.css'] | ||
}) | ||
export class AboutComponent 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { TestBed, inject } from '@angular/core/testing'; | ||
|
||
import { DataService } from './data.service'; | ||
|
||
describe('DataService', () => { | ||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
providers: [DataService] | ||
}); | ||
}); | ||
|
||
it('should be created', inject([DataService], (service: DataService) => { | ||
expect(service).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,22 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { TeamMember } from './team-member.model'; | ||
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database'; | ||
|
||
@Injectable() | ||
export class DataService { | ||
teamMembers: FirebaseListObservable<any[]>; | ||
|
||
constructor(private database: AngularFireDatabase) { | ||
this.teamMembers = database.list('teamMembers'); | ||
} | ||
|
||
getTeamMembers() { | ||
return this.teamMembers; | ||
} | ||
|
||
getMemberById(memberId: string) { | ||
return this.database.object('teamMembers/' + memberId); | ||
} | ||
|
||
|
||
} |
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 @@ | ||
.profile-header { | ||
margin-top: -80px; | ||
text-align: center; | ||
margin-bottom: 50px; | ||
} | ||
|
||
.medium-img { | ||
height: 300px; | ||
width: 300px; | ||
float: right; | ||
margin-top: -65px; | ||
border-radius: 30px; | ||
} |
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,16 @@ | ||
<h1 class="profile-header">Team Member Profile</h1> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<h1>{{memberToDisplay?.name}}</h1> | ||
<img class="medium-img" src="{{memberToDisplay?.image}}" alt="Team Member Profile Pic"> | ||
<p><strong>Nick Name:</strong> {{memberToDisplay?.nickName}}</p> | ||
<p><strong>Age:</strong> {{memberToDisplay?.age}}</p> | ||
<p><strong>Sex:</strong> {{memberToDisplay?.sex}}</p> | ||
<p><strong>Height:</strong> {{memberToDisplay?.height}}</p> | ||
<p><strong>Weight:</strong> {{memberToDisplay?.weight}}</p> | ||
<p><strong>HomeTown:</strong> {{memberToDisplay?.homeTown}}</p> | ||
<p><strong>Jumps:</strong> {{memberToDisplay?.jumps}}</p> | ||
<p><strong>Sponsers:</strong> {{memberToDisplay?.sponsers}}</p> | ||
</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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ProfileComponent } from './profile.component'; | ||
|
||
describe('ProfileComponent', () => { | ||
let component: ProfileComponent; | ||
let fixture: ComponentFixture<ProfileComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ProfileComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ProfileComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should be created', () => { | ||
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,28 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { FirebaseListObservable } from 'angularfire2/database'; | ||
import { ActivatedRoute, Params } from '@angular/router'; | ||
import { Location } from '@angular/common'; | ||
import { DataService } from '../data.service'; | ||
import { TeamMember } from '../team-member.model'; | ||
import { Router } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'app-profile', | ||
templateUrl: './profile.component.html', | ||
styleUrls: ['./profile.component.css'], | ||
providers: [DataService] | ||
}) | ||
export class ProfileComponent implements OnInit { | ||
memberId: string; | ||
memberToDisplay: TeamMember; | ||
|
||
constructor(private route: ActivatedRoute, private dataService: DataService, private location: Location) { } | ||
|
||
ngOnInit() { | ||
this.route.params.forEach((urlParameters) => { | ||
this.memberId = urlParameters['id']; | ||
}); | ||
this.dataService.getMemberById(this.memberId).subscribe(dataLastEmittedFromObserver => {this.memberToDisplay = dataLastEmittedFromObserver}); | ||
} | ||
|
||
} |
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,3 +1,3 @@ | ||
export class TeamMember { | ||
constructor(public name: string, public nickName: string, public age: number, public sex: string, public height: string, public weight: number, public homeTown: string, public jumps: number, public sponsers: string, public bio: string ) {} | ||
constructor(public name: string, public nickName: string, public age: number, public sex: string, public height: string, public weight: number, public homeTown: string, public jumps: number, public sponsers: string, public bio: string, public image: string ) {} | ||
} |
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 @@ | ||
.profile-header { | ||
margin-top: -80px; | ||
text-align: center; | ||
margin-bottom: 50px; | ||
} | ||
|
||
.thumbnail { | ||
width: 100px; | ||
height: 100px; | ||
border-radius: 30px; | ||
float: right; | ||
margin-top: -80px; | ||
margin-right: 100px; | ||
} |
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,3 +1,9 @@ | ||
<p> | ||
team-members works! | ||
</p> | ||
<h1 class="profile-header">Team Members</h1> | ||
|
||
<div *ngFor="let member of teamMembers" class="panel panel-default" (click)="goToProfilePage(member)"> | ||
<div class="panel-body"> | ||
<h3>{{member.name}}</h3> | ||
<h4>AKA: {{member.nickName}}</h4> | ||
<img class="thumbnail" src={{member.image}} alt="Team Member Profile Picture"> | ||
</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,15 +1,29 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { FirebaseListObservable } from 'angularfire2/database'; | ||
import { DataService } from '../data.service'; | ||
import { TeamMember } from '../team-member.model'; | ||
import { Router } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'app-team-members', | ||
templateUrl: './team-members.component.html', | ||
styleUrls: ['./team-members.component.css'] | ||
styleUrls: ['./team-members.component.css'], | ||
providers: [DataService] | ||
}) | ||
export class TeamMembersComponent implements OnInit { | ||
teamMembers: TeamMember[]; | ||
|
||
constructor() { } | ||
constructor(private dataService: DataService, private router: Router) { } | ||
|
||
ngOnInit() { | ||
this.dataService.getTeamMembers().subscribe(dataLastEmittedFromObserver => { this.teamMembers = dataLastEmittedFromObserver;}) | ||
} | ||
|
||
goToProfilePage(member) { | ||
this.router.navigate(['profile', member.$key]) | ||
} | ||
|
||
|
||
|
||
|
||
} |
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,6 +1,2 @@ | ||
|
||
<div class="bg-img"></div> | ||
|
||
<p> | ||
welcome works! | ||
</p> |
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.
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.