get team member information for about page from json. add buttons for github and linkedin profiles to team member cards

This commit is contained in:
eleanor 2018-11-12 10:26:54 -05:00
parent 662c075e2c
commit d081fd07b1
3 changed files with 43 additions and 25 deletions

View File

@ -37,30 +37,28 @@
fxLayout.lt-md="column"
fxLayoutGap="2%"
>
<div *ngFor="let t of teamMembers">
<mat-card>
<div class="circle-img">
<img src="../../assets/images/staunton_old_map.jpg">
<img src="{{ t.imageLink }}">
</div>
<h2>Dan Funk</h2>
<h3>Owner, Lead Developer</h3>
<p>I am a successful, battle proven, software engineer with a gift for conveying complex technical information.</p>
<h2>{{ t.name }}</h2>
<h3>{{ t.title }}</h3>
<p>{{ t.description }}</p>
<button
*ngIf="t.gitHubLink"
(click)="goWebsite(t.gitHubLink)"
>
GitHub
</button>
<button
*ngIf="t.linkedInLink"
(click)="goWebsite(t.linkedInLink)"
>
LinkedIn
</button>
</mat-card>
<mat-card>
<div class="circle-img">
<img src="../../assets/images/compass.jpg">
</div>
<h2>Aaron Louie</h2>
<h3>Senior Developer</h3>
<p>I am a successful, battle proven, software engineer with a gift for conveying complex technical information.</p>
</mat-card>
<mat-card>
<div class="circle-img">
<img src="../../assets/images/astro_clock.jpg">
</div>
<h2>Eleanor Graham</h2>
<h3>Developer</h3>
<p>I am a successful, battle proven, software engineer with a gift for conveying complex technical information.</p>
</mat-card>
</div>
</div>
<div fxLayoutAlign="center center">

View File

@ -15,6 +15,14 @@
padding: 2%;
}
button {
margin: 2%;
padding: 3%;
background-color: mat-color($sartography-warn, 500);
color: mat-contrast($sartography-warn, 500);
cursor: pointer;
}
mat-card {
padding: 5%;

View File

@ -1,4 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { TeamMember } from '../interfaces';
import { ApiService } from '../api.service';
@Component({
selector: 'app-about-us',
@ -6,10 +8,20 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./about-us.component.scss']
})
export class AboutUsComponent implements OnInit {
teamMembers: TeamMember[];
constructor() { }
constructor(
private api: ApiService
) { }
ngOnInit() {
this.api.getTeamMembers().subscribe(team => {
this.teamMembers = team;
});
}
goWebsite(link: string) {
window.open(link, '_blank');
}
}