Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Konstantinos / [FE] Add Certifications & Awards block to Home page an…
Browse files Browse the repository at this point in the history
…d Who We Are page (#5803)

* feat: add certificates

* fix: seo for our values

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* auto-pull-translation

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* fix: add certification-who we are page too for row

* fix: export messages.json

* fix: export messages.json

* auto-pull-translation

* translation: 📚 sync translations from crowdin feature branch

* fix: seo

---------

Co-authored-by: “konstantinosG-deriv” <“[email protected]”>
Co-authored-by: DerivFE <[email protected]>
  • Loading branch information
3 people authored Oct 27, 2023
1 parent 7f7b97b commit 13ef67b
Show file tree
Hide file tree
Showing 33 changed files with 6,250 additions and 5,883 deletions.
9 changes: 9 additions & 0 deletions crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
"231711709": "Trade anytime",
"231722280": "What are commodities?",
"233475101": "Read <0>this article</0> to learn more about trading CFDs on Deriv.",
"233805198": "Most trusted award",
"234187697": "trader tools",
"234782678": "You can reset your affiliate password <0>here</0>.",
"236080779": "Feature-rich charts",
Expand Down Expand Up @@ -436,6 +437,7 @@
"432775041": "Get Trading",
"434113887": "Frequently asked questions - Deriv MT5",
"434254071": "rc rp",
"434669878": "Best forex spread award",
"435601722": "Arrow",
"436791456": "4. Your new Deriv cTrader account is ready.",
"437330008": "Full disclosure of each providers’ performances.",
Expand Down Expand Up @@ -598,6 +600,7 @@
"571990120": "You can also search for the blocks you want using the search bar above the categories.",
"573706432": "Select market to trade",
"574805081": "<0>SPXS.US</0> The Direxion Daily S&P 500 Bear 3X Shares ETF seeks to reflect 300% of the inverse of the performance of the S&P 500.",
"575071944": "Awards",
"575534504": "Low spreads",
"576793632": "0 - 15 million <0>(Crypto)</0>",
"577779861": "Withdrawal",
Expand Down Expand Up @@ -3091,6 +3094,9 @@
"-696867299": "Get trading",
"-943701585": "Available on",
"-1022786491": "chevron",
"-1854553328": "GPTW award",
"-1791434676": "Investors in people award",
"-1221197492": "Broker of the year award",
"-1307341240": "extra info icon",
"-1244234227": "Digital options allow you to predict the outcome from two possible results and earn a fixed payout if your prediction is correct.",
"-1070571484": "Digital options available on Deriv",
Expand Down Expand Up @@ -4531,6 +4537,9 @@
"-2040051099": "Unsubscribed successfully",
"-231863107": "No",
"-1706181054": "Unsubscribe from Deriv emails.",
"-2126078388": "Our certifications",
"-1054223029": "We are proud to be recognised as a Great Place to Work™ and certified Gold in Investors in People.",
"-2081464339": "Our awards",
"-234962411": "Who we are | An Online Trading Platform | Deriv.com",
"-719133900": "Deriv is a pioneering and award-winning online trading platform that offers a wide selection of derivatives for anyone, anywhere to trade.",
"-1498356905": "africa forex award",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import React from 'react'
import { StaticImage } from 'gatsby-plugin-image'
import { AwardProps } from '../awardProps'
import * as styles from '../award-banner.module.scss'
import Container from 'features/components/atoms/container'
import Flex from 'features/components/atoms/flex-box'
import Typography from 'features/components/atoms/typography'
import { Localize, localize } from 'components/localization'

const AwardBannerEu = ({ title, subtitle }: AwardProps) => {
return (
<Container.Fluid margin_block="36x">
<Typography.Heading align="center" margin="8x" weight="bold" md={{ margin: '12x' }}>
<Localize translate_text={title} />
</Typography.Heading>
<Typography.Paragraph
size="xlarge"
align="center"
mt="8x"
mb="16x"
md={{ mb: '24x', mt: '12x' }}
>
<Localize translate_text={subtitle} />
</Typography.Paragraph>
<Flex.Box
align="center"
direction="col"
justify="center"
gap="8x"
md={{ direction: 'row' }}
>
<Flex.Box
align="center"
justify="center"
direction="col"
className={styles.content_eu}
padding="8x"
md={{ padding: '27x' }}
>
<StaticImage
src="../../../../../../images/common/awards/gptw.png"
alt={localize('_t_GPTW award_t_')}
formats={['avif', 'webp', 'auto']}
quality={100}
placeholder="none"
width={89}
/>
</Flex.Box>
<Flex.Box
align="center"
justify="center"
direction="col"
className={styles.content_eu}
padding="8x"
md={{ padding: '27x' }}
>
<StaticImage
src="../../../../../../images/common/awards/investors.png"
alt={localize('_t_Investors in people award_t_')}
formats={['avif', 'webp', 'auto']}
quality={100}
placeholder="none"
width={157}
/>
</Flex.Box>
</Flex.Box>
</Container.Fluid>
)
}

export default AwardBannerEu
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@use 'features/styles/theme/theme-mixins' as *;
@import 'features/styles/theme/variables';

.content{
max-inline-size: 1232px;
background-color: var(--color-grey-45);
border-radius: 24px;
}

.content_eu{
inline-size: 100%;
block-size: 332px;
background-color: var(--color-grey-45);
border-radius: 24px;

@include breakpoints(tablet) {
inline-size: 400px;
block-size: 294px;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { ReactElement } from 'react'
import { TString } from 'types/generics'

export interface AwardImagesProps {
id: number
image: ReactElement
}

export interface AwardProps {
title: TString
subtitle?: TString
}
47 changes: 47 additions & 0 deletions src/features/components/templates/banners/award-banners/data.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react'
import { StaticImage } from 'gatsby-plugin-image'
import { AwardImagesProps } from './awardProps'
import { localize } from 'components/localization'

export const awardImagesRow: AwardImagesProps[] = [
{
id: 0,
image: (
<StaticImage
src="../../../../../images/common/awards/best-forex-spreads.png"
alt={localize('_t_Best forex spread award_t_')}
formats={['avif', 'webp', 'auto']}
quality={100}
placeholder="none"
width={282}
/>
),
},
{
id: 1,
image: (
<StaticImage
src="../../../../../images/common/awards/broker-of-the-year.png"
alt={localize('_t_Broker of the year award_t_')}
formats={['avif', 'webp', 'auto']}
quality={100}
placeholder="none"
width={282}
/>
),
},

{
id: 2,
image: (
<StaticImage
src="../../../../../images/common/awards/most-trusted.png"
alt={localize('_t_Most trusted award_t_')}
formats={['avif', 'webp', 'auto']}
quality={100}
placeholder="none"
width={282}
/>
),
},
]
35 changes: 35 additions & 0 deletions src/features/components/templates/banners/award-banners/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react'
import { awardImagesRow, awardImagesEu } from './data'
import { AwardProps } from './awardProps'
import * as styles from './award-banner.module.scss'
import Container from 'features/components/atoms/container'
import Flex from 'features/components/atoms/flex-box'
import Typography from 'features/components/atoms/typography'
import { Localize } from 'components/localization'

const AwardBanner = ({ title }: AwardProps) => {
return (
<Container.Fluid margin_block="36x">
<Flex.Box
align="center"
justify="center"
direction="col"
className={styles.content}
padding="8x"
md={{ padding: '27x' }}
>
<Typography.Heading align="center" margin="12x" weight="bold">
<Localize translate_text={title} />
</Typography.Heading>

<Flex.Box direction="col" margin="12x" gap="8x" md={{ direction: 'row' }}>
{awardImagesRow.map((award, index) => (
<Flex.Box key={index}>{award.image}</Flex.Box>
))}
</Flex.Box>
</Flex.Box>
</Container.Fluid>
)
}

export default AwardBanner
4 changes: 3 additions & 1 deletion src/features/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import P2PBanner from './p2p-banner'
import ClientTestimonial from './client-testimonial'
import TradeTypes from './trade-types'
import { useOpenLiveChat } from 'components/hooks/use-open-live-chat-redirection'
import AwardBanner from 'features/components/templates/banners/award-banners'
import useRegion from 'components/hooks/use-region'
import MainNav from 'features/components/templates/navigation/main-nav'
import SignupPublic from 'features/components/templates/signup/with-banner'
Expand All @@ -16,7 +17,7 @@ const Footer = loadable(() => import('features/components/templates/footer'))

const HomePage = () => {
useOpenLiveChat(true)
const { is_p2p_allowed_country } = useRegion()
const { is_p2p_allowed_country, is_eu } = useRegion()

return (
<Layout>
Expand All @@ -25,6 +26,7 @@ const HomePage = () => {
<LivePricing />
<TradeTypes />
<OurPlatforms />
{is_eu ? null : <AwardBanner title="_t_Awards_t_" />}
<ClientTestimonial />
{is_p2p_allowed_country && <P2PBanner />}
<SignupPublic />
Expand Down
Binary file added src/images/common/awards/best-forex-spreads.png
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/awards/broker-of-the-year.png
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/awards/gptw.png
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/awards/investors.png
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/awards/most-trusted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/pages/who-we-are/_DerivNumbers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ const DerivNumbers = ({ deriv_in_numbers }: TDerivNumbers) => {
<StyledSection>
<StyledFlex>
<TitleSection fd="column">
<TitleHeader as="h6" color="black-2" align="start" type="unset">
<TitleHeader as="h2" color="black-2" align="start" type="unset">
<Localize translate_text={deriv_in_numbers?.header} />
</TitleHeader>
<StyledHeader as="h6" size="24px" align="start" weight="400" type="unset">
<StyledHeader as="p" size="24px" align="start" weight="400" type="unset">
<Localize translate_text={deriv_in_numbers?.sub_header} />
</StyledHeader>
</TitleSection>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/who-we-are/_OurValues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const OurValues = ({ our_values }: TOurValues) => {
{our_values?.values.map(({ header, image, sub_header }, index) => (
<Card key={index} index={index} direction="column" ai="start" jc="start">
<img src={image?.localFile?.publicURL} alt="icon" />
<Header as="h4" padding="24px 0 8px" size="32px" align="start" type="unset">
<Header as="h3" padding="24px 0 8px" size="32px" align="start" type="unset">
<Localize translate_text={header} />
</Header>
<Header as="div" weight="normal" size="16px">
Expand Down
9 changes: 9 additions & 0 deletions src/pages/who-we-are/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ import {
OurOffices,
} from './_lazy-load'
import { TGatsbyHead } from 'features/types'
import AwardBanner from 'features/components/templates/banners/award-banners'
import AwardBannerEu from 'features/components/templates/banners/award-banners/award-banner-eu'
import device from 'themes/device'
import { SEO } from 'components/containers'
import Layout from 'components/layout/layout'
import useRegion from 'components/hooks/use-region'
import { WithIntl } from 'components/localization'

const StartSeparator = styled.div`
Expand All @@ -40,6 +43,7 @@ const EndSeparator = styled.div`
`

const AboutUs = ({ data }: TWhoWeAre) => {
const { is_eu } = useRegion()
const {
hero,
our_values,
Expand All @@ -57,7 +61,12 @@ const AboutUs = ({ data }: TWhoWeAre) => {
<StartSeparator />
<OurValues our_values={our_values} />
<EndSeparator />
<AwardBannerEu
title="_t_Our certifications_t_"
subtitle="_t_We are proud to be recognised as a Great Place to Work™ and certified Gold in Investors in People._t_"
/>
<OurPrinciples our_principles={our_principles} />
{is_eu ? null : <AwardBanner title="_t_Our awards_t_" />}
<OurLeadership our_leadership={our_leadership} />
<DerivNumbers deriv_in_numbers={deriv_in_numbers} />
<ImageMarquee slider_medias={slider_medias} />
Expand Down
Loading

1 comment on commit 13ef67b

@vercel
Copy link

@vercel vercel bot commented on 13ef67b Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com.binary.sx
deriv-com-git-master.binary.sx

Please sign in to comment.