diff --git a/src/OnboardingSPA/components/Footer/components/SiteGenFooter/index.js b/src/OnboardingSPA/components/Footer/components/SiteGenFooter/index.js new file mode 100644 index 000000000..793f63d04 --- /dev/null +++ b/src/OnboardingSPA/components/Footer/components/SiteGenFooter/index.js @@ -0,0 +1,15 @@ +import { Fill } from '@wordpress/components'; +import { FOOTER_SITEGEN, FOOTER_START } from '../../../../../constants'; +import ToggleDarkMode from '../../../ToggleDarkMode'; + +const SiteGenFooter = () => { + return ( + <> + + + + + ); +}; + +export default SiteGenFooter; diff --git a/src/OnboardingSPA/components/Footer/index.js b/src/OnboardingSPA/components/Footer/index.js new file mode 100644 index 000000000..6a115f458 --- /dev/null +++ b/src/OnboardingSPA/components/Footer/index.js @@ -0,0 +1,37 @@ +import { FOOTER_END, FOOTER_START } from '../../../constants'; +import { Slot } from '@wordpress/components'; +import { useSelect } from '@wordpress/data'; +import { Fragment, Suspense } from '@wordpress/element'; + +import { store as nfdOnboardingStore } from '../../store'; + +const Footer = () => { + const { footers, footerActiveView } = useSelect( ( select ) => { + return { + footers: select( nfdOnboardingStore ).getFooters(), + footerActiveView: + select( nfdOnboardingStore ).getFooterActiveView(), + }; + } ); + return ( +
+ }> + { footers.map( ( footer ) => { + return ( + + + + ); + } ) } + +
+ +
+
+ +
+
+ ); +}; + +export default Footer; diff --git a/src/OnboardingSPA/components/Footer/stylesheet.scss b/src/OnboardingSPA/components/Footer/stylesheet.scss new file mode 100644 index 000000000..2564f6d92 --- /dev/null +++ b/src/OnboardingSPA/components/Footer/stylesheet.scss @@ -0,0 +1,22 @@ +.nfd-onboarding-footer { + position: absolute; + bottom: 0; + left: 0; + z-index: 1; + + display: flex; + flex-direction: row; + + height: auto; + width: 100%; + border: none; + + &__end { + position: absolute; + right: 25px; + } + + &--background { + background-color: rgba(var(--nfd-onboarding-secondary-rgb), 0.75); + } +} diff --git a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js index 9681c3f9b..79f4271d1 100644 --- a/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js +++ b/src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteBuild/index.js @@ -2,7 +2,6 @@ import Header from '../../Header'; import Content from '../../Content'; import Drawer from '../../Drawer'; import Sidebar from '../../Sidebar'; -import ToggleDarkMode from '../../ToggleDarkMode'; import classNames from 'classnames'; import { useLocation } from 'react-router-dom'; import { setFlow } from '../../../utils/api/flow'; @@ -55,6 +54,7 @@ import { trigger as cronTrigger } from '../../../utils/api/cronTrigger'; import { stepTheFork } from '../../../steps/TheFork/step'; import { ThemeProvider } from '../../ThemeContextProvider'; import themeToggleHOC from '../themeToggleHOC'; +import Footer from '../../Footer'; const SiteBuild = () => { const location = useLocation(); @@ -423,7 +423,7 @@ const SiteBuild = () => { handleConditionalDesignStepsRoutes(); }, [ location.pathname, onboardingFlow ] ); - const shouldApplyTheme = + const isForkStep = currentStep === stepTheFork || window.nfdOnboarding.currentFlow === 'sitegen'; // wrapping the NewfoldInterfaceSkeleton with the HOC to make 'theme' available @@ -431,7 +431,7 @@ const SiteBuild = () => { NewfoldInterfaceSkeleton, 'nfd-onboarding-sitegen-dark', 'nfd-onboarding-sitegen-light', - shouldApplyTheme + isForkStep ); return ( @@ -445,14 +445,14 @@ const SiteBuild = () => { { 'is-large-viewport': isLargeViewport }, { 'is-small-viewport': ! isLargeViewport }, { - 'nfd-onboarding-skeleton--sitegen': shouldApplyTheme, + 'nfd-onboarding-skeleton--sitegen': isForkStep, } ) } header={
} drawer={ } content={ } sidebar={ } - footer={ shouldApplyTheme ? : null } + footer={ isForkStep ?