diff --git a/build/1.11.8/images/ai_bg_low.d8292556.png b/build/1.11.8/images/ai_bg_low.d8292556.png new file mode 100644 index 000000000..097f385e9 Binary files /dev/null and b/build/1.11.8/images/ai_bg_low.d8292556.png differ diff --git a/src/Brands/bluehost/bluehost-logo.svg b/src/Brands/bluehost/bluehost-logo.svg new file mode 100644 index 000000000..50304ada3 --- /dev/null +++ b/src/Brands/bluehost/bluehost-logo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/OnboardingSPA/components/Button/ButtonNext/stylesheet.scss b/src/OnboardingSPA/components/Button/ButtonNext/stylesheet.scss index 96d85ed9f..e146b43ae 100644 --- a/src/OnboardingSPA/components/Button/ButtonNext/stylesheet.scss +++ b/src/OnboardingSPA/components/Button/ButtonNext/stylesheet.scss @@ -5,7 +5,7 @@ color: var(--nfd-onboarding-secondary); width: 80px; height: 50px; - font-size: 15px; + font-size: clamp(0.5rem, 0.3864rem + 0.5682vw, 1.75rem); border-radius: 8px; padding: 16px; @@ -17,5 +17,6 @@ color: var(--nfd-onboarding-secondary); } } + } } diff --git a/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss b/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss index 6c55b39b3..41463214d 100644 --- a/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss +++ b/src/OnboardingSPA/components/Button/NextButtonSiteGen/stylesheet.scss @@ -1,11 +1,10 @@ .nfd-onboarding-button { &--site-gen-next { - width: 164px; height: 50px; display: flex; cursor: pointer; - margin-top: 24px; + padding: 0 16px; text-align: center; border-radius: 8px; align-items: center; @@ -15,18 +14,16 @@ font-size: clamp(0.5rem, 0.3864rem + 0.5682vw, 1.75rem); @media (min-width: 2600px ) { - width: 250px; height: 76px; } @media (max-width: #{ ($break-small) }) { - width: 100px; - height: 30px; margin-top: 10px; + font-size: 16px; } &--disabled { - background-color: rgba(var(--nfd-onboarding-primary-rgb), 0.4); + background-color: rgba(var(--nfd-onboarding-primary-rgb), 0.6) !important; &:hover { cursor: not-allowed; diff --git a/src/OnboardingSPA/components/CardWithOptions/stylesheet.scss b/src/OnboardingSPA/components/CardWithOptions/stylesheet.scss index 3a1e8b2f9..cee7bd97f 100644 --- a/src/OnboardingSPA/components/CardWithOptions/stylesheet.scss +++ b/src/OnboardingSPA/components/CardWithOptions/stylesheet.scss @@ -4,12 +4,17 @@ $background-color: var(--nfd-onboarding-card-background); margin: 8px; max-width: 90vw; - padding: 24px 12px; + padding: 24px 16px; border-radius: 12px; background-color: $background-color; width: clamp(18.75rem, 22.6136rem + 5.6818vw, 31.25rem); box-shadow: 3px 3px 5px rgba(var(--nfd-onboarding-primary-rgb), $alpha: 0.05); + @media (max-width: #{ ($break-large) }) { + margin: 12px; + padding: 12px 6px; + } + &__title { color: var(--nfd-onboarding-primary); margin: 16px; diff --git a/src/OnboardingSPA/components/Footer/components/SiteGenFooter/index.js b/src/OnboardingSPA/components/Footer/components/SiteGenFooter/index.js index 793f63d04..aea5f1aa3 100644 --- a/src/OnboardingSPA/components/Footer/components/SiteGenFooter/index.js +++ b/src/OnboardingSPA/components/Footer/components/SiteGenFooter/index.js @@ -1,13 +1,39 @@ +import { __ } from '@wordpress/i18n'; +import { useSelect } from '@wordpress/data'; import { Fill } from '@wordpress/components'; -import { FOOTER_SITEGEN, FOOTER_START } from '../../../../../constants'; +import { useViewportMatch } from '@wordpress/compose'; + import ToggleDarkMode from '../../../ToggleDarkMode'; +import { store as nfdOnboardingStore } from '../../../../store'; +import { + FOOTER_SITEGEN, + FOOTER_START, + FOOTER_END, +} from '../../../../../constants'; +import NextButtonSiteGen from '../../../Button/NextButtonSiteGen'; const SiteGenFooter = () => { + const isLargeViewport = useViewportMatch( 'small' ); + const { footerNavEnabled } = useSelect( ( select ) => { + return { + footerNavEnabled: + select( nfdOnboardingStore ).getFooterNavEnabled(), + }; + } ); + return ( <> + { ! isLargeViewport && ( + + + + ) } ); }; diff --git a/src/OnboardingSPA/components/Footer/stylesheet.scss b/src/OnboardingSPA/components/Footer/stylesheet.scss index 2564f6d92..3a6c4dad3 100644 --- a/src/OnboardingSPA/components/Footer/stylesheet.scss +++ b/src/OnboardingSPA/components/Footer/stylesheet.scss @@ -14,9 +14,24 @@ &__end { position: absolute; right: 25px; + bottom: 25px; + display: flex; + align-items: center; + justify-content: center; + + @media (max-width: #{ ($break-small) }) { + right: 16px; + bottom: 20px; + } } &--background { background-color: rgba(var(--nfd-onboarding-secondary-rgb), 0.75); } + + @media (max-width: #{ ($break-small) }) { + backdrop-filter: blur(2px); + background: rgba(var(--nfd-onboarding-secondary-rgb), 0.5); + border-top: 1px solid rgba(var(--nfd-onboarding-primary-rgb), 0.25); + } } diff --git a/src/OnboardingSPA/components/Heading/AIHeading/stylesheet.scss b/src/OnboardingSPA/components/Heading/AIHeading/stylesheet.scss index 51c3e5f17..5efc1b434 100644 --- a/src/OnboardingSPA/components/Heading/AIHeading/stylesheet.scss +++ b/src/OnboardingSPA/components/Heading/AIHeading/stylesheet.scss @@ -1,5 +1,6 @@ .ai-heading { + width: 100%; display: flex; margin-bottom: 20px; align-items: center; @@ -18,7 +19,7 @@ margin: 10px; line-height: 1.5; font-weight: 500; - font-size: 1.2rem; color: var(--nfd-onboarding-primary); + font-size: clamp(1.2rem, 1.1rem + 0.273vw, 2.5rem); } } diff --git a/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/index.js b/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/index.js new file mode 100644 index 000000000..88e9a6cd2 --- /dev/null +++ b/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/index.js @@ -0,0 +1,23 @@ +/** + * Interface Cards with standard design. + * + * @param {Object} root0 + * @param {string} root0.title + * @param {string} root0.subtitle + */ + +const HeadingWithSubHeading = ( { title, subtitle } ) => { + return ( +
+

{ title }

+ { subtitle && ( +
+ { subtitle } +
+
+ ) } +
+ ); +}; + +export default HeadingWithSubHeading; diff --git a/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/stylesheet.scss b/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/stylesheet.scss new file mode 100644 index 000000000..a953cf381 --- /dev/null +++ b/src/OnboardingSPA/components/HeadingWithSubHeading/SiteGen/stylesheet.scss @@ -0,0 +1,34 @@ +.nfd-onboarding-step { + + &__heading { + color: var(--nfd-onboarding-primary); + width: 96%; + margin: 50px 0 50px; + line-height: 1; + + &__title { + font-weight: 300; + text-align: center; + color: var(--nfd-onboarding-primary); + margin: 35px !important; + font-size: 30px; + } + + &__subtitle { + color: var(--nfd-onboarding-primary) !important; + font-weight: 300; + text-align: center; + font-size: 20px; + } + + &__icon { + display: inline-flex; + width: 100px; + height: 17px; + background-image: var(--nfd-onboarding-logo-name); + background-size: contain; + background-repeat: no-repeat; + filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(215deg) brightness(200%) contrast(200%); + } + } +} diff --git a/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/stylesheet.scss b/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/stylesheet.scss index 71ecb8aaa..1782a6ac9 100644 --- a/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/stylesheet.scss +++ b/src/OnboardingSPA/components/ImageUploader/components/ImageUploaderWithText/stylesheet.scss @@ -1,10 +1,15 @@ .nfd-onboarding-image-uploader { &--with-text { - width: 600px; + width: 40vw; margin: 16px; border: 1.25px dashed var(--nfd-onboarding-site-logo-border); + @media (max-width: #{ ($break-large) }) { + width: 80vw; + margin: 24px; + } + &--not-dashed { border: 1.25px solid rgba(var(--nfd-onboarding-primary-rgb), 0.5); align-items: stretch; @@ -92,7 +97,7 @@ width: 130px; height: 100px; object-fit: cover; - border-radius: 8px; + border-radius: 4px; } &__details { @@ -105,7 +110,7 @@ &__filename { margin: 0; margin-bottom: 8px; - width: 300px; + width: 28vw; font-size: clamp(0.75rem, 0.6591rem + 0.4545vw, 1.75rem); } @@ -125,7 +130,6 @@ font-size: clamp(0.5rem, 0.4091rem + 0.4545vw, 1.5rem); font-style: normal; font-weight: 510; - margin-right: 24px; color: var(--nfd-onboarding-primary); background-color: transparent; border: none; diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js index db4d1fb09..61787425d 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js @@ -9,6 +9,7 @@ import themeToggleHOC from '../themeToggleHOC'; import NewfoldInterfaceSkeleton from '../index'; import { ThemeProvider } from '../../ThemeContextProvider'; import { store as nfdOnboardingStore } from '../../../store'; +import classNames from 'classnames'; import { setFlow } from '../../../utils/api/flow'; import { generateSiteGenMeta, @@ -24,6 +25,15 @@ const ThemedNewfoldInterfaceSkeleton = themeToggleHOC( ); const SiteGen = () => { + const { newfoldBrand } = useSelect( ( select ) => { + return { + newfoldBrand: select( nfdOnboardingStore ).getNewfoldBrand(), + }; + }, [] ); + + useEffect( () => { + document.body.classList.add( `nfd-brand-${ newfoldBrand }` ); + }, [ newfoldBrand ] ); const location = useLocation(); const { currentData } = useSelect( ( select ) => { @@ -117,7 +127,10 @@ const SiteGen = () => { } content={ } sidebar={ } diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js index 76eb1f59f..6582ca763 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/index.js @@ -14,9 +14,19 @@ import { forwardRef, useEffect } from '@wordpress/element'; import { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { useMergeRefs } from '@wordpress/compose'; +// import bgAiImg from '../../static/images/ai_bg.png'; function useHTMLClass( className ) { useEffect( () => { + // eslint-disable-next-line no-undef + // const mainImage = new Image(); + // mainImage.src = bgAiImg; + // mainImage.onload = () => { + // document.querySelector( + // '.nfd-onboarding-skeleton--sitegen' + // ).style.backgroundImage = `url('${ bgAiImg }')`; + // }; + const element = document && document.querySelector( `html:not(.${ className })` ); if ( ! element ) { diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/style.scss b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/style.scss index 63a890554..4922d103b 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/style.scss +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/style.scss @@ -181,7 +181,7 @@ html.nfd-interface-interface-skeleton__html-container { .nfd-onboarding-skeleton { &--sitegen { - background-image: var(--sitegen-background); + background: var(--sitegen-background); background-repeat: no-repeat; background-size: cover; @@ -190,3 +190,4 @@ html.nfd-interface-interface-skeleton__html-container { } } } + diff --git a/src/OnboardingSPA/components/StartOptions/index.js b/src/OnboardingSPA/components/StartOptions/index.js new file mode 100644 index 000000000..26b180dfb --- /dev/null +++ b/src/OnboardingSPA/components/StartOptions/index.js @@ -0,0 +1,93 @@ +import { SITEGEN_FLOW } from '../../data/flows/constants'; +import { resolveGetDataForFlow } from '../../data/flows'; +import { useSelect, useDispatch } from '@wordpress/data'; +import { validateFlow } from '../../data/flows/utils'; +import { useNavigate } from 'react-router-dom'; +import { store as nfdOnboardingStore } from '../../store'; + +const StartOptions = ( { questionnaire, oldFlow, options } ) => { + const navigate = useNavigate(); + const { brandConfig, migrationUrl } = useSelect( ( select ) => { + return { + brandConfig: select( nfdOnboardingStore ).getNewfoldBrandConfig(), + migrationUrl: select( nfdOnboardingStore ).getMigrationUrl(), + }; + } ); + const { + updateAllSteps, + updateTopSteps, + updateRoutes, + updateDesignRoutes, + updateInitialize, + } = useDispatch( nfdOnboardingStore ); + + const switchFlow = ( newFlow ) => { + if ( ! validateFlow( brandConfig, newFlow ) ) { + return false; + } + const currentFlow = window.nfdOnboarding.currentFlow; + const getData = resolveGetDataForFlow( newFlow ); + const data = getData(); + updateAllSteps( data.steps ); + updateTopSteps( data?.topSteps ); + updateRoutes( data.routes ); + updateDesignRoutes( data?.designRoutes ); + if ( SITEGEN_FLOW !== currentFlow ) { + window.nfdOnboarding.oldFlow = currentFlow; + } + window.nfdOnboarding.currentFlow = newFlow; + updateInitialize( true ); + navigate( data.steps[ 1 ].path ); + }; + const selectFlow = ( flow ) => { + switch ( flow ) { + case 'onboarding': + return switchFlow( oldFlow ); + case 'ai': + return switchFlow( SITEGEN_FLOW ); + case 'migration': + return window.open( migrationUrl, '_blank' ); + } + }; + return ( +
+

+ { questionnaire } +

+
+ { options.map( ( tab, idx ) => { + return ( +
{ + selectFlow( tab.flow ); + } } + onKeyDown={ () => { + { + selectFlow( tab.flow ); + } + } } + > +

+ { tab.span && ( + + { tab.span } + + ) } + { tab.title } +

+

+ { tab.subtitle } +

+
+ ); + } ) } +
+
+ ); +}; + +export default StartOptions; diff --git a/src/OnboardingSPA/components/StartOptions/stylesheet.scss b/src/OnboardingSPA/components/StartOptions/stylesheet.scss new file mode 100644 index 000000000..8fbd1c460 --- /dev/null +++ b/src/OnboardingSPA/components/StartOptions/stylesheet.scss @@ -0,0 +1,73 @@ +.nfd-onboarding-sitegen-options { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + &__questionnaire { + color: var(--nfd-onboarding-primary); + font-weight: 500; + text-align: center; + font-size: 18px; + } + + &__container { + display: flex; + justify-content: center; + flex-wrap: wrap; + + &__options { + flex: 1; + min-width: 310px; + height: 130px; + border: 1px solid #9ca2a7; + text-align: center; + padding: 24px; + padding-top: 50px; + margin: 20px; + border-radius: 16px; + color: var(--nfd-onboarding-primary); + font-size: 20px; + + &__span { + background-color: var(--nfd-onboarding-white); + color: rgb(6, 0, 0); + padding-right: 6px; + padding-left: 5px; + margin-right: 5px; + border: 1px solid #fff; + border-radius: 8px; + } + } + + &__options:hover { + background-color: rgba(6, 0, 0, 0.3); + cursor: pointer; + outline: 2px solid #9ca2a7; + transition: 0.1s linear; + } + + &__heading { + color: var(--nfd-onboarding-primary); + width: 96%; + margin: 50px 0 50px; + line-height: 1; + + &__title { + font-weight: 510; + text-align: center; + color: var(--nfd-onboarding-primary); + font-size: 20px; + line-height: 20px; + } + + &__subtitle { + color: var(--nfd-onboarding-primary) !important; + font-weight: 510; + text-align: center; + font-size: 14px; + line-height: 16.71px; + } + } + } +} diff --git a/src/OnboardingSPA/components/ToggleDarkMode/stylesheet.scss b/src/OnboardingSPA/components/ToggleDarkMode/stylesheet.scss index d669b3816..fa6c22133 100644 --- a/src/OnboardingSPA/components/ToggleDarkMode/stylesheet.scss +++ b/src/OnboardingSPA/components/ToggleDarkMode/stylesheet.scss @@ -1,7 +1,7 @@ .nfd-onboarding-toggle__theme { margin-left: 25px; margin-top: 10px; - margin-bottom: 10px; + margin-bottom: 25px; &__button { width: 60px; @@ -16,4 +16,9 @@ background: var(--sitegen-toggle-theme-icon-dark); } } + + @media (max-width: #{ ($break-small) }) { + margin-left: 16px; + margin-bottom: 16px; + } } diff --git a/src/OnboardingSPA/static/images/sitegen/sitegen-bg.png b/src/OnboardingSPA/static/images/ai_bg.png similarity index 100% rename from src/OnboardingSPA/static/images/sitegen/sitegen-bg.png rename to src/OnboardingSPA/static/images/ai_bg.png diff --git a/src/OnboardingSPA/static/images/ai_bg_low.png b/src/OnboardingSPA/static/images/ai_bg_low.png new file mode 100644 index 000000000..097f385e9 Binary files /dev/null and b/src/OnboardingSPA/static/images/ai_bg_low.png differ diff --git a/src/OnboardingSPA/steps/SiteGen/Building/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/Building/stylesheet.scss index 325405a1c..4e0fad666 100644 --- a/src/OnboardingSPA/steps/SiteGen/Building/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/Building/stylesheet.scss @@ -31,13 +31,13 @@ } &--header { - height: 80px; + height: 10vh; width: 90vw; } &--body { width: 90vw; - height: 500px; + height: 80vh; } &--footer { @@ -48,12 +48,12 @@ &_left { width: 55vw; - height: 300px; + height: 40vh; } &_right { width: 33vw; - height: 300px; + height: 40vh; } } } diff --git a/src/OnboardingSPA/steps/SiteGen/Experience/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/Experience/stylesheet.scss index ee5e0c38f..9935fe3c1 100644 --- a/src/OnboardingSPA/steps/SiteGen/Experience/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/Experience/stylesheet.scss @@ -3,4 +3,8 @@ align-items: center; flex-direction: column; justify-content: center; + + @media (max-width: #{ ($break-large) }) { + margin-bottom: 70px; + } } diff --git a/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js b/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js index 12a0c97f3..6a0d1d46b 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js +++ b/src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js @@ -1,3 +1,4 @@ +import { useViewportMatch } from '@wordpress/compose'; import { useSelect, useDispatch } from '@wordpress/data'; import { useEffect, useState } from '@wordpress/element'; @@ -12,6 +13,7 @@ import NextButtonSiteGen from '../../../components/Button/NextButtonSiteGen'; const SiteGenSiteDetails = () => { const content = getContents(); + const isLargeViewport = useViewportMatch( 'small' ); const [ customerInput, setCustomerInput ] = useState(); const { currentData } = useSelect( ( select ) => { @@ -22,6 +24,7 @@ const SiteGenSiteDetails = () => { } ); const { + setFooterNavEnabled, setIsHeaderEnabled, setSidebarActiveView, setHeaderActiveView, @@ -36,14 +39,16 @@ const SiteGenSiteDetails = () => { setDrawerActiveView( false ); if ( currentData.sitegen.siteDetails?.prompt !== '' ) { - setCustomerInput( currentData.sitegen.siteDetails.prompt ); + return setCustomerInput( currentData.sitegen.siteDetails.prompt ); } + setFooterNavEnabled( false ); }, [] ); - const checkAndNavigate = () => { + useEffect( () => { + setFooterNavEnabled( customerInput !== '' ); currentData.sitegen.siteDetails.prompt = customerInput; setCurrentOnboardingData( currentData ); - }; + }, [ customerInput ] ); return ( @@ -57,17 +62,18 @@ const SiteGenSiteDetails = () => { customerInput={ customerInput } setCustomerInput={ setCustomerInput } /> -
- -
+ { isLargeViewport && ( +
+ +
+ ) }
diff --git a/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss index dd264c6c3..4ea61864c 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/SiteDetails/stylesheet.scss @@ -1,7 +1,13 @@ .nfd-sg-site-details { + width: 40vw; + + @media (max-width: #{ ($break-large) }) { + width: 80vw; + } + @media (max-width: #{ ($break-small) }) { - margin: 20px; + margin: 10px; } &-endrow { diff --git a/src/OnboardingSPA/steps/SiteGen/SiteLogo/contents.js b/src/OnboardingSPA/steps/SiteGen/SiteLogo/contents.js index 53335f24d..39629f9d8 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteLogo/contents.js +++ b/src/OnboardingSPA/steps/SiteGen/SiteLogo/contents.js @@ -14,6 +14,7 @@ const getContents = () => { }, buttons: { skip: __( 'Skip for now', 'wp-module-onboarding' ), + next: __( 'Next', 'wp-module-onboarding' ), }, }; }; diff --git a/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js b/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js index 81f2bafd9..573de8f2d 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js +++ b/src/OnboardingSPA/steps/SiteGen/SiteLogo/index.js @@ -1,18 +1,19 @@ -import CommonLayout from '../../../components/Layouts/Common'; - +import { useViewportMatch } from '@wordpress/compose'; import { useEffect, useState } from '@wordpress/element'; import { useSelect, useDispatch } from '@wordpress/data'; -import { store as nfdOnboardingStore } from '../../../store'; -import { HEADER_SITEGEN } from '../../../../constants'; - import getContents from './contents'; -import ImageUploaderWithText from '../../../components/ImageUploader/components/ImageUploaderWithText'; -import ButtonNext from '../../../components/Button/ButtonNext'; +import { HEADER_SITEGEN } from '../../../../constants'; import SkipButton from '../../../components/SkipButton'; +import { store as nfdOnboardingStore } from '../../../store'; +import AIHeading from '../../../components/Heading/AIHeading'; +import CommonLayout from '../../../components/Layouts/Common'; +import NextButtonSiteGen from '../../../components/Button/NextButtonSiteGen'; +import ImageUploaderWithText from '../../../components/ImageUploader/components/ImageUploaderWithText'; const SiteGenSiteLogo = () => { const [ siteLogo, setSiteLogo ] = useState(); + const isLargeViewport = useViewportMatch( 'small' ); const { currentData } = useSelect( ( select ) => { return { @@ -22,6 +23,7 @@ const SiteGenSiteLogo = () => { } ); const { + setFooterNavEnabled, setIsHeaderEnabled, setSidebarActiveView, setHeaderActiveView, @@ -39,6 +41,7 @@ const SiteGenSiteLogo = () => { }; setCurrentOnboardingData( currentDataCopy ); setSiteLogo( undefined ); + setFooterNavEnabled( false ); }; useEffect( () => { @@ -47,8 +50,9 @@ const SiteGenSiteLogo = () => { setHeaderActiveView( HEADER_SITEGEN ); setDrawerActiveView( false ); if ( currentData.sitegen.siteLogo?.id !== 0 ) { - setSiteLogo( currentData.sitegen.siteLogo ); + return setSiteLogo( currentData.sitegen.siteLogo ); } + setFooterNavEnabled( false ); }, [] ); useEffect( () => { @@ -59,6 +63,7 @@ const SiteGenSiteLogo = () => { currentDataCopy.sitegen.siteLogo.fileName = siteLogo.fileName; currentDataCopy.sitegen.siteLogo.fileSize = siteLogo.fileSize; setCurrentOnboardingData( currentDataCopy ); + setFooterNavEnabled( siteLogo.id !== 0 ); } }, [ siteLogo ] ); @@ -69,12 +74,7 @@ const SiteGenSiteLogo = () => { className="nfd-onboarding-step--site-gen__site-logo" >
-
-
-

- { content.heading } -

-
+ { className="nfd-onboarding-step--site-gen__site-logo__container__buttons__skip" text={ content.buttons.skip } /> - + { isLargeViewport && ( + + ) }
diff --git a/src/OnboardingSPA/steps/SiteGen/SiteLogo/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/SiteLogo/stylesheet.scss index be4411457..9cbc2c08d 100644 --- a/src/OnboardingSPA/steps/SiteGen/SiteLogo/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/SiteLogo/stylesheet.scss @@ -9,41 +9,22 @@ flex-direction: column; align-items: center; justify-content: center; - width: 600px; + width: 40vw; - &__heading { - display: flex; - flex-direction: row; - align-items: center; - justify-content: flex-start; - width: 100%; - - &__animation { - background-image: var(--sitegen-ai-animation); - background-repeat: no-repeat; - background-size: contain; - width: 83px; - height: 72px; - } - - &__text { - color: var(--nfd-onboarding-primary); - font-size: clamp(0.875rem, 0.7727rem + 0.5114vw, 2rem); - margin-left: 15px; - white-space: normal; - line-height: 1; - } + @media (max-width: #{ ($break-large) }) { + width: 80vw; } &__buttons { + width: 108%; display: flex; + padding: 16px; flex-direction: row; align-items: center; justify-content: flex-end; - padding: 16px; &__skip { - font-size: clamp(0.5rem, 0.4091rem + 0.4545vw, 1.5rem); + font-size: clamp(0.6rem, 0.755rem + 0.227vw, 1.3rem); font-style: normal; font-weight: 510; margin-right: 24px; @@ -52,6 +33,16 @@ text-decoration: underline; color: var(--nfd-onboarding-primary); } + + @media (max-width: #{ ($break-small) }) { + margin-right: 0; + } + } + + @media (max-width: #{ ($break-small) }) { + justify-content: center; + margin-bottom: 50px; + margin-right: 0; } } diff --git a/src/OnboardingSPA/steps/SiteGen/SocialMedia/contents.js b/src/OnboardingSPA/steps/SiteGen/SocialMedia/contents.js index 0d54ce9ee..0db9b1e39 100644 --- a/src/OnboardingSPA/steps/SiteGen/SocialMedia/contents.js +++ b/src/OnboardingSPA/steps/SiteGen/SocialMedia/contents.js @@ -17,6 +17,7 @@ const getContents = () => { facebookButton: __( 'Connect Facebook', 'wp-module-onboarding' ), buttons: { skip: __( 'Skip for now', 'wp-module-onboarding' ), + next: __( 'Next', 'wp-module-onboarding' ), }, }; }; diff --git a/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js b/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js index c57b86447..8af53e96e 100644 --- a/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js +++ b/src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js @@ -1,15 +1,18 @@ -import CommonLayout from '../../../components/Layouts/Common'; - +import { useDispatch } from '@wordpress/data'; import { useEffect } from '@wordpress/element'; +import { useViewportMatch } from '@wordpress/compose'; -import { useDispatch } from '@wordpress/data'; -import { store as nfdOnboardingStore } from '../../../store'; -import { HEADER_SITEGEN } from '../../../../constants'; import getContents from './contents'; -import ButtonNext from '../../../components/Button/ButtonNext'; +import { HEADER_SITEGEN } from '../../../../constants'; import SkipButton from '../../../components/SkipButton'; +import { store as nfdOnboardingStore } from '../../../store'; +import CommonLayout from '../../../components/Layouts/Common'; +import AIHeading from '../../../components/Heading/AIHeading'; +import NextButtonSiteGen from '../../../components/Button/NextButtonSiteGen'; const SiteGenSiteSocialMedia = () => { + const isLargeViewport = useViewportMatch( 'small' ); + const { setIsHeaderEnabled, setSidebarActiveView, @@ -31,15 +34,10 @@ const SiteGenSiteSocialMedia = () => { className="nfd-onboarding-step--site-gen__social-media" >
-
-
-

- { content.heading } -

-
+
- { content.facebookTitle } + { content.facebookTitle }

{ content.facebookDesc }

@@ -54,7 +52,12 @@ const SiteGenSiteSocialMedia = () => { className="nfd-onboarding-step--site-gen__social-media__container__buttons__skip" text={ content.buttons.skip } /> - + { isLargeViewport && ( + + ) }
diff --git a/src/OnboardingSPA/steps/SiteGen/SocialMedia/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/SocialMedia/stylesheet.scss index f72ce8510..43901277e 100644 --- a/src/OnboardingSPA/steps/SiteGen/SocialMedia/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/SocialMedia/stylesheet.scss @@ -6,38 +6,20 @@ &__container { - &__heading { - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - - &__animation { - background-image: var(--sitegen-ai-animation); - background-repeat: no-repeat; - background-size: contain; - width: 83px; - height: 72px; - } - - &__text { - color: var(--nfd-onboarding-primary); - font-size: clamp(0.875rem, 0.7727rem + 0.5114vw, 2rem); - margin-left: 15px; - white-space: normal; - line-height: 1; - } - } + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; &__buttons { + width: 95%; display: flex; - flex-direction: row; align-items: center; justify-content: flex-end; padding: 16px; &__skip { - font-size: clamp(0.5rem, 0.4091rem + 0.4545vw, 1.5rem); + font-size: clamp(0.6rem, 0.755rem + 0.227vw, 1.3rem); font-style: normal; font-weight: 510; margin-right: 24px; @@ -47,31 +29,56 @@ color: var(--nfd-onboarding-primary); } } + + @media (max-width: #{ ($break-small) }) { + justify-content: center; + margin-bottom: 50px; + } } } &__contain { - width: 600px; margin: 16px; border: 1.25px solid var(--nfd-onboarding-site-logo-border); border-radius: 8px; - padding: 24px; + padding: 30px 35px; display: flex; - flex-direction: row; - justify-content: left; + justify-content: space-between; align-items: left; + width: 40vw; + + @media (max-width: #{ ($break-large) }) { + width: 80vw; + } &__containleft { - width: 400px; + width: 65%; display: flex; flex-direction: column; justify-content: center; color: var(--nfd-onboarding-primary); - font-size: clamp(0.875rem, 0.7727rem + 0.5114vw, 2rem); - margin-left: 15px; + margin-right: 25px; white-space: normal; line-height: 1; + + span { + font-size: clamp(1.1rem, 0.927rem + 0.364vw, 1.8rem); + } + + p { + margin-top: 15px; + font-size: clamp(0.6rem, 0.755rem + 0.227vw, 1.3rem); + + @media (max-width: #{ ($break-small) }) { + text-align: justify; + } + } + + @media (max-width: #{ ($break-small) }) { + width: 100%; + margin-right: 0; + } } &__containright { @@ -89,6 +96,15 @@ border: none; border-radius: 5px; cursor: pointer; + justify-content: center; + + &:hover { + background-color: #0065ea; + } + + @media (max-width: #{ ($break-small) }) { + width: 100%; + } } &__button i { @@ -96,7 +112,12 @@ background-image: var(--facebook-icon); width: 25px; height: 25px; - filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(215deg) brightness(104%) contrast(102%); + filter: brightness(0) saturate(100%) invert(100%) sepia(1%) saturate(376%) hue-rotate(220deg) brightness(120%) contrast(100%); + } + + @media (max-width: #{ ($break-small) }) { + width: 100%; + margin: 30px 0; } } } @@ -105,10 +126,10 @@ &__contain { margin: 8px; + padding: 24px; flex-direction: column; justify-content: center; align-items: center; - width: 85%; } &__containright { diff --git a/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss b/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss index dbe0c868d..90f8a5653 100644 --- a/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss +++ b/src/OnboardingSPA/steps/SiteGen/Welcome/stylesheet.scss @@ -40,9 +40,11 @@ &__image { height: 36px; width: 42px; - background-image: var(--sitegen-ai-icon); - background-repeat: no-repeat; + border-radius: 7px; background-size: cover; + background-repeat: no-repeat; + background-image: var(--sitegen-ai-icon); + box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); @media (max-width: #{ ($break-small) }) { width: 32px; diff --git a/src/OnboardingSPA/steps/TheFork/contents.js b/src/OnboardingSPA/steps/TheFork/contents.js new file mode 100644 index 000000000..e4a75f776 --- /dev/null +++ b/src/OnboardingSPA/steps/TheFork/contents.js @@ -0,0 +1,50 @@ +import { __ } from '@wordpress/i18n'; + +const getContents = () => { + return { + heading: __( 'Welcome to WordPress', 'wp-module-onboarding' ), + subheading: __( 'powered by ', 'wp-module-onboarding' ), + questionnaire: __( + 'Where would you like to start?', + 'wp-module-onboarding' + ), + options: [ + { + title: __( 'Build it myself', 'wp-module-onboarding' ), + subtitle: __( + "We'll stay out of your way.", + 'wp-module-onboarding' + ), + flow: 'onboarding', + }, + { + title: __( ' Website Creator', 'wp-module-onboarding' ), + subtitle: __( + 'Custom Al generated content & design.', + 'wp-module-onboarding' + ), + span: __( 'AI', 'wp-module-onboarding' ), + flow: 'ai', + }, + { + title: __( 'Hire a Pro', 'wp-module-onboarding' ), + subtitle: __( + 'Leave it to our WordPress experts.', + 'wp-module-onboarding' + ), + flow: 'migration', + }, + ], + + importtext: __( + 'Already have a WordPress site you want to import?', + 'wp-module-onboarding' + ), + importlink: __( + 'https://my.bluehost.com/cgi/services/migration', + 'wp-module-onboarding' + ), + }; +}; + +export default getContents; diff --git a/src/OnboardingSPA/steps/TheFork/index.js b/src/OnboardingSPA/steps/TheFork/index.js index f4549419e..7da697a97 100644 --- a/src/OnboardingSPA/steps/TheFork/index.js +++ b/src/OnboardingSPA/steps/TheFork/index.js @@ -1,61 +1,26 @@ import CommonLayout from '../../components/Layouts/Common'; import { useEffect } from '@wordpress/element'; +import { useDispatch } from '@wordpress/data'; -import { useSelect, useDispatch } from '@wordpress/data'; import { store as nfdOnboardingStore } from '../../store'; import { FOOTER_SITEGEN, HEADER_SITEGEN } from '../../../constants'; -import { useNavigate } from 'react-router-dom'; - -import { Button } from '@wordpress/components'; -import { DEFAULT_FLOW, SITEGEN_FLOW } from '../../data/flows/constants'; - -import { resolveGetDataForFlow } from '../../data/flows'; -import { validateFlow } from '../../data/flows/utils'; +import { DEFAULT_FLOW } from '../../data/flows/constants'; +import HeadingWithSubHeading from '../../components/HeadingWithSubHeading/SiteGen/index'; +import StartOptions from '../../components/StartOptions'; +import getContents from './contents'; const TheFork = () => { - const navigate = useNavigate(); - const { brandConfig, migrationUrl } = useSelect( ( select ) => { - return { - brandConfig: select( nfdOnboardingStore ).getNewfoldBrandConfig(), - migrationUrl: select( nfdOnboardingStore ).getMigrationUrl(), - }; - } ); - const { setIsHeaderEnabled, setSidebarActiveView, setHeaderActiveView, setDrawerActiveView, setIsHeaderNavigationEnabled, - updateAllSteps, - updateTopSteps, - updateRoutes, - updateDesignRoutes, - updateInitialize, setFooterActiveView, } = useDispatch( nfdOnboardingStore ); - const switchFlow = ( newFlow ) => { - if ( ! validateFlow( brandConfig, newFlow ) ) { - return false; - } - const currentFlow = window.nfdOnboarding.currentFlow; - const getData = resolveGetDataForFlow( newFlow ); - const data = getData(); - updateAllSteps( data.steps ); - updateTopSteps( data?.topSteps ); - updateRoutes( data.routes ); - updateDesignRoutes( data?.designRoutes ); - if ( SITEGEN_FLOW !== currentFlow ) { - window.nfdOnboarding.oldFlow = currentFlow; - } - window.nfdOnboarding.currentFlow = newFlow; - updateInitialize( true ); - navigate( data.steps[ 1 ].path ); - }; - useEffect( () => { setIsHeaderEnabled( false ); setSidebarActiveView( false ); @@ -68,38 +33,30 @@ const TheFork = () => { const oldFlow = window.nfdOnboarding?.oldFlow ? window.nfdOnboarding.oldFlow : DEFAULT_FLOW; + + const content = getContents(); return ( -

- The Fork -

-
- { validateFlow( brandConfig, SITEGEN_FLOW ) && ( - - ) } - - { migrationUrl && ( - - ) } -
+ + +
+
+ + { content.importtext } +
); }; diff --git a/src/OnboardingSPA/steps/TheFork/stylesheet.scss b/src/OnboardingSPA/steps/TheFork/stylesheet.scss index 2a0641235..84b14e08c 100644 --- a/src/OnboardingSPA/steps/TheFork/stylesheet.scss +++ b/src/OnboardingSPA/steps/TheFork/stylesheet.scss @@ -10,7 +10,16 @@ &__heading { color: var(--nfd-onboarding-primary); - font-size: 70px; + width: 96%; + margin: 50px 0 50px; + line-height: 1; + + &__questionnaire { + color: var(--nfd-onboarding-primary); + font-weight: 500; + text-align: center; + font-size: 18px; + } } &__buttons { @@ -30,6 +39,15 @@ margin: 24px; } } + + &__importsite { + color: var(--nfd-onboarding-primary); + font-weight: 510; + text-align: center; + font-size: 18px; + line-height: 20px; + margin-top: 35px !important; + } } } } diff --git a/src/OnboardingSPA/store/actions.js b/src/OnboardingSPA/store/actions.js index e28d52f62..da6ae43d5 100644 --- a/src/OnboardingSPA/store/actions.js +++ b/src/OnboardingSPA/store/actions.js @@ -189,6 +189,13 @@ export function setHeaderActiveView( view ) { }; } +export function setFooterNavEnabled( navEnabled ) { + return { + type: 'SET_FOOTER_NAV_ENABLED', + navEnabled, + }; +} + export function setFooterActiveView( view ) { return { type: 'SET_FOOTER_ACTIVE_VIEW', diff --git a/src/OnboardingSPA/store/reducer.js b/src/OnboardingSPA/store/reducer.js index 8954a5368..e475ad0e2 100644 --- a/src/OnboardingSPA/store/reducer.js +++ b/src/OnboardingSPA/store/reducer.js @@ -302,11 +302,17 @@ export function queue( state = [], action ) { export function footer( state = { footers, + navEnabled: true, view: FOOTER_SITEGEN, }, action ) { switch ( action.type ) { + case 'SET_FOOTER_NAV_ENABLED': + return { + ...state, + navEnabled: action.navEnabled, + }; case 'SET_FOOTER_ACTIVE_VIEW': return { ...state, diff --git a/src/OnboardingSPA/store/selectors.js b/src/OnboardingSPA/store/selectors.js index db049431d..1df9bb30e 100644 --- a/src/OnboardingSPA/store/selectors.js +++ b/src/OnboardingSPA/store/selectors.js @@ -57,6 +57,10 @@ export function getFooterActiveView( state ) { return state.footer.view; } +export function getFooterNavEnabled( state ) { + return state.footer.navEnabled; +} + /** * Gets current Newfold brand * diff --git a/src/OnboardingSPA/styles/_branding.scss b/src/OnboardingSPA/styles/_branding.scss index 60ed495f0..acc09819c 100644 --- a/src/OnboardingSPA/styles/_branding.scss +++ b/src/OnboardingSPA/styles/_branding.scss @@ -58,6 +58,7 @@ body { --nfd-onboarding-contrast-icon: url(../../Brands/bluehost/dark.svg); --nfd-onboarding-icon: url(../../Brands/bluehost/icon.svg); --nfd-onboarding-logo: url(../../Brands/bluehost/logo.svg); + --nfd-onboarding-logo-name: url(../../Brands/bluehost/bluehost-logo.svg); --nfd-onboarding-primary: #3575d3; --nfd-onboarding-highlighted--rgb: 123, 177, 253; --nfd-onboarding-primary-alt: #2c76dc; @@ -301,6 +302,8 @@ body { } .nfd-onboarding-sitegen-light { + + --sitegen-background: #ededed; --nfd-onboarding-primary: #000; --nfd-onboarding-primary-rgb: 0, 0, 0; --nfd-onboarding-hover: #c3c4c7; @@ -341,5 +344,6 @@ body { --nfd-onboarding-preview-favorite-background: #1E2327; --nfd-onboarding-favorite-fill : #EF4A71; --nfd-onboarding-button-background: #363E4459; + --sitegen-background: url(../static/images/ai_bg.png); } } diff --git a/src/OnboardingSPA/styles/_icons.scss b/src/OnboardingSPA/styles/_icons.scss index d7d075eb6..019614084 100644 --- a/src/OnboardingSPA/styles/_icons.scss +++ b/src/OnboardingSPA/styles/_icons.scss @@ -37,7 +37,8 @@ body { --site-features-wishlist: url(../static/icons/site-features/wishlist.svg); --site-features-comingsoon: url(../static/icons/site-features/comingsoon.svg); - --sitegen-background: url(../static/images/sitegen/sitegen-bg.png); + --sitegen-background: url(../static/images/ai_bg.png); + --sitegen-background-high-res: url(../static/images/ai_bg.png); --sitegen-ai-icon: url(../static/icons/sitegen/sitegen-ai-icon.svg); --sitegen-image-upload-icon: url(../static/icons/sitegen/image-upload.svg); --sitegen-ai-animation: url(../static/images/sitegen/sitegen-ai-animation.gif); diff --git a/src/OnboardingSPA/styles/app.scss b/src/OnboardingSPA/styles/app.scss index 4551395bf..c99563ad3 100644 --- a/src/OnboardingSPA/styles/app.scss +++ b/src/OnboardingSPA/styles/app.scss @@ -46,6 +46,8 @@ @import "../components/AdminBar/stylesheet"; @import "../components/ProgressBar/stylesheet"; @import "../components/Button/ButtonDark/stylesheet"; +@import "../components/HeadingWithSubHeading/SiteGen/stylesheet"; +@import "../components/StartOptions/stylesheet"; @import "../components/ImageUploader/components/ImageUploaderWithText/stylesheet"; @import "../components/Button/ButtonNext/stylesheet"; @import "../components/Loaders/Spinner/stylesheet";