-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Testimonials section to About page (#266)
Co-authored-by: Klaudia <[email protected]>
- Loading branch information
Showing
8 changed files
with
142 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/frontend/app/templates/About/components/Testimonials/Testimonials.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import Typography from "design-system/components/typography" | ||
import Slider from "design-system/components/slider" | ||
import Container from "design-system/components/container" | ||
import TextBanner from "design-system/patterns/textBanner" | ||
|
||
import TestimonialCard from "design-system/patterns/testimonialCard" | ||
|
||
import * as Styled from "./Testimonials.styled" | ||
import { testimonialItemsType } from "../../../../lib/types" | ||
|
||
const Testimonials = ({ data }) => ( | ||
<Styled.Wrapper> | ||
<Container> | ||
<TextBanner | ||
heading="Co o nas mówią?" | ||
subtitle="Fundacja w opinii rodzin adopcyjnych" | ||
tabletLayout="left" | ||
mobileLayout="left" | ||
> | ||
<Styled.Description> | ||
<Typography variant="bodyTitle"> | ||
Poniżej przeczytasz wybrane opinie napisane przez rodziny adopcyjne, | ||
które szcześliwie odnalazły swoich przyjaciół w Fundacji Sterczące | ||
Uszy. Zadowolonych rodzin jest znacznie więcej i stale ich przybywa. | ||
</Typography> | ||
</Styled.Description> | ||
</TextBanner> | ||
<Styled.Slider> | ||
<Slider pagination navigation slidesPerViewDesktop={2}> | ||
{data.map((item) => ( | ||
<TestimonialCard | ||
key={item.description} | ||
title={item.title} | ||
excerpt={item.description} | ||
author={item.author} | ||
authorDetails={item.authorDescription} | ||
as="h3" | ||
/> | ||
))} | ||
</Slider> | ||
</Styled.Slider> | ||
</Container> | ||
</Styled.Wrapper> | ||
) | ||
|
||
Testimonials.propTypes = { | ||
data: testimonialItemsType.isRequired, | ||
} | ||
|
||
export default Testimonials |
37 changes: 37 additions & 0 deletions
37
packages/frontend/app/templates/About/components/Testimonials/Testimonials.styled.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import styled from "@emotion/styled" | ||
|
||
export const Wrapper = styled.div` | ||
padding: 120px 0; | ||
${({ theme }) => theme.breakpoints.tabletLg} { | ||
padding: 100px 0; | ||
} | ||
${({ theme }) => theme.breakpoints.mobileLg} { | ||
padding: 60px 0; | ||
background: none; | ||
} | ||
` | ||
|
||
export const Slider = styled.div` | ||
margin-top: 40px; | ||
${({ theme }) => theme.breakpoints.tabletLg} { | ||
margin-top: 20px; | ||
width: 100vw; | ||
position: relative; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
} | ||
` | ||
|
||
export const Description = styled.div` | ||
margin: 0 auto; | ||
width: 606px; | ||
${({ theme }) => theme.breakpoints.tabletLg} { | ||
width: 566px; | ||
text-align: left; | ||
} | ||
${({ theme }) => theme.breakpoints.mobileLg} { | ||
width: 100%; | ||
} | ||
` |
3 changes: 3 additions & 0 deletions
3
packages/frontend/app/templates/About/components/Testimonials/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Testimonials from "./Testimonials" | ||
|
||
export default Testimonials |