This repository was archived by the owner on Oct 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
feat(teams page): Design a teams page #202
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5234038
feat(teams page): init wip
fredrik-lundin 02a43aa
feat(team page): split team page into smaller components
fredrik-lundin fd98c64
merge
fredrik-lundin 1e817a4
feat(team page): center content
fredrik-lundin 2f1b8a9
refactor(team page): remove unsued json files
fredrik-lundin 76eed5d
fix(styles): remove style from bad merge
fredrik-lundin 5c6a491
Merge branch 'master' into master
fredrik-lundin ba1d966
fix: remove unused html tag
fredrik-lundin f995509
refactor: delete yarn-error.log
fredrik-lundin fc9ca53
refactor: import fa directly in styles.scss
fredrik-lundin 8f5248d
fix(teams page): remove unused property on model
fredrik-lundin fb41f87
refactor(teams page): change mock name to Ben Lesh
fredrik-lundin e889fac
refactor(teams pages): use classes for icon color
fredrik-lundin 83b5b00
rebase from upstream
fredrik-lundin 8efcfe3
Merge branch 'master' into master
sumitarora caab113
feat(teams page): replace fa with individual fonts
fredrik-lundin e1d2148
refactor(teams page): change name _fonts.scss to _icons.scss
fredrik-lundin 5fbcfc4
Merge branch 'master' into master
fredrik-lundin f59b1bc
Merge branch 'master' into master
fredrik-lundin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,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"> | ||
| </app-social-sharing> | ||
| </mat-card-actions> | ||
| </mat-card> | ||
This file contains hidden or 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,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; | ||
| } |
This file contains hidden or 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 { 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(); | ||
| }); | ||
| }); |
This file contains hidden or 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,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; | ||
| } |
This file contains hidden or 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,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> |
This file contains hidden or 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,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
25
src/app/team/social-sharing/social-sharing.component.spec.ts
This file contains hidden or 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 { 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(); | ||
| }); | ||
| }); |
This file contains hidden or 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,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; | ||
| } |
This file contains hidden or 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,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> |
This file contains hidden or 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 @@ | ||
| :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; | ||
| } |
This file contains hidden or 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,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(); | ||
| } | ||
| } |
This file contains hidden or 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 @@ | ||
| export interface ITeam { | ||
| coreTeam: IMember[]; | ||
| learningTeam: IMember[]; | ||
| } | ||
|
|
||
| export interface IMember { | ||
| name: string; | ||
| role: string; | ||
| githubUrl: string; | ||
| avatar: string; | ||
| twitterUrl: string; | ||
| linkedinUrl: string; | ||
| bio: string; | ||
| } |
This file contains hidden or 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,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 {} |
This file contains hidden or 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 { TeamService } from './team.service'; | ||
|
|
||
| describe('TeamService', () => { | ||
| beforeEach(() => { | ||
| TestBed.configureTestingModule({ | ||
| providers: [TeamService] | ||
| }); | ||
| }); | ||
|
|
||
| it('should be created', inject([TeamService], (service: TeamService) => { | ||
| expect(service).toBeTruthy(); | ||
| })); | ||
| }); |
This file contains hidden or 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,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 not shown.
This file contains hidden or 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 hidden or 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 @@ | ||
| $icon-color-github: #6f066f; | ||
| $icon-color-twitter: #4073d4; | ||
| $icon-color-linkedin: #3D7CA4; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emailis missing here but its part of the member interface.There was a problem hiding this comment.
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