From c94731d84f829d84988f3311544b41c018527ea5 Mon Sep 17 00:00:00 2001 From: rupato-deriv Date: Thu, 21 Apr 2022 18:32:49 +0800 Subject: [PATCH 01/47] new-bot-landing-page --- .DS_Store | Bin 10244 -> 8196 bytes package-lock.json | 44 +- package.json | 4 +- src/common/appId.js | 3 + src/indexPage/index.js | 38 +- src/indexPage/react-components/BotLanding.jsx | 194 ++++++ src/indexPage/react-components/Carousel.jsx | 96 +++ static/.DS_Store | Bin 8196 -> 8196 bytes static/css/_landing.scss | 588 ++++++++++++++++++ static/css/bot.scss | 1 + static/css/index.scss | 2 +- static/font/IBMPlexSans-Regular.ttf | Bin 0 -> 175748 bytes static/image/1.webm | Bin 0 -> 79700 bytes static/image/2.webm | Bin 0 -> 46244 bytes static/image/3.webm | Bin 0 -> 79495 bytes static/image/BG-1.webp | Bin 0 -> 363516 bytes static/image/BG_Bot-to-deriv-1.webp | Bin 0 -> 476316 bytes static/image/Mask.svg | 3 + static/image/Vector.svg | 3 + static/image/binary.svg | 18 + static/image/carouselGif.gif | Bin 0 -> 925224 bytes static/image/carousel_arrow.svg | 3 + static/image/derivLogo.png | Bin 0 -> 2550 bytes static/image/deriv_academy.svg | 8 + static/image/dont-wait-image.svg | 9 + static/image/facebook.svg | 4 + static/image/fiat-on-ramp.svg | 7 + static/image/footerLogos.svg | 28 + static/image/icon.svg | 3 + static/image/instagram.svg | 4 + static/image/laptop-1.webp | Bin 0 -> 76740 bytes static/image/laptop_carousel.webp | Bin 0 -> 79418 bytes static/image/linkedin.svg | 6 + static/image/market_types.svg | 4 + static/image/pattern.png | Bin 0 -> 27808 bytes static/image/peer-to-peer.svg | 4 + static/image/sectionTwoLandingBackground.png | Bin 0 -> 205849 bytes static/image/sectionTwoLandingImages.png | Bin 0 -> 138074 bytes static/image/trade-types.svg | 4 + static/image/trading-platforms.svg | 4 + static/image/twitter.svg | 4 + static/image/videoCarousel.mp4 | Bin 0 -> 1707233 bytes templates/index.mustache | 7 + 43 files changed, 1083 insertions(+), 10 deletions(-) create mode 100644 src/indexPage/react-components/BotLanding.jsx create mode 100644 src/indexPage/react-components/Carousel.jsx create mode 100644 static/css/_landing.scss create mode 100644 static/font/IBMPlexSans-Regular.ttf create mode 100644 static/image/1.webm create mode 100644 static/image/2.webm create mode 100644 static/image/3.webm create mode 100644 static/image/BG-1.webp create mode 100644 static/image/BG_Bot-to-deriv-1.webp create mode 100644 static/image/Mask.svg create mode 100644 static/image/Vector.svg create mode 100644 static/image/binary.svg create mode 100644 static/image/carouselGif.gif create mode 100644 static/image/carousel_arrow.svg create mode 100644 static/image/derivLogo.png create mode 100644 static/image/deriv_academy.svg create mode 100644 static/image/dont-wait-image.svg create mode 100644 static/image/facebook.svg create mode 100644 static/image/fiat-on-ramp.svg create mode 100644 static/image/footerLogos.svg create mode 100644 static/image/icon.svg create mode 100644 static/image/instagram.svg create mode 100644 static/image/laptop-1.webp create mode 100644 static/image/laptop_carousel.webp create mode 100644 static/image/linkedin.svg create mode 100644 static/image/market_types.svg create mode 100644 static/image/pattern.png create mode 100644 static/image/peer-to-peer.svg create mode 100644 static/image/sectionTwoLandingBackground.png create mode 100644 static/image/sectionTwoLandingImages.png create mode 100644 static/image/trade-types.svg create mode 100644 static/image/trading-platforms.svg create mode 100644 static/image/twitter.svg create mode 100644 static/image/videoCarousel.mp4 diff --git a/.DS_Store b/.DS_Store index d526af19e481993b24709aa396505338b57d8885..cf9cdaf91de22d42d5b8c56faf1c5c927b1fba87 100644 GIT binary patch delta 338 zcmZn(XmOBWU|?W$DortDU;r^WfEYvza8E20o2aMAsIoC&H$S7wW*&h|md&$8Y8aJv zBo*Xj7MB$S)5rNh~QXcAD%i=Iz7D!5J?gQC)3fX{@7Q zVq{*cqfl*WWB_Cvo7L8Ga)>JHTL;Bw=j7()cL6N~0!Bs%&AnL1fn^veLbF^UlY5Ya;? delta 416 zcmZp1XbF&DU|?W$DortDU{C-uIe-{M3-C-V6q~50$f&w8U^hRb>Si8+Ocrrwh8%`W zh9u9N{N$vZ{3MV%pl;dCX(HW>1}BpWax#lc3=FO_GBLBTvaxe;aB*<)a>WK`=PTD1eqbi3fw^2738Ij lh2NPc^UDN^FhM-30a5@o%K$`AE|BTnd|O0p(0D|d5de83R?Ywb diff --git a/package-lock.json b/package-lock.json index 4b0b58612a..7fd13381d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3010,8 +3010,8 @@ } }, "blockly": { - "version": "github:binary-com/blockly#6ad25ded4aed0037cee1e523b48934c735191695", - "from": "github:binary-com/blockly#fix-blockly", + "version": "git+ssh://git@github.com/binary-com/blockly.git#6ad25ded4aed0037cee1e523b48934c735191695", + "from": "blockly@github:binary-com/blockly#fix-blockly", "requires": { "jsdom": "^11.11.0" } @@ -4608,6 +4608,11 @@ "tapable": "^0.2.7" } }, + "enquire.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/enquire.js/-/enquire.js-2.1.6.tgz", + "integrity": "sha1-PoeAybi4NQhMP2DhZtvDwqPImBQ=" + }, "ensure-array": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/ensure-array/-/ensure-array-1.0.0.tgz", @@ -10971,6 +10976,14 @@ } } }, + "json2mq": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", + "integrity": "sha1-tje9O6nqvhIsg+lyBIOusQ0skEo=", + "requires": { + "string-convert": "^0.2.0" + } + }, "json5": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", @@ -14278,6 +14291,18 @@ } } }, + "react-slick": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/react-slick/-/react-slick-0.28.1.tgz", + "integrity": "sha512-JwRQXoWGJRbUTE7eZI1rGIHaXX/4YuwX6gn7ulfvUZ4vFDVQAA25HcsHSYaUiRCduTr6rskyIuyPMpuG6bbluw==", + "requires": { + "classnames": "^2.2.5", + "enquire.js": "^2.1.6", + "json2mq": "^0.2.0", + "lodash.debounce": "^4.0.8", + "resize-observer-polyfill": "^1.5.0" + } + }, "react-tabs": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-3.2.2.tgz", @@ -14635,6 +14660,11 @@ "integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=", "dev": true }, + "resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -15484,6 +15514,11 @@ } } }, + "slick-carousel": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/slick-carousel/-/slick-carousel-1.8.1.tgz", + "integrity": "sha512-XB9Ftrf2EEKfzoQXt3Nitrt/IPbT+f1fgqBdoxO3W/+JYvtEOW6EgxnWfr9GH6nmULv7Y2tPmEX3koxThVmebA==" + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -16025,6 +16060,11 @@ "integrity": "sha1-2sMECGkMIfPDYwo/86BYd73L1zY=", "dev": true }, + "string-convert": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", + "integrity": "sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c=" + }, "string-length": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", diff --git a/package.json b/package.json index af39b7ab51..eb45232e8b 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "webpack-stream": "^4.0.0" }, "dependencies": { + "@deriv/deriv-charts": "0.3.16", "binary-style": "^0.2.4", "blockly": "github:binary-com/blockly#fix-blockly", "commander": "^2.20.0", @@ -116,7 +117,8 @@ "mobx-react": "^5.4.4", "pako": "^1.0.11", "react-render-html": "^0.6.0", + "react-slick": "^0.28.1", "react-transition-group": "^4.0.1", - "@deriv/deriv-charts": "0.3.16" + "slick-carousel": "^1.8.1" } } diff --git a/src/common/appId.js b/src/common/appId.js index 63f5b42cba..89d9a4747a 100644 --- a/src/common/appId.js +++ b/src/common/appId.js @@ -100,6 +100,9 @@ export const generateWebSocketURL = serverUrl => `wss://${serverUrl}/websockets/ export const getOAuthURL = () => `https://${generateOAuthDomain()}/oauth2/authorize?app_id=${getAppIdFallback()}&l=${getLanguage().toUpperCase()}`; +export const getOAuthURLDeriv = () => + `https://oauth.deriv.com/oauth2/authorize?app_id=${getAppIdFallback()}&l=${getLanguage().toUpperCase()}`; + const options = { apiUrl : getWebSocketURL(), language: getLanguage().toUpperCase(), diff --git a/src/indexPage/index.js b/src/indexPage/index.js index 44da8fb6dd..aa2fbcd8a3 100644 --- a/src/indexPage/index.js +++ b/src/indexPage/index.js @@ -8,17 +8,43 @@ import { isEuCountry, showHideEuElements } from '../common/footer-checks'; import GTM from '../common/gtm'; import { load as loadLang, showBanner } from '../common/lang'; import { moveToDeriv } from '../common/utils/utility'; -import { getTokenList } from '../common/utils/storageManager'; +import { get as getStorage, set as setStorage, remove, getTokenList } from '../common/utils/storageManager'; import { createUrl } from '../common/utils/tools'; import '../common/binary-ui/dropdown'; +import BotLanding from './react-components/BotLanding.jsx'; const renderElements = () => { - ReactDOM.render(, document.getElementById('binary-logo')); - ReactDOM.render(