Skip to content

Commit 074c2cf

Browse files
committed
According to Figma Designs
1 parent 980bdbc commit 074c2cf

File tree

5 files changed

+101
-34
lines changed

5 files changed

+101
-34
lines changed

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"react": "^16.13.1",
1212
"react-bootstrap": "^1.0.1",
1313
"react-dom": "^16.13.1",
14+
"react-icons": "^3.10.0",
1415
"react-router-dom": "^5.2.0",
1516
"react-scripts": "3.4.1"
1617
},

src/components/projects/projects.js

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,55 @@
11
import React, { Component } from "react";
2-
import { Card } from "react-bootstrap";
2+
import { Card, Badge } from "react-bootstrap";
33
import "./projects.scss";
44
import projectInfo from "../../jsonData/projects";
5+
import { IconContext } from "react-icons";
6+
import { FiPlus } from "react-icons/fi";
57

68
class Projects extends Component {
79
render() {
810
return (
911
<div className="projectCards">
1012
{projectInfo.projects.map((i) => {
1113
return (
12-
<Card className="projectCard" bg="light" style={{ width: "23rem" }}>
14+
<Card className="projectCard" bg="light" style={{ width: "21rem" }}>
1315
<Card.Header color="#366FF0" className="projectcardheader">
1416
{i.projectName}
1517
</Card.Header>
1618
<div className="cardcontent">
1719
{i.topics.map((j) => {
1820
return (
1921
<Card className="topicscard">
20-
<Card.Body>
21-
<Card.Title className="topicsheading">
22-
{j.topicName}
23-
</Card.Title>
24-
<Card.Text className="topicdescription">
25-
{j.topicDescription}
26-
</Card.Text>
27-
</Card.Body>
22+
<Card.Title className="topicsheading">
23+
{j.topicName}
24+
</Card.Title>
25+
<Card.Text className="topicdescription">
26+
{j.topicDescription}
27+
</Card.Text>
28+
<div>
29+
{j.topicTags ? (
30+
j.topicTags.map((k) => {
31+
return (
32+
<Badge variant="primary" className="tags">
33+
{k}
34+
</Badge>
35+
);
36+
})
37+
) : (
38+
<Badge variant="primary"></Badge>
39+
)}
40+
</div>
2841
</Card>
2942
);
3043
})}
3144
</div>
45+
<div className="addnewcard">
46+
<IconContext.Provider
47+
value={{ style: { verticalAlign: 'middle' }, className: "reacticon" }}
48+
>
49+
<FiPlus />
50+
</IconContext.Provider>{" "}
51+
Add another discussion
52+
</div>
3253
</Card>
3354
);
3455
})}
Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,51 @@
1+
12
.projectCards {
2-
vertical-align: middle;
3-
white-space: nowrap;
3+
vertical-align: middle;
4+
white-space: nowrap;
5+
overflow-x: auto;
6+
.projectCard {
7+
white-space: normal;
48
overflow-x: auto;
5-
.projectCard {
6-
white-space: normal;
7-
overflow-x: auto;
8-
display:inline-block;
9-
margin-left: 20px;
10-
margin-bottom: 20px;
11-
margin-right: 10px;
12-
width: 21 rem;
13-
background-color: #f3f3f3;
14-
.cardcontent {
15-
height: 60vh;
16-
overflow-y: auto;
9+
display: inline-block;
10+
margin-left: 20px;
11+
margin-bottom: 20px;
12+
margin-right: 10px;
13+
background-color: #f3f3f3;
14+
.addnewcard {
15+
.reacticon {
16+
vertical-align: middle;
1717
}
18-
.projectcardheader {
19-
color: #ffffff;
20-
font-size: 20px;
21-
font-weight: bold;
22-
background-color: #366ff0;
18+
vertical-align: middle;
19+
margin: 1rem 0 1rem 1.6rem;
20+
font-family: Inter;
21+
font-style: normal;
22+
font-weight: 500;
23+
font-size: 1.1em;
24+
color: #808080;
25+
}
26+
.cardcontent {
27+
height: 49vh;
28+
overflow-y: auto;
29+
.topicscard {
30+
margin-bottom: 10px;
31+
padding: 12px 12px 0 12px;
32+
.tags {
33+
width: fit-content;
34+
display: inline-block;
35+
font-family: "Inter", sans-serif;
36+
padding: 0.4em 0.6em;
37+
margin: 0 10px 10px 0;
38+
font-weight: 600;
39+
font-size: 0.8em;
40+
background-color: #f04b58;
41+
}
2342
}
2443
}
25-
}
44+
.projectcardheader {
45+
color: #ffffff;
46+
font-size: 20px;
47+
font-weight: bold;
48+
background-color: #366ff0;
49+
}
50+
}
51+
}

src/jsonData/projects.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ const projectsInfo = {
44
projectName: "Project 1",
55
topics:[{
66
topicName: "Adding a feature: GSoC",
7-
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content."
7+
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content.",
8+
topicTags:['ReactJs','NodeJS']
89
},
910
{
1011
topicName: "Adding a feature: GSoC",
11-
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content."
12+
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content.",
13+
topicTags:['ReactJs','NodeJS']
1214
},
1315
{
1416
topicName: "Adding a feature: GSoC",
15-
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content."
17+
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content.",
18+
topicTags:['ReactJs','NodeJS']
1619
},
1720
{
1821
topicName: "Adding a feature: GSoC",
19-
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content."
22+
topicDescription: "Some quick example text to build on the card title and make up the bulk of the card's content.",
23+
topicTags:['ReactJs','NodeJS']
2024
}],
2125
},
2226
{

0 commit comments

Comments
 (0)