Skip to content

Commit 1409a5b

Browse files
committed
Merge branch 'add-features' into develop
2 parents b3a47a6 + c418620 commit 1409a5b

File tree

7 files changed

+156
-4
lines changed

7 files changed

+156
-4
lines changed

‎src/App.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ class App extends React.Component{
4343
{cardlist}
4444
</div>
4545
<Projectsdata={this.state.repositories}/>
46-
{/* TODO: Complete the Contributor component */}
47-
{false&&<Contributor/>}
46+
<Contributor/>
4847
<Footer/>
4948
</div>
5049
);

‎src/components/Contributor.jsx‎

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,44 @@
11
importReactfrom"react";
2+
importProfilefrom"./Profile";
3+
importuserDatafrom"./userData";
24

35
constContributor=()=>{
6+
constdefaultImg=
7+
"https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png";
8+
constlistProfile=userData.map((user,id)=>(
9+
<Profile
10+
key={id}
11+
name={user.name}
12+
img={user.img===null ? defaultImg : user.img}
13+
username={user.username}
14+
userlink={user.userlink}
15+
isOrg={user.isOrg}
16+
orgName={user.orgName}
17+
orgLink={user.orgLink}
18+
isLoc={user.isLoc}
19+
Loc={user.Loc}
20+
/>
21+
));
422
return(
523
<divclassName="contributor-div">
6-
<h2>Contributors</h2>
24+
<div>
25+
<h2>Main Contributors</h2>
26+
<divclassName="con-container">{listProfile}</div>
27+
</div>
28+
<div>
29+
<h2>Want to contribute?</h2>
30+
<p>
31+
We know groups can accomplish more than individuals. That’s why our
32+
mission is to be the catalyst in communities of contributors, and
33+
partners creating better technology the open source way.
34+
<br/>
35+
<br/>
36+
<aclassName="blue-link"href="https://github.com/programming-zone">
37+
Let's Contribute{" "}
38+
</a>
39+
<iclassName=" blue-link fa fa-arrow-right "></i>
40+
</p>
41+
</div>
742
</div>
843
);
944
};

‎src/components/Profile.jsx‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
importReactfrom"react";
2+
3+
functionProfile(props){
4+
return(
5+
<divclassName="profile-card">
6+
<divclassName="profile-container">
7+
<divclassName="pp">
8+
<imgheight="50px"width="50px"src={props.img}alt="profile"/>
9+
</div>
10+
<divclassName="pp-about">
11+
<span>
12+
<b>{props.name}</b>
13+
</span>
14+
<span></span>
15+
<span>
16+
<small>
17+
<ahref={props.userlink}>{props.username}</a>
18+
</small>
19+
</span>
20+
<br/>
21+
<br/>
22+
<divclassName="pp-footer">
23+
{props.isOrg&&(
24+
<div>
25+
<iclassName="fa fa-building-o"></i>{" "}
26+
<ahref={props.orgLink}>{props.orgName}</a>
27+
</div>
28+
)}
29+
{true&&(
30+
<div>
31+
<iclassName="fa fa-map-marker"></i>{" "}
32+
<ahref="https://github.com">{props.Loc}</a>
33+
</div>
34+
)}
35+
<div></div>
36+
</div>
37+
</div>
38+
</div>
39+
</div>
40+
);
41+
}
42+
43+
exportdefaultProfile;

‎src/components/userData.js‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
constuserData=[
2+
{
3+
id: 1,
4+
name: "Injamul Mohammad Mollah",
5+
img:
6+
"https://avatars1.githubusercontent.com/u/43756219?s=460&u=c133586bd27db098039b668856fb7c3f1cbbea04&v=4",
7+
username: "mrinjamul",
8+
userlink: "https://github.com/mrinjamul",
9+
isOrg: false,
10+
orgName: "Github",
11+
orgLink: "https://github.com",
12+
isLoc: true,
13+
Loc: "Berhampore, IN",
14+
},
15+
{
16+
id: 2,
17+
name: "Injamul",
18+
img: null,
19+
username: "linuxuserin",
20+
userlink: "https://github.com/linuxuserin",
21+
isOrg: true,
22+
orgName: "Programming Zone",
23+
orgLink: "https://programming-zone.github.io/",
24+
isLoc: true,
25+
Loc: "Earth",
26+
},
27+
];
28+
29+
exportdefaultuserData;

‎src/styles/_contributor.scss‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
// TODO: Need to complete
21
.contributor-div{
2+
padding-top: 0.5em;
3+
padding-bottom: 0.5em;
4+
padding-left: 4em;
5+
padding-right: 4em;
36
background-color: white;
47
}
8+
@mediascreenand (max-width: 480px){
9+
.contributor-div{
10+
padding-left: 6px;
11+
padding-right: 6px;
12+
}
13+
}
14+
15+
.con-container{
16+
display: grid;
17+
grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
18+
row-gap: 10px;
19+
column-gap: 3em;
20+
}
21+
22+
.blue-link{
23+
color: blue;
24+
}

‎src/styles/_profile.scss‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.profile-card{
2+
padding: 10px;
3+
border-top: 1pxsolid#d3d3d3;
4+
border-bottom: 1pxsolid#d3d3d3;
5+
width: 360px;
6+
height: 60px;
7+
text-align: justify;
8+
}
9+
10+
.profile-container{
11+
display: grid;
12+
grid-template-columns: 1fr5fr;
13+
.pp{
14+
img{
15+
border-radius: 50%;
16+
}
17+
}
18+
.pp-about{
19+
padding-left: 5px;
20+
}
21+
.pp-footer{
22+
justify-content: space-around;
23+
display: flex;
24+
}
25+
}

‎src/styles/main.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@import"./card";
55
@import"./projects";
66
@import"./contributor";
7+
@import"./profile";
78
@import"./footer";
89

910
$bg-color: #f0f0f0;

0 commit comments

Comments
(0)