Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 146d618

Browse files
author
Adrian Podkalicki
committed
feat(website): Create Partners section.
1 parent 6bb6109 commit 146d618

File tree

6 files changed

+110
-2
lines changed

6 files changed

+110
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { ComponentType } from 'react';
2+
3+
import { CodeCademy } from '@coderscamp/ui/svg/learning-sources';
4+
import { HTMLChakraProps } from '@coderscamp/ui/types';
5+
6+
export type PartnersImgType = {
7+
id: string;
8+
image: ComponentType<HTMLChakraProps<'svg'>>;
9+
url: string;
10+
};
11+
12+
export type PartnerType = {
13+
title: string;
14+
listOfPartnersImg: PartnersImgType[];
15+
};
16+
17+
export const listOfPartners: PartnerType[] = [
18+
{
19+
title: 'Partnerzy kursu',
20+
listOfPartnersImg: [
21+
{ id: '1', image: CodeCademy, url: 'https://codecademy.com/' },
22+
{ id: '2', image: CodeCademy, url: 'https://codecademy.com/' },
23+
{ id: '3', image: CodeCademy, url: 'https://codecademy.com/' },
24+
{ id: '4', image: CodeCademy, url: 'https://codecademy.com/' },
25+
{ id: '5', image: CodeCademy, url: 'https://codecademy.com/' },
26+
],
27+
},
28+
{
29+
title: 'Patronat honorowy',
30+
listOfPartnersImg: [
31+
{ id: '1', image: CodeCademy, url: 'https://codecademy.com/' },
32+
{ id: '2', image: CodeCademy, url: 'https://codecademy.com/' },
33+
{ id: '3', image: CodeCademy, url: 'https://codecademy.com/' },
34+
{ id: '4', image: CodeCademy, url: 'https://codecademy.com/' },
35+
{ id: '5', image: CodeCademy, url: 'https://codecademy.com/' },
36+
],
37+
},
38+
{
39+
title: 'Patronat medialny',
40+
listOfPartnersImg: [
41+
{ id: '1', image: CodeCademy, url: 'https://codecademy.com/' },
42+
{ id: '2', image: CodeCademy, url: 'https://codecademy.com/' },
43+
{ id: '3', image: CodeCademy, url: 'https://codecademy.com/' },
44+
{ id: '4', image: CodeCademy, url: 'https://codecademy.com/' },
45+
{ id: '5', image: CodeCademy, url: 'https://codecademy.com/' },
46+
{ id: '6', image: CodeCademy, url: 'https://codecademy.com/' },
47+
{ id: '7', image: CodeCademy, url: 'https://codecademy.com/' },
48+
{ id: '8', image: CodeCademy, url: 'https://codecademy.com/' },
49+
],
50+
},
51+
];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { VStack } from '@coderscamp/ui/components/Stack';
2+
import { Typography } from '@coderscamp/ui/components/Typography';
3+
4+
import { listOfPartners, PartnerType } from '@/components/Partners/Partners.data';
5+
import { PartnersList } from '@/components/Partners/PartnersList';
6+
import { Section } from '@/components/Section';
7+
8+
export const Partners = () => {
9+
return (
10+
<Section spacing="64px">
11+
<Typography size="4xl" weight="extrabold">
12+
Zaufali nam
13+
</Typography>
14+
<VStack flexDir="column" w="100%" spacing="40px">
15+
{listOfPartners?.map(({ title, listOfPartnersImg }: PartnerType) => (
16+
<PartnersList key={title} title={title} listOfPartnersImg={listOfPartnersImg} />
17+
))}
18+
</VStack>
19+
</Section>
20+
);
21+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from 'react';
2+
3+
import { Center } from '@coderscamp/ui/components/Center';
4+
import { Flex } from '@coderscamp/ui/components/Flex';
5+
import { Typography } from '@coderscamp/ui/components/Typography';
6+
7+
import { PartnersImgType, PartnerType } from '@/components/Partners/Partners.data';
8+
9+
import { ExternalLink } from '../ExternalLink';
10+
11+
export const PartnersList = ({ title = '', listOfPartnersImg = [] }: PartnerType) => {
12+
return (
13+
<>
14+
<Center w="100%" bgColor="gray.100" py="8px">
15+
<Typography color="gray.900" weight="bold" size="md">
16+
{title?.toUpperCase()}
17+
</Typography>
18+
</Center>
19+
<Flex flexWrap="wrap" justifyContent="space-between">
20+
{listOfPartnersImg?.map(({ id, image, url }: PartnersImgType) => {
21+
const Image = image;
22+
23+
return (
24+
<Center key={id} maxW="320px" maxH="80px" margin={{ base: '0 auto 40px auto', md: '0 auto 80px auto' }}>
25+
<ExternalLink href={url} aria-label={`Przejdź na stronę ${id}`}>
26+
<Image width="100%" />
27+
</ExternalLink>
28+
</Center>
29+
);
30+
})}
31+
</Flex>
32+
</>
33+
);
34+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Partners } from './Partners';

packages/website/src/components/Schedule/useSchedule.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ export const useCandidateSchedule = (): ScheduleListItem[] => {
4444
{
4545
index: 4,
4646
date: MAIN_TEST_FULL_DATE,
47-
description:
48-
`Rozwiąż test i zadania praktyczne z pierwszego modułu. Aby dostać się na kurs musisz znaleźć się wśród ${PLACES_COUNT} osób z najlepszymi wynikami.`,
47+
description: `Rozwiąż test i zadania praktyczne z pierwszego modułu. Aby dostać się na kurs musisz znaleźć się wśród ${PLACES_COUNT} osób z najlepszymi wynikami.`,
4948
},
5049
{
5150
index: 5,

packages/website/src/pages/index.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { BigNumbers } from '@/components/BigNumbers/BigNumbers';
66
import { Curriculum } from '@/components/Curriculum';
77
import { Hero } from '@/components/Hero';
88
import { LearningSources } from '@/components/LearningSources';
9+
import { Partners } from '@/components/Partners';
910
import { Projects } from '@/components/Projects';
1011
import { CandidateSchedule } from '@/components/Schedule';
1112
import { AboutTestimonials } from '@/components/Testimonials';
@@ -24,6 +25,7 @@ const Home = ({ testimonials }: InferGetStaticPropsType<typeof getTestimonialsSt
2425
<AboutBenefits />
2526
<AboutTestimonials testimonials={testimonials} />
2627
<CandidateSchedule />
28+
<Partners />
2729
</>
2830
);
2931
};

0 commit comments

Comments
 (0)