Skip to content

Commit a1fbf0e

Browse files
author
ankitrewar11
committed
fix: expand learning path cards to utilize full desktop width
Signed-off-by: ankitrewar11 <ankitrewar11@gmail.com>
1 parent 917df72 commit a1fbf0e

1 file changed

Lines changed: 41 additions & 11 deletions

File tree

‎src/sections/Learn/LearnPage-Sections/learning-path.js‎

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,45 @@ const LearningPathsWrapper = styled.div`
1818
.learn-subtitle {
1919
text-align: center;
2020
}
21-
.learning-path-cards{
21+
.custom-container {
22+
max-width: 1440px;
23+
width: 100%;
24+
margin: 0 auto;
25+
padding: 0 2rem;
26+
}
27+
28+
.learning-path-cards {
29+
display: grid;
30+
grid-template-columns: repeat(3, minmax(0, 1fr));
31+
gap: 2rem;
2232
margin: auto;
23-
justify-content: center;
24-
padding: 6rem 0;
33+
padding: 4rem 0;
2534
26-
@media(max-width:500px){
27-
padding: 6rem 2rem;
35+
@media (max-width: 992px) {
36+
grid-template-columns: repeat(2, minmax(0, 1fr));
37+
}
38+
@media (max-width: 768px) {
39+
grid-template-columns: repeat(1, minmax(0, 1fr));
2840
}
2941
}
42+
43+
.card-item-wrapper {
44+
display: flex;
45+
width: 100%;
46+
height: 100%;
47+
48+
> div {
49+
max-width: none;
50+
width: 100%;
51+
margin: 0;
52+
height: 100%;
53+
}
54+
55+
.card-parent {
56+
height: 100%;
57+
}
58+
}
59+
3060
.see-more-button {
3161
text-align: center;
3262
}
@@ -82,22 +112,22 @@ const LearningPaths = () => {
82112

83113
return (
84114
<LearningPathsWrapper>
85-
<Container>
115+
<div className="custom-container">
86116
<h1 className="learn-path-heading">Learning Paths</h1>
87117
<div className="learn-subtitle">
88118
<h3>Learn DevOps and platform engineering</h3>
89119
</div>
90-
<Row className="learning-path-cards">
120+
<div className="learning-path-cards">
91121
{data.learnPaths.nodes.map((tutorial) => (
92-
<Col $sm={6} $md={4} $lg={4} $xl={4} key={tutorial.id}>
122+
<div key={tutorial.id} className="card-item-wrapper">
93123
<CardComponent tutorial={tutorial} path={`/learn/learning-paths/${tutorial.fields.learnpath}`} courseCount={getCoursesOfaLearningPath(tutorial.fields.learnpath).length} />
94-
</Col>
124+
</div>
95125
))}
96-
</Row>
126+
</div>
97127
<div className="see-more-button">
98128
<Button $primary title="Checkout all learning paths" $url="/learn/learning-paths" />
99129
</div>
100-
</Container>
130+
</div>
101131
</LearningPathsWrapper>
102132
);
103133
};

0 commit comments

Comments
 (0)