Skip to content

Commit 942908c

Browse files
committed
Read team.json and view team in home page
1 parent 06eac97 commit 942908c

10 files changed

+75
-136
lines changed

src/app/components/components.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { RouterModule } from '@angular/router';
88

99
import { BasicelementsComponent } from './basicelements/basicelements.component';
1010
import { NavigationComponent } from './navigation/navigation.component';
11-
import { TypographyComponent } from './typography/typography.component';
11+
import { TeamSectionComponent } from './teamSection/teamSection.component';
1212
import { NucleoiconsComponent } from './nucleoicons/nucleoicons.component';
1313
import { ComponentsComponent } from './components.component';
1414
import { NotificationComponent } from './notification/notification.component';
@@ -28,7 +28,7 @@ import { NgbdModalContent } from './modal/modal.component';
2828
ComponentsComponent,
2929
BasicelementsComponent,
3030
NavigationComponent,
31-
TypographyComponent,
31+
TeamSectionComponent,
3232
NucleoiconsComponent,
3333
NotificationComponent,
3434
NgbdModalComponent,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<div class="section">
2+
<div class="section section-dark">
3+
<div class="container">
4+
<div class="col-md-auto">
5+
<h2 class="title">Team Members</h2>
6+
</div>
7+
</div>
8+
<br>
9+
<div class="container">
10+
<div class="row justify-content-center">
11+
<div *ngFor="let teamMember of teamMembers">
12+
<div class="col-sm-auto">
13+
<div class="hover-profile-card">
14+
<img src="assets/img/faces/{{teamMember.image}}"
15+
class="rounded-circle img-center img-fluid shadow shadow-lg--hover imgHover">
16+
<h5 class="title" style="text-align: center;">
17+
<div class="firstName">{{teamMember.firstName}}</div>
18+
</h5>
19+
</div>
20+
</div>
21+
</div>
22+
</div>
23+
</div>
24+
</div>
25+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.hover-profile-card {
2+
opacity: 1;
3+
display: block;
4+
width: 100%;
5+
height: auto;
6+
transition: .5s ease;
7+
backface-visibility: hidden;
8+
}
9+
10+
.hover-profile-card .imgHover {
11+
width: 150px;
12+
}
13+
14+
.hover-profile-card:hover .imgHover {
15+
opacity: 0.3;
16+
}
17+
18+
.hover-profile-card:hover .imgIcon {
19+
opacity: 1;
20+
}

src/app/components/typography/typography.component.spec.ts renamed to src/app/components/teamSection/teamSection.component.spec.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { TypographyComponent } from './typography.component';
3+
import { TeamSectionComponent } from './teamSection.component';
44

5-
describe('TypographyComponent', () => {
6-
let component: TypographyComponent;
7-
let fixture: ComponentFixture<TypographyComponent>;
5+
describe('TeamSectionComponent', () => {
6+
let component: TeamSectionComponent;
7+
let fixture: ComponentFixture<TeamSectionComponent>;
88

99
beforeEach(async(() => {
1010
TestBed.configureTestingModule({
11-
declarations: [ TypographyComponent ]
11+
declarations: [ TeamSectionComponent ]
1212
})
1313
.compileComponents();
1414
}));
1515

1616
beforeEach(() => {
17-
fixture = TestBed.createComponent(TypographyComponent);
17+
fixture = TestBed.createComponent(TeamSectionComponent);
1818
component = fixture.componentInstance;
1919
fixture.detectChanges();
2020
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import teamMembers from '../../../assets/json/team.json';
3+
4+
@Component({
5+
selector: 'app-typography',
6+
templateUrl: './teamSection.component.html',
7+
styleUrls: ['./teamSection.component.scss']
8+
})
9+
export class TeamSectionComponent implements OnInit {
10+
11+
constructor() { }
12+
13+
ngOnInit() {}
14+
15+
teamMembers: any = teamMembers;
16+
}

src/app/components/typography/typography.component.html

-114
This file was deleted.

src/app/components/typography/typography.component.scss

Whitespace-only changes.

src/app/components/typography/typography.component.ts

-14
This file was deleted.

src/tsconfig.app.json

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
55
"module": "es2015",
6+
"resolveJsonModule": true,
7+
"esModuleInterop": true,
68
"baseUrl": "",
79
"types": []
810
},

src/typings.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ declare var module: NodeModule;
33
interface NodeModule {
44
id: string;
55
}
6+
declare module "*.json" {
7+
const value: any;
8+
export default value;
9+
}

0 commit comments

Comments
 (0)