Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
455d73c
setup route
mitra-deriv May 12, 2022
4d0981e
take the reusable components from #3586
mitra-deriv May 12, 2022
8eb5a60
initial setup
mitra-deriv May 13, 2022
8bd80d8
add the images
mitra-deriv May 13, 2022
235d219
Merge pull request #3604 from mitra-deriv/row-move-to-deriv-landing-page
habib-deriv May 13, 2022
bbb42c7
feat: implement carousel
May 18, 2022
1c9ecff
feat: add card component
mitra-deriv May 19, 2022
cc65ffd
fix: fix image size
mitra-deriv May 19, 2022
f8a5a83
fix: refactor classnames
May 19, 2022
816a750
Merge pull request #3614 from mitra-deriv/add-exclusively-on-deriv-se…
habib-deriv May 19, 2022
0ebfbcf
feat:carousel mobile version
May 20, 2022
5daa493
Merge branch 'binary-com-lp' of https://github.com/binary-com/binary-…
May 23, 2022
710a7c0
feat: choose section
May 23, 2022
4be5fba
fix: add button
May 24, 2022
3397a48
Merge pull request #3611 from pavel-latyshou-binary/pavel-mtd-carousel
habib-deriv May 24, 2022
84826f4
feat: takederiv section + mobile
May 24, 2022
ee3f4c8
Merge branch 'binary-com-lp' of https://github.com/binary-com/binary-…
May 24, 2022
a73f436
fix: update content
mitra-deriv May 24, 2022
1d7e648
fix: fix image
mitra-deriv May 24, 2022
2d93b21
Merge pull request #3626 from mitra-deriv/update-some-content
habib-deriv May 24, 2022
a825c12
fix: http to https
May 24, 2022
27ae73d
Merge pull request #3625 from pavel-latyshou-binary/pavel-take-deriv
habib-deriv May 24, 2022
d4b670f
fix: autoplay carousel
May 24, 2022
cd487ee
Merge pull request #3627 from pavel-latyshou-binary/pavel-mtd-carousel
habib-deriv May 24, 2022
650c144
feat: add hero banner section with carousel
mitra-deriv May 26, 2022
07b8303
fix: add line
mitra-deriv May 26, 2022
8e085b2
Merge pull request #3630 from mitra-deriv/hero-banner
habib-deriv May 26, 2022
b21721d
fix: show langbar
May 26, 2022
c73334b
fix: margin fix
May 26, 2022
a9847d1
Merge pull request #3631 from pavel-latyshou-binary/mtd-langbar
habib-deriv May 26, 2022
e960f94
fix: update footer content to be same as production
mitra-deriv May 27, 2022
ac68460
Merge pull request #3632 from mitra-deriv/footer-update
habib-deriv May 27, 2022
4be1144
fix: fix issues
mitra-deriv May 27, 2022
783f3bb
fix: fix navbar white space
mitra-deriv May 27, 2022
e34088c
fix: make remove background color and use background
mitra-deriv May 27, 2022
59a06cd
Merge pull request #3633 from mitra-deriv/fix-small-issues-on-landing…
habib-deriv May 27, 2022
27f0dba
chore: rename folder
mitra-deriv Jun 24, 2022
43bcb7f
added new route page
mitra-deriv Jun 27, 2022
ea5ee75
fix: fix merge conflicts and added routing
mitra-deriv Jun 29, 2022
d782937
fix: merge to master
mitra-deriv Jun 29, 2022
475411c
Merge branch 'binary-com-lp-new' of https://github.com/binary-com/bin…
mitra-deriv Jun 29, 2022
766bef9
fix: css issues and add more image for row
mitra-deriv Jun 30, 2022
1ac5ea3
fix: fix hyperlink issue in footer
mitra-deriv Jun 30, 2022
1ee6817
fix: fix translation issue
mitra-deriv Jun 30, 2022
c8974cb
fix: hero height
mitra-deriv Jun 30, 2022
2c0d8ac
Merge pull request #3658 from mitra-deriv/get-master-changes
habib-deriv Jun 30, 2022
8ae70eb
fix: responsive langbar
pavel-latyshou-binary Jun 30, 2022
cea41e6
fix: add flag images
pavel-latyshou-binary Jun 30, 2022
32248e4
fix: responsive lang
pavel-latyshou-binary Jun 30, 2022
dfee24b
Merge pull request #3661 from pavel-latyshou-binary/mtd-binary-lp-lan…
habib-deriv Jun 30, 2022
d95a34c
fix: refactor image to code
pavel-latyshou-binary Jun 30, 2022
3f4bd45
fix: add 8px for top
pavel-latyshou-binary Jun 30, 2022
298c088
fix: add to 8px
pavel-latyshou-binary Jun 30, 2022
776cf2a
Merge pull request #3662 from pavel-latyshou-binary/fix-carousel-image
habib-deriv Jun 30, 2022
729466f
Merge branch 'master' into binary-com-lp-new
habib-deriv Jul 1, 2022
81eea7b
fix: link and align fixed
pavel-latyshou-binary Jul 1, 2022
7e82b4e
fix: remuve duplicated import
pavel-latyshou-binary Jul 1, 2022
3b75518
Merge pull request #3669 from pavel-latyshou-binary/lp-fixes
habib-deriv Jul 1, 2022
1e9d4a0
fix: responsive issue in hero section
mitra-deriv Jul 4, 2022
1c2cc98
fix: correct links
pavel-latyshou-binary Jul 4, 2022
94f973d
fix: z-index
pavel-latyshou-binary Jul 4, 2022
049e51c
fix: add carousel left spacing
pavel-latyshou-binary Jul 4, 2022
9139e6d
Merge pull request #3673 from pavel-latyshou-binary/btn-links
habib-deriv Jul 4, 2022
b5d6895
fix: spacing
pavel-latyshou-binary Jul 4, 2022
2ea7107
fix: add logo for mobile
mitra-deriv Jul 4, 2022
4694f6c
Merge pull request #3675 from pavel-latyshou-binary/spacing-issues-lp
habib-deriv Jul 4, 2022
fe1b1c7
background fix
mitra-deriv Jul 4, 2022
5ffff0e
Merge pull request #3674 from pavel-latyshou-binary/padding-carousel
habib-deriv Jul 4, 2022
82ff32d
Merge branch 'binary-com-lp-new' into fix-responsive-issue
mitra-deriv Jul 4, 2022
a0a251b
style: new line
mitra-deriv Jul 4, 2022
01471c4
Merge pull request #3672 from mitra-deriv/fix-responsive-issue
habib-deriv Jul 4, 2022
d25971e
fix: subtask fixes
pavel-latyshou-binary Jul 5, 2022
4649f26
fix: add min with to image
pavel-latyshou-binary Jul 5, 2022
a5a5426
fix: image issue
pavel-latyshou-binary Jul 5, 2022
419ab16
fix: remove min-width
pavel-latyshou-binary Jul 5, 2022
ac0a548
fix: replace img
pavel-latyshou-binary Jul 5, 2022
abdaf7d
Merge pull request #3676 from pavel-latyshou-binary/font-size-issues
habib-deriv Jul 5, 2022
4fe256e
fix: change urls
pavel-latyshou-binary Jul 5, 2022
a35612d
Merge pull request #3677 from pavel-latyshou-binary/correct-links
habib-deriv Jul 5, 2022
71bfc6d
fix for circle CI
mitra-deriv Jul 20, 2022
68a9485
Merge pull request #3689 from mitra-deriv/fix-circle-ci-test
habib-deriv Jul 25, 2022
68ea47a
remove console log
mitra-deriv Jul 25, 2022
2c6886e
change the time to 10 min for testing
mitra-deriv Jul 25, 2022
d98449d
Merge pull request #3693 from mitra-deriv/remove-console-log
habib-deriv Jul 25, 2022
3567c48
address comments
mitra-deriv Jul 26, 2022
c221941
Merge pull request #3695 from mitra-deriv/addressing-comments
habib-deriv Jul 26, 2022
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
62 changes: 0 additions & 62 deletions .github/workflows/main.yml

This file was deleted.

4,024 changes: 2,098 additions & 1,926 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
"mobx-react": "^5.4.4",
"pako": "^1.0.11",
"react-render-html": "^0.6.0",
"react-slick": "^0.28.1",
"react-slick": "^0.29.0",
"react-transition-group": "^4.0.1",
"slick-carousel": "^1.8.1"
"slick-slider": "^1.8.2"
}
}
4 changes: 3 additions & 1 deletion src/botPage/view/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
saveBeforeUnload,
} from './blockly/utils';
import { moveToDeriv } from '../../common/utils/utility';
import { setTimeOutBanner } from '../../indexPage/index';
import { setTimeOutBanner, getComponent } from '../../indexPage';

let realityCheckTimeout;
let chart;
Expand Down Expand Up @@ -841,6 +841,8 @@ function renderErrorPage() {

// eslint-disable-next-line consistent-return
function renderReactComponents() {
// eslint-disable-next-line no-unused-vars
getComponent();
$('.barspinner').show();
const bannerToken = getStorage('setDueDateForBanner');
const qs = parseQueryString();
Expand Down
3 changes: 3 additions & 0 deletions src/common/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export const load = () => {
.text()
);

$('.actual_flag').text(`${lang}`);
$('.language_background_flag').addClass(`${lang}_flag_mtd`);

if (lang === 'ach') {
// eslint-disable-next-line no-underscore-dangle
window._jipt = [['project', 'binary-bot']];
Expand Down
32 changes: 23 additions & 9 deletions src/indexPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ import { get as getStorage, set as setStorage, remove, getTokenList } from '../c
import { createUrl, parseQueryString, serialize } from '../common/utils/tools';
import '../common/binary-ui/dropdown';
import BotLanding from './react-components/bot-landing';
import BinaryLanding from './react-components/binary-landing';

const today = new Date().getTime();
// eslint-disable-next-line one-var
const oneMilliSec = 1000;
const sevenDays = 7;
const oneMinute = 60;
const oneDay = 24;
// will uncomment before production release
// const sevenDays = 7;
// const oneMinute = 60;
// const oneDay = 24;

export const elements = ['#notification-banner', '#main', '#footer', '#header', '#topbar'];
// eslint-disable-next-line one-var
export const bannerToken = getStorage('setDueDateForBanner');

// eslint-disable-next-line arrow-body-style
export const expirationDate = () => {
return today + oneMilliSec * oneMinute * oneMinute * oneDay * sevenDays;
return today + oneMilliSec * 600;
};

export const calcSetTimeoutValueBanner = expirationDate() - new Date().getTime();
Expand All @@ -40,7 +42,16 @@ const checkifBotRunning = () => {
}
return false;
};

let Component, dynamicVar;
export const getComponent = () => {
if (window.location.pathname === '/movetoderiv.html') {
Component = <BinaryLanding />;
dynamicVar = 'movetoderiv';
} else {
Component = <BotLanding />;
dynamicVar = 'bot-landing';
}
};
export const setTimeOutBanner = route => {
let bannerDisplayed;
const qs = parseQueryString();
Expand All @@ -65,17 +76,20 @@ export const setTimeOutBanner = route => {
};

const renderBanner = () => {
render(<BotLanding />, document.getElementById('bot-landing'));
setStorage('setDueDateForBanner', expirationDate());
getComponent();
render(Component, document.getElementById(dynamicVar));
// setStorage('setDueDateForBanner', expirationDate());
elements.map(elem => document.querySelector(elem).classList.add('hidden'));
document.getElementById('bot-landing').classList.remove('hidden');
document.getElementById(dynamicVar).classList.remove('hidden');
document.getElementById('bot-main').classList.remove('hidden');
document.getElementById('topbar').classList.remove('hidden');
$('.barspinner').hide();
};

// eslint-disable-next-line consistent-return
const renderElements = () => {
// eslint-disable-next-line one-var, no-unused-vars
getComponent();
setTimeOutBanner('index');
$('.barspinner').show();

Expand All @@ -99,7 +113,7 @@ const renderElements = () => {
createUrl({ subdomain: 'shop', path: 'collections/strategies', isNonBotPage: true })
);
elements.map(elem => document.querySelector(elem).classList.remove('hidden'));
document.getElementById('bot-landing').classList.add('hidden');
document.getElementById(dynamicVar).classList.add('hidden');
}
document.getElementById('bot-main').classList.remove('hidden');
setTimeout(() => {
Expand Down
57 changes: 57 additions & 0 deletions src/indexPage/react-components/binary-landing/Card.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React from 'react';
import { translate } from '../../../common/i18n';

const CardSection = () => {
const cardContentArray = [
{
title : translate('Trade multipliers'),
content: translate('Amplify your potential profit without risking more than your stake.'),
img : 'image/multiplier.png',
},
{
title : translate('Peer-to-peer payments'),
content: translate('Exchange your local currency with fellow traders to get funds in and out of your account with Deriv P2P.'),
img : 'image/p2p.png',
},
{
title : translate('Learn with Deriv Academy'),
content: translate('Enjoy complimentary articles and videos to help you learn the ropes of online trading.'),
img : 'image/academy.png',
},
{
title : translate('Crash/Boom indices'),
content: translate('Predict and potentially gain from exciting spikes and dips. Only available with multipliers on DTrader.'),
img : 'image/crashboom.png',
},
]

return (
<div className='card-container card-wrapper'>
<div className='section-container-holder card-wrapper-holder'>
<div className="container-header card-wrapper-holder-header">
<h1>{translate ('Exclusively on Deriv')}</h1>
<h2>{translate('There’s a bright future ahead.')}</h2>
<h2>{translate ('Find these bonus features and more on Deriv:')}</h2>
</div>
</div>
<div className="card-container card-wrapper-holder-container">
{cardContentArray.map((card, index) => {
const { title, content,img } = card;
return (
<div className='card-wrapper-holder-container-content' key={index}>
<div>
<img src={img} />
</div>
<h1>{title}</h1>
<h2>{content}</h2>
</div>
)
})
}
</div>

</div>
)
}

export default CardSection;
142 changes: 142 additions & 0 deletions src/indexPage/react-components/binary-landing/Carousel.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import React from 'react';
import Slider from 'react-slick';
import { translate } from '../../../common/i18n';

const carouselContentArray = [
{
url: 'https://smarttrader.deriv.com/',
action_text: translate('Check it out'),
img: 'image/landing-carousel/smart-trader.png',
platform_title: translate('SmartTrader'),
platform_description: translate('Our classic options trading platform'),
},
{
url: 'https://bot.deriv.com/',
action_text: translate('Check it out'),
img: 'image/landing-carousel/binary-bot.png',
platform_title: translate('Binary Bot'),
platform_description: translate('Our classic automated trading platform'),
},
{
url: 'https://deriv.com/dmt5/',
action_text: translate('Learn more'),
img: 'image/landing-carousel/mt5.png',
platform_title: translate('Deriv MT5'),
platform_description: translate('The world-famous CFD trading platform'),
},
{
url: 'https://deriv.com/dtrader/',
action_text: translate('Learn more'),
img: 'image/landing-carousel/dtrader.png',
platform_title: translate('DTrader'),
platform_description: translate('Our flagship options and multipliers trading platform'),
},
{
url: 'https://deriv.com/dbot/',
action_text: translate('Learn more'),
img: 'image/landing-carousel/dbot.png',
platform_title: translate('DBot'),
platform_description: translate('Our next generation automated trading platform'),
},
{
url: 'https://deriv.com/landing/deriv-go/',
action_text: translate('Learn more'),
img: 'image/landing-carousel/deriv-go.png',
platform_title: translate('Deriv GO'),
platform_description: translate('Trade on-the-go with our mobile trading platform'),
},
{
url: 'https://deriv.com/derivx/',
action_text: translate('Learn more'),
img: 'image/landing-carousel/derivX.png',
platform_title: translate('Deriv X'),
platform_description: translate('Our customisable CFD trading platform'),
},
]


const Carousel = () => {

const settings = {
dots: false,
infinite: true,
speed: 300,
slidesToShow: 2,
slidesToScroll: 1,
arrows: false,
variableWidth: true,
// initialSlide: 1,
autoplay: true,
autoplaySpeed: 1500,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
},
},
{
breakpoint: 700,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
},
},
],
};

return (
<div className="carousel_section">
<div className="carousel_section__desktop">
<Slider {...settings}>
{carouselContentArray.map((slide, index) => {
const { url, action_text, img, platform_title, platform_description } = slide;
return (
<div className="carousel_section__slide_card">
<div className="carousel_slide_info_wrapper">
<h1 className="platform_title" >{platform_title}</h1>
<h2 className="platform_description" >{platform_description}</h2>
</div>
<img className="carousel_section__slide_img" src={img} />
<a href={url}>
<button className="carousel_section__arrow-btn">
<div className="carousel_section__btn_inner">
{action_text}
<img src={`image/landing-carousel/arrow.svg`} />
</div>
</button>
</a>
</div>
)
}
)}
</Slider>
</div>
<div className="carousel_section__mobile">
{carouselContentArray.map((slide, index) => {
const { url, action_text, img, platform_title, platform_description } = slide;
return (
<div className="carousel_section__slide_card">
<div className="carousel_slide_info_wrapper">
<h1 className="platform_title" >{platform_title}</h1>
<h2 className="platform_description" >{platform_description}</h2>
</div>
<img className="carousel_section__slide_img" src={img} />
<a href={url}>
<button className="carousel_section__arrow-btn">
<div className="carousel_section__btn_inner">
{action_text}
<img src={`image/landing-carousel/arrow.svg`} />
</div>
</button>
</a>
</div>
)
}
)}
</div>
</div>
);
}
export default Carousel;
12 changes: 12 additions & 0 deletions src/indexPage/react-components/binary-landing/CarouselTitle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import { translate } from '../../../common/i18n';

const CarouselTitle = () => (
<div className="carousel-title">
<div className="carousel-title__content">
<h1>{translate('7 trading platforms — old favourites and new ones, too')}</h1>
</div>
</div>
);

export default CarouselTitle
Loading