Thanks to visit codestin.com
Credit goes to github.com

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

Nikolai.berestevich/feat/add 4th section #2355

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/elements/query-image.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react'
import styled from 'styled-components'
import { GatsbyImage, getImage } from 'gatsby-plugin-image'
import { ImageDataLike, GatsbyImage, getImage } from 'gatsby-plugin-image'

type QueryImageProps = {
alt: string
className?: string
data: Record<string, unknown>
data: ImageDataLike
height?: string
width?: string
loading?: 'eager' | 'lazy'
Expand All @@ -32,7 +32,7 @@ const QueryImage = ({
loading,
width,
...props
}: QueryImageProps): React.ReactNode => {
}: QueryImageProps) => {
const image = getImage(data)
if (data) {
return (
Expand Down
Binary file added src/images/common/about-us/derek.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/gary.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/jennice.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/jeya.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/joanna.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/jy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/louise.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/person.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/rakshit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/raunak.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/seema.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/shyamala.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/tom.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/common/about-us/waqas.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions src/pages/about-us/_MakeTrading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const FirstSectionContainer = styled(SectionContainer)`
display: flex;
flex-direction: column;
align-items: center;
padding: 120px 16px 80px;
padding: 120px 16px 24px;
@media ${device.tablet} {
padding: 40px 16px;
}
Expand All @@ -25,9 +25,12 @@ const StyledHeader = styled(Header)`

const StyledFirstSectionText = styled(Header)`
max-width: 792px;
padding: 0 0 24px 0;
padding: 0 0 40px 0;
line-height: 36px;
font-weight: 400;
@media ${device.laptop} {
padding: 0 0 24px 0;
}
`

const MakeTrading = () => {
Expand Down
158 changes: 158 additions & 0 deletions src/pages/about-us/_OurLeadership.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
import React from 'react'
import styled from 'styled-components'
import { graphql, useStaticQuery } from 'gatsby'
import { localize } from 'components/localization'
import { SectionContainer, CssGrid } from 'components/containers'
import { Header, QueryImage, ImageWrapper } from 'components/elements'
import device from 'themes/device'
import { ImageDataLike } from 'gatsby-plugin-image'

const query = graphql`
query {
jy: file(relativePath: { eq: "about-us/jy.jpg" }) {
...fadeIn
}
derek: file(relativePath: { eq: "about-us/derek.jpg" }) {
...fadeIn
}
gary: file(relativePath: { eq: "about-us/gary.jpg" }) {
...fadeIn
}
jennice: file(relativePath: { eq: "about-us/jennice.jpg" }) {
...fadeIn
}
jeya: file(relativePath: { eq: "about-us/jeya.jpg" }) {
...fadeIn
}
joanna: file(relativePath: { eq: "about-us/joanna.jpg" }) {
...fadeIn
}

louise: file(relativePath: { eq: "about-us/louise.jpg" }) {
...fadeIn
}
person: file(relativePath: { eq: "about-us/person.jpg" }) {
...fadeIn
}
rakshit: file(relativePath: { eq: "about-us/rakshit.jpg" }) {
...fadeIn
}
raunak: file(relativePath: { eq: "about-us/raunak.jpg" }) {
...fadeIn
}
seema: file(relativePath: { eq: "about-us/seema.jpg" }) {
...fadeIn
}
shyamala: file(relativePath: { eq: "about-us/shyamala.jpg" }) {
...fadeIn
}
tom: file(relativePath: { eq: "about-us/tom.jpg" }) {
...fadeIn
}
waqas: file(relativePath: { eq: "about-us/waqas.jpg" }) {
...fadeIn
}
}
`

const StyledSectionContainer = styled(SectionContainer)`
display: flex;
flex-direction: column;
align-items: center;
margin: 0:
@media ${device.tablet} {
padding: 0 16px 40px;
}

`

const StyledCssGrid = styled(CssGrid)`
margin: 0 40px;
max-width: 996px;
@media (max-width: 1050px) {
max-width: 100%;
}
@media ${device.laptop} {
margin: 0;
}
`

const StyledHeader = styled(Header)`
@media ${device.laptop} {
font-size: 28px;
}
`

const StyledImageWrapper = styled(ImageWrapper)`
@media ${device.tablet} {
width: 104px;
height: 104px;
}
@media ${device.mobileL} {
width: 88px;
height: 88px;
}
`
const StyledQueryImage = styled(QueryImage)`
@media ${device.tablet} {
width: 104px;
height: 104px;
}
@media ${device.mobileL} {
width: 88px;
height: 88px;
}
`

const OurLeadership = () => {
const leaders_data = useStaticQuery(query)
const leaders = [
leaders_data.jy,
leaders_data.rakshit,
leaders_data.tom,
leaders_data.joanna,
leaders_data.louise,
leaders_data.shyamala,
leaders_data.derek,
leaders_data.seema,
leaders_data.waqas,
leaders_data.raunak,
leaders_data.person,
leaders_data.jeya,
leaders_data.gary,
leaders_data.jennice,
]
return (
<StyledSectionContainer padding="0 16px 120px" background="var(--color-white)">
<StyledHeader as="h2" size="48px" align="center" type="page-title">
{localize('Our leadership')}
</StyledHeader>
<StyledCssGrid
columns="repeat(auto-fill, 120px)"
column_gap="99px"
row_gap="80px"
laptop_columns="repeat(auto-fill, 120px)"
tablet_columns="repeat(auto-fill, 120px)"
tablet_column_gap="70px"
tablet_row_gap="80px"
mobile_columns="repeat(auto-fill, 88px)"
mobile_column_gap="24px"
mobile_row_gap="24px"
>
{leaders.map((im: ImageDataLike, index: number) => (
<StyledImageWrapper key={index} width="120px" height="120px">
<StyledQueryImage
width="100%"
height="100%"
data={im}
alt="leader"
loading="lazy"
/>
</StyledImageWrapper>
))}
</StyledCssGrid>
</StyledSectionContainer>
)
}

export default OurLeadership
2 changes: 1 addition & 1 deletion src/pages/about-us/_OurPrinciples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const StyledSection = styled(SectionContainer)`
flex-direction: column;
justify-content: center;
align-items: center;
padding: 80px 16px 120px;
padding: 24px 16px 120px;
background-color: var(--color-white);

@media ${device.tablet} {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about-us/_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Hands from 'images/svg/about-us/hands.svg'

export const first_section_texts: string[] = [
localize(
'Deriv is one of the world’s largest online brokers. We offer CFDs and other derivatives on forex, indices, cryptocurrencies, commodities and synthetics to millions of registered users across the globe.',
'Deriv is one of the world’s largest online brokers. We offer CFDs and other derivatives on forex, indices, cryptocurrencies, commodities, and synthetics to millions of registered users across the globe.',
),
localize(
'From inception, our goal was to break free of the high commissions and clunky products offered by traditional brokers. And to deliver a first-class experience to digitally inclined traders, regardless of the size of their accounts.',
Expand Down
2 changes: 2 additions & 0 deletions src/pages/about-us/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import device from 'themes/device'
import MakeTrading from './_MakeTrading'
import OurValues from './_OurValues'
import OurPrinciples from './_OurPrinciples'
import OurLeadership from './_OurLeadership'

const StartSeparator = styled.div`
width: 0;
Expand Down Expand Up @@ -43,6 +44,7 @@ const AboutUs = (): React.ReactNode => {
<OurValues />
<EndSeparator />
<OurPrinciples />
<OurLeadership />
</Layout>
)
}
Expand Down