Skip to content

Commit 58776f5

Browse files
authored
Merge pull request #124 from Web-Dev-Path/feature/our-goals-purpose
Adding Our Goals & Purpose section to About Us
2 parents 422f1c4 + b29a9e6 commit 58776f5

File tree

13 files changed

+3284
-26
lines changed

13 files changed

+3284
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5757
- footer styling update + social media icons
5858
- improved LightHouse scores by optmizing images, creating a robots.txt file and adding proper alt tags
5959
- updated 'about us' first section (our background, peer reviews, version control)
60+
- updated 'about us' section (our goals, our purpose)

components/containers/Card.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,30 @@ export default function Card({
99
content,
1010
link,
1111
linkText,
12+
customClass,
1213
}) {
1314
return (
14-
<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+
<div
16+
className={
17+
customClass ? `${styles.card} ${styles[customClass]}` : styles.card
18+
}
19+
>
20+
{image && (
21+
<div className={styles.card__image}>
22+
<Image
23+
src={image}
24+
alt={altTag}
25+
className={styles.img}
26+
layout='fill'
27+
objectFit='cover'
28+
/>
29+
</div>
30+
)}
31+
2432
<h2 className={styles.title}>{title}</h2>
2533
<div className={styles.content}>
2634
<p>
27-
{content} <Link href={link}>{linkText}</Link>
35+
{content} {link && <Link href={link}>{linkText}</Link>}
2836
</p>
2937
</div>
3038
</div>

components/containers/CardsColumns.js

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default function CardsColumns({
1414
content,
1515
links,
1616
linkText,
17+
customClass,
1718
}) {
1819
return (
1920
<Container>
@@ -31,23 +32,33 @@ export default function CardsColumns({
3132
spaceBetween: 20,
3233
},
3334
1334: {
34-
slidesPerView: 3,
35-
spaceBetween: 20,
35+
slidesPerView: titles.length,
36+
spaceBetween: titles.length < 3 ? 75 : 20,
3637
},
3738
}}
3839
>
3940
{titles.map((title, index) => (
4041
<SwiperSlide key={index} className={styles.swiperSlide}>
4142
<div className={styles.inner__content}>
42-
<Card
43-
title={title}
44-
image={images[index]}
45-
altTag={altTags[index]}
46-
content={content[index]}
47-
link={links[index]}
48-
linkText={linkText[index]}
49-
key={index}
50-
/>
43+
{images && links && linkText ? (
44+
<Card
45+
key={index}
46+
title={title}
47+
image={images[index]}
48+
altTag={altTags[index]}
49+
content={content[index]}
50+
link={links[index]}
51+
linkText={linkText[index]}
52+
customClass={customClass}
53+
/>
54+
) : (
55+
<Card
56+
key={index}
57+
title={title}
58+
content={content[index]}
59+
customClass={customClass}
60+
/>
61+
)}
5162
</div>
5263
</SwiperSlide>
5364
))}

components/snippets/Title.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Title = ({ title }) => {
2+
return <h2>{title}</h2>;
3+
};
4+
5+
export default Title;

pages/about.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import RevealContentContainer from '@/components/containers/RevealContentContainer';
22
import TwoColumn from '@/components/containers/TwoColumn';
33
import { white, primary, primaryAccent } from '@/styles/TwoColumn.module.scss';
4+
import CardsColumns from '@/components/containers/CardsColumns';
5+
import Title from '@/components/snippets/Title';
6+
import Container from '@/components/containers/Container';
47

58
export default function AboutUs() {
69
return (
@@ -88,6 +91,42 @@ export default function AboutUs() {
8891
customInnerClass='about-content'
8992
/>
9093
</RevealContentContainer>
94+
<RevealContentContainer>
95+
<Container>
96+
<Title title='Our goals' />
97+
</Container>
98+
<CardsColumns
99+
titles={['1', '2']}
100+
content={[
101+
'To provide a safe space for juniors to learn how to communicate in a simulated professional environment.',
102+
'To offer more detailed tasks (GitHub 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.',
103+
]}
104+
customClass='our-goals'
105+
/>
106+
</RevealContentContainer>
107+
<RevealContentContainer>
108+
<TwoColumn
109+
title='Our purpose'
110+
content={
111+
<div>
112+
To do so, we're coding this platform in Next.js. In the short
113+
term, we intend to have a blog where the participants can post
114+
anything related to the web development world.
115+
<br />
116+
<br />
117+
The ultimate purpose though is to make this platform a portal
118+
where Non-Profit Organizations can find support for their web
119+
products. That way, new graduates can gain some experience while
120+
helping a good cause.
121+
</div>
122+
}
123+
rowOrder='row-reverse'
124+
image='/images/svg/semi-colon.svg'
125+
color={primary}
126+
bgColor={white}
127+
customInnerClass='our-purpose'
128+
/>
129+
</RevealContentContainer>
91130
</div>
92131
);
93132
}

public/images/svg/semi-colon.svg

Lines changed: 3 additions & 0 deletions
Loading

styles/Card.module.scss

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,27 @@
22
@use './mixins' as *;
33

44
.card {
5-
margin: 1rem 1rem 0 .5rem;
5+
margin: 1rem 1rem 0 0.5rem;
66
padding: 1.5rem;
77
border-radius: 1.5rem;
88
box-shadow: $box-shadow;
99
min-width: 32%;
1010
height: 37rem;
1111

12+
@include small-mobile {
13+
height: 42rem;
14+
}
15+
16+
@include tablet {
17+
height: 42rem;
18+
}
19+
1220
@include desktop {
21+
height: 37rem;
1322
margin: 1.5rem 1.5rem 0 1.5rem;
1423
&:first-child,
1524
&:last-child {
16-
margin: 1.5rem .5rem 0 .5rem;
25+
margin: 1.5rem 0.5rem 0 0.5rem;
1726
}
1827
}
1928

@@ -22,8 +31,7 @@
2231
font-weight: bold;
2332
font-size: 1.75rem;
2433
color: $primary-content-color;
25-
margin: 0;
26-
margin-top: 1rem;
34+
margin: 1rem 0 0 0;
2735
line-height: unset;
2836

2937
@include tablet {
@@ -55,4 +63,29 @@
5563
border-radius: 0.25rem;
5664
}
5765
}
66+
67+
//About Us
68+
&.our-goals {
69+
background-color: $primary-accent-color;
70+
max-height: 35rem;
71+
72+
.title {
73+
font-size: 3.5rem;
74+
text-align: center;
75+
}
76+
77+
@include desktop {
78+
max-height: 37rem;
79+
.title {
80+
font-size: 5rem;
81+
}
82+
83+
.content {
84+
p {
85+
font-size: 1.8rem;
86+
line-height: 2.2rem;
87+
}
88+
}
89+
}
90+
}
5891
}

styles/CardsColumns.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
.swiper {
1515
margin-bottom: 5rem;
16+
padding: 0 1rem;
1617

1718
:global(.swiper-pagination-bullet-active) {
1819
background-color: $dark-bg-color;
@@ -21,3 +22,5 @@
2122
}
2223

2324

25+
26+

styles/Container.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
width: 90%;
66
max-width: $large-desktop-breakpoint;
77
}
8+

styles/TwoColumn.module.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,20 @@
9999
}
100100
}
101101

102+
&.our-purpose {
103+
.inner__image {
104+
height: 10rem;
105+
106+
@include desktop {
107+
height: 22rem;
108+
}
109+
110+
.img {
111+
object-fit: contain;
112+
}
113+
}
114+
}
115+
102116
@include desktop {
103117
display: flex;
104118
align-items: center;

0 commit comments

Comments
 (0)