Skip to content

Commit e9d4f8e

Browse files
authored
Project Card Size (#198)
1 parent 57bd6c9 commit e9d4f8e

5 files changed

Lines changed: 34 additions & 21 deletions

File tree

src/components/githubRepoCard/GithubRepoCard.css

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.repo-card-div {
22
color: rgb(88, 96, 105);
3-
background-color: rgb(255, 255, 255);
43
box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 30px -15px;
54
padding: 2rem;
65
cursor: pointer;
6+
flex: 1 1 25%;
77
}
88
.repo-card-div:hover {
99
box-shadow: rgba(0, 0, 0, 0.2) 0px 20px 30px -10px;
@@ -49,8 +49,7 @@
4949
}
5050

5151
.repo-name {
52-
white-space: nowrap;
53-
text-overflow: ellipsis;
52+
text-align: left;
5453
color: rgb(36, 41, 46);
5554
font-family: "Google Sans Regular";
5655
margin-bottom: 0.75rem;
@@ -94,7 +93,17 @@
9493
margin-right: 0px;
9594
}
9695

96+
@media (max-width: 1200px) {
97+
.repo-card-div {
98+
flex: 1 1 40%;
99+
}
100+
}
101+
97102
@media (max-width: 768px) {
103+
.repo-card-div {
104+
flex: 1 1 100%;
105+
}
106+
98107
.repo-name {
99108
font-size: 16px;
100109
}

src/components/githubRepoCard/GithubRepoCard.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@ export default function GithubRepoCard({ repo, theme }) {
1010
}
1111

1212
return (
13-
<div>
13+
<div className="repo-card-div" style={{ backgroundColor: theme.highlight }}>
1414
<Fade bottom duration={2000} distance="40px">
15-
<div
16-
className="repo-card-div"
17-
key={repo.id}
18-
onClick={() => openRepoinNewTab(repo.url)}
19-
style={{ backgroundColor: theme.highlight }}
20-
>
15+
<div key={repo.id} onClick={() => openRepoinNewTab(repo.url)}>
2116
<div className="repo-name-div">
2217
<svg
2318
aria-hidden="true"

src/components/publicationsCard/PublicationCard.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
box-shadow: rgba(0, 0, 0, 0.2) 0px 10px 30px -15px;
55
padding: 2rem;
66
cursor: pointer;
7+
flex: 1 1 25%;
78
}
89
.publication-card-div:hover {
910
box-shadow: rgba(0, 0, 0, 0.2) 0px 20px 30px -10px;
@@ -15,8 +16,7 @@
1516
}
1617

1718
.publication-name {
18-
white-space: nowrap;
19-
text-overflow: ellipsis;
19+
text-align: left;
2020
color: rgb(36, 41, 46);
2121
font-family: "Google Sans Regular";
2222
margin-bottom: 0.75rem;
@@ -51,7 +51,17 @@
5151
margin-right: auto;
5252
}
5353

54+
@media (max-width: 1200px) {
55+
.publication-card-div {
56+
flex: 1 1 40%;
57+
}
58+
}
59+
5460
@media (max-width: 768px) {
61+
.publication-card-div {
62+
flex: 1 1 100%;
63+
}
64+
5565
.publication-name {
5666
font-size: 16px;
5767
}

src/components/publicationsCard/PublicationCard.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ export default function GithubRepoCard({ repo, theme }) {
99
}
1010

1111
return (
12-
<div>
12+
<div
13+
className="publication-card-div"
14+
style={{ backgroundColor: theme.highlight }}
15+
>
1316
<Fade bottom duration={2000} distance="40px">
14-
<div
15-
className="publication-card-div"
16-
key={repo.id}
17-
onClick={() => openRepoinNewTab(repo.url)}
18-
style={{ backgroundColor: theme.highlight }}
19-
>
17+
<div key={repo.id} onClick={() => openRepoinNewTab(repo.url)}>
2018
<div className="publication-name-div">
2119
<p className="publication-name" style={{ color: theme.text }}>
2220
{repo.name}

src/pages/projects/Projects.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@
6565
font-weight: 600;
6666
}
6767
.repo-cards-div-main {
68-
display: grid;
69-
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
68+
display: flex;
69+
flex-direction: row;
70+
flex-wrap: wrap;
7071
gap: 1rem 1rem;
7172
margin-left: 40px;
7273
margin-right: 40px;

0 commit comments

Comments
 (0)