Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/app/team/member.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<mat-card>
<img mat-card-image [src]="member.avatar" />
<mat-card-header>
<mat-card-title-group>
<mat-card-title>{{member.name}}</mat-card-title>
<mat-card-subtitle>{{member.role}}</mat-card-subtitle>
</mat-card-title-group>
</mat-card-header>
<mat-card-content>
<p>
{{member.bio}}
</p>
</mat-card-content>
<mat-card-actions>
<app-social-sharing
[githubUrl]="member.githubUrl"
[twitterUrl]="member.twitterUrl"
[linkedinUrl]="member.linkedinUrl">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

email is missing here but its part of the member interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - removed that unused property from the model

</app-social-sharing>
</mat-card-actions>
</mat-card>
17 changes: 17 additions & 0 deletions src/app/team/member.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.mat-card {
width: 210px;
margin: 10px;
}

.header-image {
background-size: cover;
}

.mat-card-actions {
text-align: center;
margin-bottom: 1px;
}

.mat-card-title {
font-size: 20px;
}
25 changes: 25 additions & 0 deletions src/app/team/member.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 { MemberComponent } from './member.component';

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});
12 changes: 12 additions & 0 deletions src/app/team/member.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component, Input } from '@angular/core';

import { IMember } from './team.models';

@Component({
selector: 'app-member',
templateUrl: './member.component.html',
styleUrls: ['./member.component.scss']
})
export class MemberComponent{
@Input() member: IMember;
}
9 changes: 9 additions & 0 deletions src/app/team/social-sharing/social-sharing.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<a *ngIf="!!githubUrl" mat-button [href]="githubUrl">
<mat-icon class="icon-github"></mat-icon>
</a>
<a *ngIf="!!twitterUrl" mat-button [href]="twitterUrl">
<mat-icon class="icon-twitter"></mat-icon>
</a>
<a *ngIf="!!linkedinUrl" mat-button [href]="linkedinUrl">
<mat-icon class="icon-linkedin"></mat-icon>
</a>
18 changes: 18 additions & 0 deletions src/app/team/social-sharing/social-sharing.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@import "../../../styles/colors";

a.mat-button {
font-size: 25px;
}

.icon-github {
color: $icon-color-github;
}

.icon-twitter {
color: $icon-color-twitter;

}

.icon-linkedin {
color: $icon-color-linkedin;
}
25 changes: 25 additions & 0 deletions src/app/team/social-sharing/social-sharing.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 { SocialSharingComponent } from './social-sharing.component';

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});
12 changes: 12 additions & 0 deletions src/app/team/social-sharing/social-sharing.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component, Input } from '@angular/core';

@Component({
selector: 'app-social-sharing',
templateUrl: './social-sharing.component.html',
styleUrls: ['./social-sharing.component.scss']
})
export class SocialSharingComponent {
@Input() githubUrl: string;
@Input() twitterUrl: string;
@Input() linkedinUrl: string;
}
18 changes: 15 additions & 3 deletions src/app/team/team.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<p>
team works!
</p>
<div style="background-color: white;" class="team-section">
<h2>Core team</h2>
<section class="wrapper">
<app-member *ngFor="let member of (team$ | async).coreTeam" [member]="member">
</app-member>
</section>
</div>

<div style="background-color: #efefef" class="team-section">
<h2>Learning team</h2>
<section class="wrapper">
<app-member *ngFor="let member of (team$ | async).learningTeam" [member]="member">
</app-member>
</section>
</div>
22 changes: 22 additions & 0 deletions src/app/team/team.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:host {
display: block;
max-width: 1000px;
margin: 0 auto;
}

h2 {
text-align: center;
margin: 0;
padding: 20px;
}

section.wrapper {
display: flex;
flex-flow: row wrap;
justify-content: center;
}

div.team-section {
box-shadow: -1px 3px 5px 0px #d6d6d6;
margin-bottom: 3px;
}
18 changes: 15 additions & 3 deletions src/app/team/team.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';

import { TeamService } from './team.service';
import { ITeam } from './team.models';

@Component({
selector: 'app-team',
templateUrl: './team.component.html',
styleUrls: ['./team.component.scss']
})
export class TeamComponent {
constructor() {}
export class TeamComponent implements OnInit {
team$: Observable<ITeam>;

constructor(
private service: TeamService
) {}

ngOnInit() {
this.team$ = this.service.getTeam();
}
}
14 changes: 14 additions & 0 deletions src/app/team/team.models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export interface ITeam {
coreTeam: IMember[];
learningTeam: IMember[];
}

export interface IMember {
name: string;
role: string;
githubUrl: string;
avatar: string;
twitterUrl: string;
linkedinUrl: string;
bio: string;
}
23 changes: 20 additions & 3 deletions src/app/team/team.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import {
MatCardModule,
MatButtonModule,
MatIconModule,
} from '@angular/material';

import { TeamComponent } from './team.component';
import { TeamRoutingModule } from './team-routing.module';
import { TeamComponent } from './team.component';
import { TeamService } from './team.service';
import { MemberComponent } from './member.component';
import { SocialSharingComponent } from './social-sharing/social-sharing.component';

@NgModule({
imports: [TeamRoutingModule],
declarations: [TeamComponent]
imports: [
TeamRoutingModule,
CommonModule,
MatCardModule,
MatButtonModule,
MatIconModule
],
providers: [TeamService],
declarations: [TeamComponent, MemberComponent, SocialSharingComponent]
})
export class TeamModule {}
15 changes: 15 additions & 0 deletions src/app/team/team.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { TestBed, inject } from '@angular/core/testing';

import { TeamService } from './team.service';

describe('TeamService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [TeamService]
});
});

it('should be created', inject([TeamService], (service: TeamService) => {
expect(service).toBeTruthy();
}));
});
103 changes: 103 additions & 0 deletions src/app/team/team.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/from';

import { ITeam, IMember } from './team.models';

@Injectable()
export class TeamService {
getTeam(): Observable<ITeam> {
return Observable.from([{
coreTeam: [{
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}, {
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}, {
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}, {
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}],
learningTeam: [{
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}, {
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}, {
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}, {
'name': 'Ben Lesh',
'role': 'Developer',
'githubUrl': 'https://github.com/benlesh',
'avatar': 'https://github.com/benlesh.png',
'twitterUrl': 'https://twitter.com/BenLesh',
'linkedinUrl': 'https://www.linkedin.com/in/blesh/',
'bio':
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
'Sed est odio, sodales et tellus a, semper pellentesque elit. ' +
'Mauris purus dui, dignissim nec sodales ut, feugiat et purus.'
}]
}]);
}
}
Binary file added src/assets/fonts/icomoon.woff
Binary file not shown.
1 change: 1 addition & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import '~@angular/material/theming';
@import './app/operators/operator-theme';
@import './styles/code-helpers';
@import './styles/icons';

@include mat-core();
// Define the theme.
Expand Down
3 changes: 3 additions & 0 deletions src/styles/_colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$icon-color-github: #6f066f;
$icon-color-twitter: #4073d4;
$icon-color-linkedin: #3D7CA4;
Loading