Skip to content

Commit 54bdce3

Browse files
committed
change CardColumn so image is optional. change card background color
1 parent 6bae6c4 commit 54bdce3

File tree

5 files changed

+3149
-15
lines changed

5 files changed

+3149
-15
lines changed

components/containers/Card.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ export default function Card({
1212
}) {
1313
return (
1414
<div className={styles.card}>
15-
<div className={styles.card__image}>
16-
<Image
17-
src={image}
18-
alt={altTag}
19-
className={styles.img}
20-
layout='fill'
21-
objectFit='cover'
22-
/>
23-
</div>
15+
{image && (
16+
<div className={styles.card__image}>
17+
<Image
18+
src={image}
19+
alt={altTag}
20+
className={styles.img}
21+
layout='fill'
22+
objectFit='cover'
23+
/>
24+
</div>
25+
)}
26+
2427
<h2 className={styles.title}>{title}</h2>
2528
<div className={styles.content}>
2629
<p>

components/containers/CardsColumns.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export default function CardsColumns({
4141
<div className={styles.inner__content}>
4242
<Card
4343
title={title}
44-
image={images[index]}
45-
altTag={altTags[index]}
44+
image={images?images[index]:undefined}
45+
altTag={altTags?altTags[index]:undefined}
4646
content={content[index]}
4747
link={links[index]}
4848
linkText={linkText[index]}

pages/about.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ export default function AboutUs() {
9797
</Container>
9898
<CardsColumns
9999
titles={['1', '2']}
100-
images={['/images/join-us.webp', '/images/volunteer.webp']}
101-
altTags={['Join the project', 'Volunteer to learn together']}
102100
content={[
103101
'To provide a safe space for juniors to learn how to communicate in a simulated professional environment.',
104102
'To offer more detailed tasks (Issues) and help the developer assimilate the logical mindset required in a structured project, under guidance following the industry’s best practices throughout the entire process.',

styles/Card.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
box-shadow: $box-shadow;
99
min-width: 32%;
1010
height: 37rem;
11+
background-color: $primary-accent-color;
1112

1213
@include desktop {
1314
margin: 1.5rem 1.5rem 0 1.5rem;
@@ -22,8 +23,7 @@
2223
font-weight: bold;
2324
font-size: 1.75rem;
2425
color: $primary-content-color;
25-
margin: 0;
26-
margin-top: 1rem;
26+
margin: 1rem 0 0 0;
2727
line-height: unset;
2828

2929
@include tablet {

0 commit comments

Comments
 (0)