mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #3186 from benjiwheeler/join-flow-add-images
Join flow add images
This commit is contained in:
commit
ff3c91f9e0
11 changed files with 18 additions and 10 deletions
|
@ -87,7 +87,7 @@ class BirthDateStep extends React.Component {
|
|||
return (
|
||||
<JoinFlowStep
|
||||
description={this.props.intl.formatMessage({id: 'registration.private'})}
|
||||
headerImgSrc="/images/hoc/getting-started.jpg"
|
||||
headerImgSrc="/images/join-flow/birthdate-header.png"
|
||||
infoMessage={this.props.intl.formatMessage({id: 'registration.birthDateStepInfo'})}
|
||||
innerClassName="join-flow-inner-birthdate-step"
|
||||
title={this.props.intl.formatMessage({id: 'registration.birthDateStepTitle'})}
|
||||
|
|
|
@ -68,7 +68,7 @@ class CountryStep extends React.Component {
|
|||
return (
|
||||
<JoinFlowStep
|
||||
description={this.props.intl.formatMessage({id: 'registration.countryStepDescription'})}
|
||||
headerImgSrc="/images/hoc/getting-started.jpg"
|
||||
headerImgSrc="/images/join-flow/country-header.png"
|
||||
innerClassName="join-flow-inner-country-step"
|
||||
title={this.props.intl.formatMessage({id: 'registration.countryStepTitle'})}
|
||||
waiting={isSubmitting}
|
||||
|
|
|
@ -74,7 +74,7 @@ class EmailStep extends React.Component {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
headerImgSrc="/images/hoc/getting-started.jpg"
|
||||
headerImgSrc="/images/join-flow/email-header.png"
|
||||
innerClassName="join-flow-inner-email-step"
|
||||
nextButton={this.props.intl.formatMessage({id: 'registration.createAccount'})}
|
||||
title={this.props.intl.formatMessage({id: 'registration.emailStepTitle'})}
|
||||
|
|
|
@ -25,8 +25,11 @@ const JoinFlowStep = ({
|
|||
<form onSubmit={onSubmit}>
|
||||
<div className="join-flow-outer-content">
|
||||
{headerImgSrc && (
|
||||
<div className="join-flow-header-image">
|
||||
<img src={headerImgSrc} />
|
||||
<div className="join-flow-header-image-wrapper">
|
||||
<img
|
||||
className="join-flow-header-image"
|
||||
src={headerImgSrc}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
|
|
|
@ -33,15 +33,20 @@
|
|||
}
|
||||
|
||||
/* overflow will only work if this class is set on parent of img, not img itself */
|
||||
.join-flow-header-image {
|
||||
.join-flow-header-image-wrapper {
|
||||
width: 100%;
|
||||
height: 7.5rem;
|
||||
min-height: 7.5rem;
|
||||
max-height: 8.75rem;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
border-top-left-radius: 1rem;
|
||||
border-top-right-radius: 1rem;
|
||||
}
|
||||
|
||||
.join-flow-header-image {
|
||||
width: 27.5rem;
|
||||
}
|
||||
|
||||
.join-flow-footer-message {
|
||||
width: 100%;
|
||||
padding: 1.125rem 1.5rem 1.125rem;
|
||||
|
|
|
@ -44,7 +44,7 @@ class WelcomeStep extends React.Component {
|
|||
description={this.props.intl.formatMessage({
|
||||
id: 'registration.welcomeStepDescriptionNonEducator'
|
||||
})}
|
||||
headerImgSrc="/images/hoc/getting-started.jpg"
|
||||
headerImgSrc="/images/join-flow/welcome-header.png"
|
||||
innerClassName="join-flow-inner-welcome-step"
|
||||
nextButton={
|
||||
<React.Fragment>
|
||||
|
|
BIN
static/images/join-flow/birthdate-header.png
Normal file
BIN
static/images/join-flow/birthdate-header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
BIN
static/images/join-flow/country-header.png
Normal file
BIN
static/images/join-flow/country-header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
static/images/join-flow/email-header.png
Normal file
BIN
static/images/join-flow/email-header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
static/images/join-flow/welcome-header.png
Normal file
BIN
static/images/join-flow/welcome-header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -20,7 +20,7 @@ describe('JoinFlowStep', () => {
|
|||
{...props}
|
||||
/>
|
||||
);
|
||||
expect(component.find('div.join-flow-header-image').exists()).toEqual(true);
|
||||
expect(component.find('img.join-flow-header-image').exists()).toEqual(true);
|
||||
expect(component.find({src: props.headerImgSrc}).exists()).toEqual(true);
|
||||
expect(component.find('.join-flow-inner-content').exists()).toEqual(true);
|
||||
expect(component.find('.join-flow-title').exists()).toEqual(true);
|
||||
|
@ -39,7 +39,7 @@ describe('JoinFlowStep', () => {
|
|||
<JoinFlowStep />
|
||||
);
|
||||
|
||||
expect(component.find('div.join-flow-header-image').exists()).toEqual(false);
|
||||
expect(component.find('img.join-flow-header-image').exists()).toEqual(false);
|
||||
expect(component.find('.join-flow-inner-content').exists()).toEqual(true);
|
||||
expect(component.find('.join-flow-title').exists()).toEqual(false);
|
||||
expect(component.find('div.join-flow-description').exists()).toEqual(false);
|
||||
|
|
Loading…
Reference in a new issue