Skip to content

Commit 4c4b919

Browse files
committed
Mobile: fix card centering and spacing — Topics CardGrid, padding, zero li margin, stretch splits
1 parent b1ca8e3 commit 4c4b919

6 files changed

Lines changed: 28 additions & 20 deletions

File tree

src/components/about/styles.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ div .join_the_team_text {
166166
@media only screen and (max-width: 996px) {
167167
/*Mobile*/
168168
.value_card {
169-
width: 264px;
170169
padding: var(--ifm-spacing-lg) var(--ifm-spacing-md);
171170
}
172171

src/components/home/WhatWeDo/Topics.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,22 @@ import { TopicsCard } from "./TopicsCard";
33
import JupyterMD from "./topics/Jupyter.md";
44
import SupplyChainMD from "./topics/SupplyChain.md";
55
import ComputingMD from "./topics/Computing.md";
6+
import CardGrid from "../../layout/CardGrid";
67

78
const TopicsDescriptions = [JupyterMD, SupplyChainMD, ComputingMD];
89

910
export function Topics() {
1011
return (
11-
<div>
12-
<ul className="cards-row">
13-
{topicsDetails.map((topics, index) => (
14-
<li key={index}>
15-
<TopicsCard
16-
topics={topics}
17-
TopicsDescriptionMD={TopicsDescriptions[index]}
18-
/>
19-
</li>
20-
))}
21-
</ul>
22-
</div>
12+
<CardGrid cols={3}>
13+
{topicsDetails.map((topics, index) => (
14+
<li key={index}>
15+
<TopicsCard
16+
topics={topics}
17+
TopicsDescriptionMD={TopicsDescriptions[index]}
18+
/>
19+
</li>
20+
))}
21+
</CardGrid>
2322
);
2423
}
2524

src/components/home/WhatWeDo/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import LinkToProjects from "../LinkToProjects";
55

66
export function WhatWeDo() {
77
return (
8-
<div className={"container" + styles.whatwedo_container}>
8+
<div className={"container " + styles.whatwedo_container}>
99
<div className="row flex-full-centered">
1010
<div className={styles.services_link_mobile}>
1111
<LinkToServices label={"DISCOVER OUR SERVICES"} />

src/components/home/WhatWeDo/styles.module.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,12 @@ div .topics_header {
1919
}
2020

2121
.whatwedo_container {
22-
/*background-color: var(--ifm-color-primary-p1);*/
23-
padding: 0;
22+
padding: var(--ifm-spacing-xl) var(--ifm-spacing-lg);
2423
margin-top: 0;
2524
}
2625

2726
.topics_card {
28-
width: 80%;
27+
padding: var(--ifm-spacing-lg) var(--ifm-spacing-md);
2928
text-align: left;
3029
}
3130

@@ -54,7 +53,7 @@ div .topics_header {
5453
}
5554

5655
.topics_card {
57-
width: 350px;
5856
padding: var(--ifm-spacing-2xl) var(--ifm-spacing-lg);
57+
height: 100%;
5958
}
6059
}

src/components/layout/styles.module.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232

3333
@media (max-width: 996px) {
3434
.section {
35-
padding: var(--ifm-spacing-2xl) 0;
35+
padding: var(--ifm-spacing-3xl) 0;
3636
}
3737

3838
.section_page_top {
39-
padding-top: var(--ifm-spacing-xl);
39+
padding-top: var(--ifm-spacing-2xl);
4040
}
4141
}
4242

@@ -76,11 +76,17 @@
7676
@media (max-width: 996px) {
7777
.split {
7878
flex-direction: column;
79+
align-items: stretch;
7980
}
8081

8182
.split_reverse {
8283
flex-direction: column;
8384
}
85+
86+
.split_text,
87+
.split_image {
88+
width: 100%;
89+
}
8490
}
8591

8692
/* ─── CardGrid ─── */
@@ -94,6 +100,10 @@
94100
margin: 0;
95101
}
96102

103+
.card_grid li {
104+
margin-left: 0;
105+
}
106+
97107
.card_grid_2 {
98108
grid-template-columns: repeat(2, 1fr);
99109
}

src/css/custom.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ ul.row {
731731

732732
.cards-row > li {
733733
display: flex;
734+
margin-left: 0;
734735
}
735736

736737
.content-card {

0 commit comments

Comments
 (0)