Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRESS2-1376 Add/sitegen socialmedia #366

Merged
merged 6 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/SocialMedia/contents.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { __ } from '@wordpress/i18n';

const getContents = () => {
return {
heading: __(
'Do you want to include any content from Facebook?',
'wp-module-onboarding'
),
facebookTitle: __(
'Connect a Facebook Account',
'wp-module-onboarding'
),
facebookdesc: __(
girish-lokapure marked this conversation as resolved.
Show resolved Hide resolved
'By connecting a Facebook profile, we can fetch relevant data to increase the accuracy of your Al generated site.',
'wp-module-onboarding'
),
facebookbutton: __( 'Connect Facebook', 'wp-module-onboarding' ),
buttons: {
skip: __( 'Skip for now', 'wp-module-onboarding' ),
},
};
};

export default getContents;
36 changes: 33 additions & 3 deletions src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import { useDispatch } from '@wordpress/data';
import { store as nfdOnboardingStore } from '../../../store';
import { HEADER_SITEGEN } from '../../../../constants';

import SiteGenPlaceholder from '../../../components/SiteGenPlaceholder';
import getContents from './contents';
import ButtonNext from '../../../components/Button/ButtonNext';
import SkipButton from '../../../components/SkipButton';
import ImageUploaderWithText from '../../../components/ImageUploader/components/ImageUploaderWithText';

Check failure on line 11 in src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

'ImageUploaderWithText' is defined but never used

const SiteGenSiteSocialMedia = () => {
const {
Expand All @@ -22,12 +24,40 @@
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
} );

const content = getContents();
return (
<CommonLayout
isCentered
className="nfd-onboarding-step--site-gen__social-media"
>
<SiteGenPlaceholder heading={ 'Social Media' } />
<div className="nfd-onboarding-step--site-gen__social-media__container">
<div className="nfd-onboarding-step--site-gen__social-media__container__heading">
<div className="nfd-onboarding-step--site-gen__social-media__container__heading__animation"></div>
<p className="nfd-onboarding-step--site-gen__social-media__container__heading__text">
{ content.heading }
</p>
</div>
<div className="nfd-onboarding-step--site-gen__social-media__contain ">
<div className="nfd-onboarding-step--site-gen__social-media__contain__containleft ">
{ content.facebookTitle }
<p>{ content.facebookdesc }</p>
</div>
<div className="nfd-onboarding-step--site-gen__social-media__contain__containright ">
<button className="nfd-onboarding-step--site-gen__social-media__contain__containright__button ">
girish-lokapure marked this conversation as resolved.
Show resolved Hide resolved
<i></i>{ content.facebookbutton }

Check failure on line 48 in src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Replace `<i></i>` with `↹<i></i>⏎↹↹↹↹↹↹↹`
</button>
</div>
</div>
<div className="nfd-onboarding-step--site-gen__social-media__container__buttons">
<SkipButton
callback={ () => resetSiteLogo() }

Check failure on line 54 in src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

'resetSiteLogo' is not defined
girish-lokapure marked this conversation as resolved.
Show resolved Hide resolved
className="nfd-onboarding-step--site-gen__social-media__container__buttons__skip"
text={ content.buttons.skip }
/>
<ButtonNext disabled={ true } />
</div>
</div>
</CommonLayout>
);
};
Expand Down
104 changes: 104 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/SocialMedia/stylesheet.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
.nfd-onboarding-step {

&--site-gen {

&__social-media {

&__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;
}
}

&__buttons {
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-style: normal;
font-weight: 510;
margin-right: 24px;

&:hover {
text-decoration: underline;
color: var(--nfd-onboarding-primary);
}
}
}

}

&__contain {
width: 600px;
margin: 16px;
border: 1.25px dashed var(--nfd-onboarding-site-logo-border);
girish-lokapure marked this conversation as resolved.
Show resolved Hide resolved
border-radius: 8px;
padding: 24px;
display: flex;
flex-direction: row;
justify-content: left;
align-items: left;

&__containleft {
width: 400px;
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;
white-space: normal;
line-height: 1;
}

&__containright {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;

&__button {
display: inline-flex;
align-items: center;
padding: 10px 15px;
background-color: #1877f2;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}

&__button i {
margin-right: 8px;
background-image: var(--facebook-icon);
width: 25px;
height: 25px;
}
}
}
}
}
}
1 change: 1 addition & 0 deletions src/OnboardingSPA/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
@import "../steps/SiteFeatures/stylesheet";
@import "../steps/TheFork/stylesheet";
@import "../steps/SiteGen/SiteLogo/stylesheet";
@import "../steps/SiteGen/SocialMedia/stylesheet.scss";
girish-lokapure marked this conversation as resolved.
Show resolved Hide resolved

.nfd-onboarding-container {
display: flex;
Expand Down
Loading