From 1a8dc57fa9de1007aa34d9540e21ed05e39815b3 Mon Sep 17 00:00:00 2001 From: bobronaud Date: Thu, 29 Feb 2024 14:21:22 +0300 Subject: [PATCH 1/6] change roots for old/new landings --- frontend/src/AppRoutes.jsx | 8 ++++---- frontend/src/{ => pages}/landing/Faq.jsx | 0 frontend/src/{ => pages}/landing/Footer.jsx | 0 frontend/src/{ => pages}/landing/Header.jsx | 2 +- frontend/src/{ => pages}/landing/Landing.jsx | 2 +- .../src/{ => pages}/landing/assets/BGElement.svg | 0 frontend/src/{ => pages}/landing/assets/Burger.svg | 0 .../landing/assets/DisplayWithCode1.jpeg | Bin .../landing/assets/DisplayWithCode2.jpeg | Bin .../landing/assets/DisplayWithCode3.jpeg | Bin .../landing/assets/DisplayWithCode4.jpeg | Bin .../landing/assets/DisplayWithCode5.jpeg | Bin .../src/{ => pages}/landing/assets/Icons=Code.svg | 0 .../{ => pages}/landing/assets/Icons=Devices.svg | 0 .../{ => pages}/landing/assets/Icons=Languages.svg | 0 .../src/{ => pages}/landing/assets/Icons=Share.svg | 0 .../{ => pages}/landing/assets/Icons=TeamWork.svg | 0 .../{ => pages}/landing/assets/Icons=Template.svg | 0 .../{ => pages}/landing/assets/LogoFooterDark.svg | 0 .../{ => pages}/landing/assets/LogoFooterLight.svg | 0 .../landing/assets/LogoHeaderDarkTheme.svg | 0 .../landing/assets/LogoHeaderLightTheme.svg | 0 .../src/{ => pages}/landing/assets/ReadyAssets.jpeg | Bin .../{ => pages}/landing/assets/SmallBGElement.svg | 0 .../landing/assets/Telegram_dark_theme.svg | 0 .../landing/assets/Telegram_dark_theme_mobile.svg | 0 .../landing/assets/Telegram_light_theme.svg | 0 .../landing/assets/Telegram_light_theme_mobile.svg | 0 .../landing/assets/Twitter_dark_theme.svg | 0 .../landing/assets/Twitter_dark_theme_mobile.svg | 0 .../landing/assets/Twitter_light_theme.svg | 0 .../landing/assets/Twitter_light_theme_mobile.svg | 0 .../{ => pages}/landing/assets/VK_dark_theme.svg | 0 .../landing/assets/VK_dark_theme_mobile.svg | 0 .../{ => pages}/landing/assets/VK_light_theme.svg | 0 .../landing/assets/VK_light_theme_mobile.svg | 0 .../landing/assets/YouTube_dark_theme.svg | 0 .../landing/assets/YouTube_dark_theme_mobile.svg | 0 .../landing/assets/YouTube_light_theme.svg | 0 .../landing/assets/YouTube_light_theme_mobile.svg | 0 .../landing/assets/fonts/NunitoSans_10pt-Bold.ttf | Bin .../landing/assets/fonts/NunitoSans_10pt-Light.ttf | Bin .../assets/fonts/NunitoSans_10pt-SemiBold.ttf | Bin frontend/src/{ => pages}/landing/custom-colors.scss | 0 frontend/src/{ => pages}/landing/landing.scss | 0 .../src/pages/{landing => old-landing}/checked.svg | 0 .../src/pages/{landing => old-landing}/index.jsx | 0 .../pages/{landing => old-landing}/index.module.css | 0 frontend/src/routes.js | 2 +- 49 files changed, 7 insertions(+), 7 deletions(-) rename frontend/src/{ => pages}/landing/Faq.jsx (100%) rename frontend/src/{ => pages}/landing/Footer.jsx (100%) rename frontend/src/{ => pages}/landing/Header.jsx (99%) rename frontend/src/{ => pages}/landing/Landing.jsx (99%) rename frontend/src/{ => pages}/landing/assets/BGElement.svg (100%) rename frontend/src/{ => pages}/landing/assets/Burger.svg (100%) rename frontend/src/{ => pages}/landing/assets/DisplayWithCode1.jpeg (100%) rename frontend/src/{ => pages}/landing/assets/DisplayWithCode2.jpeg (100%) rename frontend/src/{ => pages}/landing/assets/DisplayWithCode3.jpeg (100%) rename frontend/src/{ => pages}/landing/assets/DisplayWithCode4.jpeg (100%) rename frontend/src/{ => pages}/landing/assets/DisplayWithCode5.jpeg (100%) rename frontend/src/{ => pages}/landing/assets/Icons=Code.svg (100%) rename frontend/src/{ => pages}/landing/assets/Icons=Devices.svg (100%) rename frontend/src/{ => pages}/landing/assets/Icons=Languages.svg (100%) rename frontend/src/{ => pages}/landing/assets/Icons=Share.svg (100%) rename frontend/src/{ => pages}/landing/assets/Icons=TeamWork.svg (100%) rename frontend/src/{ => pages}/landing/assets/Icons=Template.svg (100%) rename frontend/src/{ => pages}/landing/assets/LogoFooterDark.svg (100%) rename frontend/src/{ => pages}/landing/assets/LogoFooterLight.svg (100%) rename frontend/src/{ => pages}/landing/assets/LogoHeaderDarkTheme.svg (100%) rename frontend/src/{ => pages}/landing/assets/LogoHeaderLightTheme.svg (100%) rename frontend/src/{ => pages}/landing/assets/ReadyAssets.jpeg (100%) rename frontend/src/{ => pages}/landing/assets/SmallBGElement.svg (100%) rename frontend/src/{ => pages}/landing/assets/Telegram_dark_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/Telegram_dark_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/Telegram_light_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/Telegram_light_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/Twitter_dark_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/Twitter_dark_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/Twitter_light_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/Twitter_light_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/VK_dark_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/VK_dark_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/VK_light_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/VK_light_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/YouTube_dark_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/YouTube_dark_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/YouTube_light_theme.svg (100%) rename frontend/src/{ => pages}/landing/assets/YouTube_light_theme_mobile.svg (100%) rename frontend/src/{ => pages}/landing/assets/fonts/NunitoSans_10pt-Bold.ttf (100%) rename frontend/src/{ => pages}/landing/assets/fonts/NunitoSans_10pt-Light.ttf (100%) rename frontend/src/{ => pages}/landing/assets/fonts/NunitoSans_10pt-SemiBold.ttf (100%) rename frontend/src/{ => pages}/landing/custom-colors.scss (100%) rename frontend/src/{ => pages}/landing/landing.scss (100%) rename frontend/src/pages/{landing => old-landing}/checked.svg (100%) rename frontend/src/pages/{landing => old-landing}/index.jsx (100%) rename frontend/src/pages/{landing => old-landing}/index.module.css (100%) diff --git a/frontend/src/AppRoutes.jsx b/frontend/src/AppRoutes.jsx index 44f3ef2f..91f4c01e 100644 --- a/frontend/src/AppRoutes.jsx +++ b/frontend/src/AppRoutes.jsx @@ -11,8 +11,8 @@ import ScrollToTop from './utils/scrollToTop.js'; import DefaultLoader from './components/Loaders/DefaultLoader.jsx'; -const Landing = lazy(() => import('./pages/landing')); -const NewLanding = lazy(() => import('./landing/Landing.jsx')); +const Landing = lazy(() => import('./pages/landing/Landing.jsx')); +const OldLanding = lazy(() => import('./pages/old-landing')); const ProfilePage = lazy(() => import('./pages/profile')); const SettingsPage = lazy(() => import('./pages/settings')); @@ -55,9 +55,9 @@ function AppRoutes() { }> - } /> + } /> }> - } /> + } /> } /> } /> } /> diff --git a/frontend/src/landing/Faq.jsx b/frontend/src/pages/landing/Faq.jsx similarity index 100% rename from frontend/src/landing/Faq.jsx rename to frontend/src/pages/landing/Faq.jsx diff --git a/frontend/src/landing/Footer.jsx b/frontend/src/pages/landing/Footer.jsx similarity index 100% rename from frontend/src/landing/Footer.jsx rename to frontend/src/pages/landing/Footer.jsx diff --git a/frontend/src/landing/Header.jsx b/frontend/src/pages/landing/Header.jsx similarity index 99% rename from frontend/src/landing/Header.jsx rename to frontend/src/pages/landing/Header.jsx index af046b38..747361ea 100644 --- a/frontend/src/landing/Header.jsx +++ b/frontend/src/pages/landing/Header.jsx @@ -9,7 +9,7 @@ import { Col, } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; -import routes from '../routes'; +import routes from '../../routes.js'; import RunItLogoLight from './assets/LogoHeaderLightTheme.svg'; import RunItLogoDark from './assets/LogoHeaderDarkTheme.svg'; diff --git a/frontend/src/landing/Landing.jsx b/frontend/src/pages/landing/Landing.jsx similarity index 99% rename from frontend/src/landing/Landing.jsx rename to frontend/src/pages/landing/Landing.jsx index 575b30fd..ba295de7 100644 --- a/frontend/src/landing/Landing.jsx +++ b/frontend/src/pages/landing/Landing.jsx @@ -2,7 +2,7 @@ import { Link } from 'react-router-dom'; import { Button, Col, Container, Image, Row } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; import { useEffect, useRef } from 'react'; -import routes from '../routes.js'; +import routes from '../../routes.js'; import Faq from './Faq.jsx'; import Header from './Header.jsx'; import Footer from './Footer.jsx'; diff --git a/frontend/src/landing/assets/BGElement.svg b/frontend/src/pages/landing/assets/BGElement.svg similarity index 100% rename from frontend/src/landing/assets/BGElement.svg rename to frontend/src/pages/landing/assets/BGElement.svg diff --git a/frontend/src/landing/assets/Burger.svg b/frontend/src/pages/landing/assets/Burger.svg similarity index 100% rename from frontend/src/landing/assets/Burger.svg rename to frontend/src/pages/landing/assets/Burger.svg diff --git a/frontend/src/landing/assets/DisplayWithCode1.jpeg b/frontend/src/pages/landing/assets/DisplayWithCode1.jpeg similarity index 100% rename from frontend/src/landing/assets/DisplayWithCode1.jpeg rename to frontend/src/pages/landing/assets/DisplayWithCode1.jpeg diff --git a/frontend/src/landing/assets/DisplayWithCode2.jpeg b/frontend/src/pages/landing/assets/DisplayWithCode2.jpeg similarity index 100% rename from frontend/src/landing/assets/DisplayWithCode2.jpeg rename to frontend/src/pages/landing/assets/DisplayWithCode2.jpeg diff --git a/frontend/src/landing/assets/DisplayWithCode3.jpeg b/frontend/src/pages/landing/assets/DisplayWithCode3.jpeg similarity index 100% rename from frontend/src/landing/assets/DisplayWithCode3.jpeg rename to frontend/src/pages/landing/assets/DisplayWithCode3.jpeg diff --git a/frontend/src/landing/assets/DisplayWithCode4.jpeg b/frontend/src/pages/landing/assets/DisplayWithCode4.jpeg similarity index 100% rename from frontend/src/landing/assets/DisplayWithCode4.jpeg rename to frontend/src/pages/landing/assets/DisplayWithCode4.jpeg diff --git a/frontend/src/landing/assets/DisplayWithCode5.jpeg b/frontend/src/pages/landing/assets/DisplayWithCode5.jpeg similarity index 100% rename from frontend/src/landing/assets/DisplayWithCode5.jpeg rename to frontend/src/pages/landing/assets/DisplayWithCode5.jpeg diff --git a/frontend/src/landing/assets/Icons=Code.svg b/frontend/src/pages/landing/assets/Icons=Code.svg similarity index 100% rename from frontend/src/landing/assets/Icons=Code.svg rename to frontend/src/pages/landing/assets/Icons=Code.svg diff --git a/frontend/src/landing/assets/Icons=Devices.svg b/frontend/src/pages/landing/assets/Icons=Devices.svg similarity index 100% rename from frontend/src/landing/assets/Icons=Devices.svg rename to frontend/src/pages/landing/assets/Icons=Devices.svg diff --git a/frontend/src/landing/assets/Icons=Languages.svg b/frontend/src/pages/landing/assets/Icons=Languages.svg similarity index 100% rename from frontend/src/landing/assets/Icons=Languages.svg rename to frontend/src/pages/landing/assets/Icons=Languages.svg diff --git a/frontend/src/landing/assets/Icons=Share.svg b/frontend/src/pages/landing/assets/Icons=Share.svg similarity index 100% rename from frontend/src/landing/assets/Icons=Share.svg rename to frontend/src/pages/landing/assets/Icons=Share.svg diff --git a/frontend/src/landing/assets/Icons=TeamWork.svg b/frontend/src/pages/landing/assets/Icons=TeamWork.svg similarity index 100% rename from frontend/src/landing/assets/Icons=TeamWork.svg rename to frontend/src/pages/landing/assets/Icons=TeamWork.svg diff --git a/frontend/src/landing/assets/Icons=Template.svg b/frontend/src/pages/landing/assets/Icons=Template.svg similarity index 100% rename from frontend/src/landing/assets/Icons=Template.svg rename to frontend/src/pages/landing/assets/Icons=Template.svg diff --git a/frontend/src/landing/assets/LogoFooterDark.svg b/frontend/src/pages/landing/assets/LogoFooterDark.svg similarity index 100% rename from frontend/src/landing/assets/LogoFooterDark.svg rename to frontend/src/pages/landing/assets/LogoFooterDark.svg diff --git a/frontend/src/landing/assets/LogoFooterLight.svg b/frontend/src/pages/landing/assets/LogoFooterLight.svg similarity index 100% rename from frontend/src/landing/assets/LogoFooterLight.svg rename to frontend/src/pages/landing/assets/LogoFooterLight.svg diff --git a/frontend/src/landing/assets/LogoHeaderDarkTheme.svg b/frontend/src/pages/landing/assets/LogoHeaderDarkTheme.svg similarity index 100% rename from frontend/src/landing/assets/LogoHeaderDarkTheme.svg rename to frontend/src/pages/landing/assets/LogoHeaderDarkTheme.svg diff --git a/frontend/src/landing/assets/LogoHeaderLightTheme.svg b/frontend/src/pages/landing/assets/LogoHeaderLightTheme.svg similarity index 100% rename from frontend/src/landing/assets/LogoHeaderLightTheme.svg rename to frontend/src/pages/landing/assets/LogoHeaderLightTheme.svg diff --git a/frontend/src/landing/assets/ReadyAssets.jpeg b/frontend/src/pages/landing/assets/ReadyAssets.jpeg similarity index 100% rename from frontend/src/landing/assets/ReadyAssets.jpeg rename to frontend/src/pages/landing/assets/ReadyAssets.jpeg diff --git a/frontend/src/landing/assets/SmallBGElement.svg b/frontend/src/pages/landing/assets/SmallBGElement.svg similarity index 100% rename from frontend/src/landing/assets/SmallBGElement.svg rename to frontend/src/pages/landing/assets/SmallBGElement.svg diff --git a/frontend/src/landing/assets/Telegram_dark_theme.svg b/frontend/src/pages/landing/assets/Telegram_dark_theme.svg similarity index 100% rename from frontend/src/landing/assets/Telegram_dark_theme.svg rename to frontend/src/pages/landing/assets/Telegram_dark_theme.svg diff --git a/frontend/src/landing/assets/Telegram_dark_theme_mobile.svg b/frontend/src/pages/landing/assets/Telegram_dark_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/Telegram_dark_theme_mobile.svg rename to frontend/src/pages/landing/assets/Telegram_dark_theme_mobile.svg diff --git a/frontend/src/landing/assets/Telegram_light_theme.svg b/frontend/src/pages/landing/assets/Telegram_light_theme.svg similarity index 100% rename from frontend/src/landing/assets/Telegram_light_theme.svg rename to frontend/src/pages/landing/assets/Telegram_light_theme.svg diff --git a/frontend/src/landing/assets/Telegram_light_theme_mobile.svg b/frontend/src/pages/landing/assets/Telegram_light_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/Telegram_light_theme_mobile.svg rename to frontend/src/pages/landing/assets/Telegram_light_theme_mobile.svg diff --git a/frontend/src/landing/assets/Twitter_dark_theme.svg b/frontend/src/pages/landing/assets/Twitter_dark_theme.svg similarity index 100% rename from frontend/src/landing/assets/Twitter_dark_theme.svg rename to frontend/src/pages/landing/assets/Twitter_dark_theme.svg diff --git a/frontend/src/landing/assets/Twitter_dark_theme_mobile.svg b/frontend/src/pages/landing/assets/Twitter_dark_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/Twitter_dark_theme_mobile.svg rename to frontend/src/pages/landing/assets/Twitter_dark_theme_mobile.svg diff --git a/frontend/src/landing/assets/Twitter_light_theme.svg b/frontend/src/pages/landing/assets/Twitter_light_theme.svg similarity index 100% rename from frontend/src/landing/assets/Twitter_light_theme.svg rename to frontend/src/pages/landing/assets/Twitter_light_theme.svg diff --git a/frontend/src/landing/assets/Twitter_light_theme_mobile.svg b/frontend/src/pages/landing/assets/Twitter_light_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/Twitter_light_theme_mobile.svg rename to frontend/src/pages/landing/assets/Twitter_light_theme_mobile.svg diff --git a/frontend/src/landing/assets/VK_dark_theme.svg b/frontend/src/pages/landing/assets/VK_dark_theme.svg similarity index 100% rename from frontend/src/landing/assets/VK_dark_theme.svg rename to frontend/src/pages/landing/assets/VK_dark_theme.svg diff --git a/frontend/src/landing/assets/VK_dark_theme_mobile.svg b/frontend/src/pages/landing/assets/VK_dark_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/VK_dark_theme_mobile.svg rename to frontend/src/pages/landing/assets/VK_dark_theme_mobile.svg diff --git a/frontend/src/landing/assets/VK_light_theme.svg b/frontend/src/pages/landing/assets/VK_light_theme.svg similarity index 100% rename from frontend/src/landing/assets/VK_light_theme.svg rename to frontend/src/pages/landing/assets/VK_light_theme.svg diff --git a/frontend/src/landing/assets/VK_light_theme_mobile.svg b/frontend/src/pages/landing/assets/VK_light_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/VK_light_theme_mobile.svg rename to frontend/src/pages/landing/assets/VK_light_theme_mobile.svg diff --git a/frontend/src/landing/assets/YouTube_dark_theme.svg b/frontend/src/pages/landing/assets/YouTube_dark_theme.svg similarity index 100% rename from frontend/src/landing/assets/YouTube_dark_theme.svg rename to frontend/src/pages/landing/assets/YouTube_dark_theme.svg diff --git a/frontend/src/landing/assets/YouTube_dark_theme_mobile.svg b/frontend/src/pages/landing/assets/YouTube_dark_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/YouTube_dark_theme_mobile.svg rename to frontend/src/pages/landing/assets/YouTube_dark_theme_mobile.svg diff --git a/frontend/src/landing/assets/YouTube_light_theme.svg b/frontend/src/pages/landing/assets/YouTube_light_theme.svg similarity index 100% rename from frontend/src/landing/assets/YouTube_light_theme.svg rename to frontend/src/pages/landing/assets/YouTube_light_theme.svg diff --git a/frontend/src/landing/assets/YouTube_light_theme_mobile.svg b/frontend/src/pages/landing/assets/YouTube_light_theme_mobile.svg similarity index 100% rename from frontend/src/landing/assets/YouTube_light_theme_mobile.svg rename to frontend/src/pages/landing/assets/YouTube_light_theme_mobile.svg diff --git a/frontend/src/landing/assets/fonts/NunitoSans_10pt-Bold.ttf b/frontend/src/pages/landing/assets/fonts/NunitoSans_10pt-Bold.ttf similarity index 100% rename from frontend/src/landing/assets/fonts/NunitoSans_10pt-Bold.ttf rename to frontend/src/pages/landing/assets/fonts/NunitoSans_10pt-Bold.ttf diff --git a/frontend/src/landing/assets/fonts/NunitoSans_10pt-Light.ttf b/frontend/src/pages/landing/assets/fonts/NunitoSans_10pt-Light.ttf similarity index 100% rename from frontend/src/landing/assets/fonts/NunitoSans_10pt-Light.ttf rename to frontend/src/pages/landing/assets/fonts/NunitoSans_10pt-Light.ttf diff --git a/frontend/src/landing/assets/fonts/NunitoSans_10pt-SemiBold.ttf b/frontend/src/pages/landing/assets/fonts/NunitoSans_10pt-SemiBold.ttf similarity index 100% rename from frontend/src/landing/assets/fonts/NunitoSans_10pt-SemiBold.ttf rename to frontend/src/pages/landing/assets/fonts/NunitoSans_10pt-SemiBold.ttf diff --git a/frontend/src/landing/custom-colors.scss b/frontend/src/pages/landing/custom-colors.scss similarity index 100% rename from frontend/src/landing/custom-colors.scss rename to frontend/src/pages/landing/custom-colors.scss diff --git a/frontend/src/landing/landing.scss b/frontend/src/pages/landing/landing.scss similarity index 100% rename from frontend/src/landing/landing.scss rename to frontend/src/pages/landing/landing.scss diff --git a/frontend/src/pages/landing/checked.svg b/frontend/src/pages/old-landing/checked.svg similarity index 100% rename from frontend/src/pages/landing/checked.svg rename to frontend/src/pages/old-landing/checked.svg diff --git a/frontend/src/pages/landing/index.jsx b/frontend/src/pages/old-landing/index.jsx similarity index 100% rename from frontend/src/pages/landing/index.jsx rename to frontend/src/pages/old-landing/index.jsx diff --git a/frontend/src/pages/landing/index.module.css b/frontend/src/pages/old-landing/index.module.css similarity index 100% rename from frontend/src/pages/landing/index.module.css rename to frontend/src/pages/old-landing/index.module.css diff --git a/frontend/src/routes.js b/frontend/src/routes.js index 782e0e63..4981eb86 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -48,7 +48,7 @@ export default { // OAuth oAuthPath: () => [apiPath, 'oauth'].join('/'), - newLandingPath: () => '/landing', + oldLandingPath: () => '/oldLanding', homePagePath: () => '/editor', aboutPagePath: () => '/about', profilePagePath: (username = ':username') => `/u/${username}`, From 0a35d3fb29b09f5daaaf5cbbd135699a9b2b9784 Mon Sep 17 00:00:00 2001 From: bobronaud Date: Thu, 29 Feb 2024 16:09:43 +0300 Subject: [PATCH 2/6] add button to code without reg --- frontend/src/pages/landing/Landing.jsx | 35 +++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/landing/Landing.jsx b/frontend/src/pages/landing/Landing.jsx index ba295de7..500c8f9e 100644 --- a/frontend/src/pages/landing/Landing.jsx +++ b/frontend/src/pages/landing/Landing.jsx @@ -1,8 +1,14 @@ import { Link } from 'react-router-dom'; -import { Button, Col, Container, Image, Row } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; import { useEffect, useRef } from 'react'; +import { useDispatch } from 'react-redux'; +import { useNavigate } from 'react-router-dom'; + +import { Button, Col, Container, Image, Row } from 'react-bootstrap'; + +import { useAuth } from '../../hooks'; import routes from '../../routes.js'; +import { actions } from '../../slices/modalSlice'; import Faq from './Faq.jsx'; import Header from './Header.jsx'; import Footer from './Footer.jsx'; @@ -23,9 +29,20 @@ import Template from './assets/Icons=Template.svg'; import ImageUnderCarousel from './assets/ReadyAssets.jpeg'; function NewLanding() { + const { isLoggedIn } = useAuth(); + const navigate = useNavigate(); + const dispatch = useDispatch(); const { t } = useTranslation(); const advantagesRef = useRef(); + const handleCodeWithoutRegButton = () => { + if (isLoggedIn) { + navigate(routes.myProfilePagePath()); + return; + } + dispatch(actions.openModal({ type: 'newSnippet' })); + }; + const horizontalScroll = () => { const el = advantagesRef.current; if (el) { @@ -92,6 +109,15 @@ function NewLanding() { {t('landing.startCoding')} + + +
@@ -483,6 +509,13 @@ function NewLanding() { > {t('landing.startCoding')} + From d9ec39ecd84dad9c9dada712c518a547277c0cd0 Mon Sep 17 00:00:00 2001 From: bobronaud Date: Thu, 29 Feb 2024 20:00:20 +0300 Subject: [PATCH 3/6] add styles to buttons start code --- frontend/src/pages/landing/Landing.jsx | 26 +++++++++------ frontend/src/pages/landing/custom-colors.scss | 32 ++++++++++++------- frontend/src/pages/landing/landing.scss | 10 ++++++ 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/frontend/src/pages/landing/Landing.jsx b/frontend/src/pages/landing/Landing.jsx index 500c8f9e..11c98cb3 100644 --- a/frontend/src/pages/landing/Landing.jsx +++ b/frontend/src/pages/landing/Landing.jsx @@ -98,21 +98,21 @@ function NewLanding() {
- - + + - + + + + + - - - - - - + - - - - - + {t('profileActions.signUp')} + + + diff --git a/frontend/src/pages/landing/assets/LogoHeaderDarkTheme.svg b/frontend/src/pages/landing/assets/LogoHeaderDarkTheme.svg index 11b9c2d1..61a7853d 100644 --- a/frontend/src/pages/landing/assets/LogoHeaderDarkTheme.svg +++ b/frontend/src/pages/landing/assets/LogoHeaderDarkTheme.svg @@ -1,4 +1,4 @@ - + diff --git a/frontend/src/pages/landing/assets/LogoHeaderLightTheme.svg b/frontend/src/pages/landing/assets/LogoHeaderLightTheme.svg index ef082d60..d8f210ee 100644 --- a/frontend/src/pages/landing/assets/LogoHeaderLightTheme.svg +++ b/frontend/src/pages/landing/assets/LogoHeaderLightTheme.svg @@ -1,4 +1,4 @@ - + From 1b0f45a0d7136d2e05400011cdd120e7c398b1df Mon Sep 17 00:00:00 2001 From: bobronaud Date: Mon, 4 Mar 2024 14:57:27 +0300 Subject: [PATCH 6/6] fix logo`s theme switching --- frontend/src/pages/landing/Header.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/landing/Header.jsx b/frontend/src/pages/landing/Header.jsx index 33e42eee..d375ce09 100644 --- a/frontend/src/pages/landing/Header.jsx +++ b/frontend/src/pages/landing/Header.jsx @@ -16,9 +16,9 @@ import './custom-colors.scss'; function Header() { const { t } = useTranslation(); - const { ternaryDarkMode } = useTernaryDarkMode(); + const { isDarkMode } = useTernaryDarkMode(); - const logo = ternaryDarkMode === 'light' ? RunItLogoLight : RunItLogoDark; + const logo = isDarkMode ? RunItLogoDark : RunItLogoLight; return (