-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from newfold-labs/PRESS2-263-learn-more-sideba…
…r-basic-info Learn more sidebar: Basic Info
- Loading branch information
Showing
6 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
src/OnboardingSPA/pages/Steps/BasicInfo/Sidebar/LearnMore/contents.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { __, sprintf } from '@wordpress/i18n'; | ||
|
||
import { translations } from '../../../../../utils/locales/translations'; | ||
import { info } from '@wordpress/icons'; | ||
|
||
const getContents = ( brandName ) => { | ||
return { | ||
introduction: { | ||
heading: __( 'Basic Info', 'wp-module-onboarding' ), | ||
subheading: sprintf( | ||
/* translators: %s: site */ | ||
__( | ||
`Setup how your %s will present to the public, search engines and visitors’ web browsers.`, | ||
'wp-module-onboarding' | ||
), | ||
translations( 'site' ) | ||
), | ||
icon: info, | ||
}, | ||
illustration: { | ||
icon: 'nfd-onboarding-sidebar-learn-more-basic-info-illustration', | ||
}, | ||
information: { | ||
headingWithDescriptions: [ | ||
{ | ||
heading: __( | ||
'Present in tip-top shape to web browsers and search engine results', | ||
'wp-module-onboarding' | ||
), | ||
description: sprintf( | ||
/* translators: 1: Brand 2: Site */ | ||
__( | ||
`Enter the best way for WordPress, web browsers and search engines to identify your %s %s by entering your Title, Description and Logo.`, | ||
'wp-module-onboarding' | ||
), | ||
brandName, | ||
translations( 'Site' ) | ||
), | ||
}, | ||
{ | ||
description: sprintf( | ||
/* translators: %s: website */ | ||
__( | ||
'Tell us your social media accounts, and we’ll make sure visitors can find them and tell search engines these accounts are related to this %s.', | ||
'wp-module-onboarding' | ||
), | ||
translations( 'website' ) | ||
), | ||
}, | ||
], | ||
}, | ||
help: { | ||
fullService: { | ||
text: __( | ||
'Hire Our Full-Service Creative Studio', | ||
'wp-module-onboarding' | ||
), | ||
link: '#', | ||
}, | ||
support: { | ||
text: __( 'Technical Support', 'wp-module-onboarding' ), | ||
link: '#', | ||
}, | ||
}, | ||
}; | ||
}; | ||
|
||
export default getContents; |
70 changes: 70 additions & 0 deletions
70
src/OnboardingSPA/pages/Steps/BasicInfo/Sidebar/LearnMore/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { useSelect } from '@wordpress/data'; | ||
import { lazy } from '@wordpress/element'; | ||
|
||
import { store as nfdOnboardingStore } from '../../../../../store'; | ||
import getContents from './contents'; | ||
|
||
const IllustrationPanel = lazy( () => | ||
import( | ||
'../../../../../components/Sidebar/components/LearnMore/IllustrationPanel' | ||
) | ||
); | ||
const InfoPanel = lazy( () => | ||
import( '../../../../../components/Sidebar/components/LearnMore/InfoPanel' ) | ||
); | ||
const HelpPanel = lazy( () => | ||
import( '../../../../../components/Sidebar/components/LearnMore/HelpPanel' ) | ||
); | ||
const ButtonWhite = lazy( () => | ||
import( '../../../../../components/Button/ButtonWhite' ) | ||
); | ||
const SupportLink = lazy( () => | ||
import( | ||
'../../../../../components/Sidebar/components/LearnMore/SupportLink' | ||
) | ||
); | ||
const StepIntroPanel = lazy( () => | ||
import( | ||
'../../../../../components/Sidebar/components/LearnMore/StepIntroPanel' | ||
) | ||
); | ||
|
||
const LearnMore = () => { | ||
const { brandName } = useSelect( ( select ) => { | ||
return { | ||
brandName: select( nfdOnboardingStore ).getNewfoldBrandName(), | ||
}; | ||
} ); | ||
|
||
const content = getContents( brandName ); | ||
|
||
return ( | ||
<div className="nfd-onboarding-sidebar-learn-more__basic-info"> | ||
<StepIntroPanel | ||
heading={ content.introduction.heading } | ||
subheading={ content.introduction.subheading } | ||
icon={ content.introduction.icon } | ||
/> | ||
<IllustrationPanel cssIcon={ content.illustration.icon } /> | ||
<InfoPanel | ||
headingWithDescriptions={ | ||
content.information.headingWithDescriptions | ||
} | ||
/> | ||
<HelpPanel> | ||
<ButtonWhite | ||
text={ content.help.fullService.text } | ||
onClick={ () => | ||
( window.location.href = content.help.fullService.link ) | ||
} | ||
/> | ||
<SupportLink | ||
text={ content.help.support.text } | ||
link={ content.help.support.link } | ||
/> | ||
</HelpPanel> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LearnMore; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters