Skip to content

Commit

Permalink
Merge branch 'master' into try/realtime-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
unDemian committed Apr 8, 2020
2 parents be75f4f + 44a4d92 commit 0a3aa22
Show file tree
Hide file tree
Showing 51 changed files with 2,412 additions and 1,936 deletions.
5 changes: 3 additions & 2 deletions client/components/domains/transfer-domain-step/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { PLAN_PERSONAL } from 'lib/plans/constants';
import { getAvailabilityNotice } from 'lib/domains/registration/availability-messages';
import DomainRegistrationSuggestion from 'components/domains/domain-registration-suggestion';
import { getCurrentUser, getCurrentUserCurrencyCode } from 'state/current-user/selectors';
import Banner from 'components/banner';
import UpsellNudge from 'blocks/upsell-nudge';
import Notice from 'components/notice';
import { composeAnalytics, recordGoogleEvent, recordTracksEvent } from 'state/analytics/actions';
import { getSelectedSite } from 'state/ui/selectors';
Expand Down Expand Up @@ -407,12 +407,13 @@ class TransferDomainStep extends React.Component {
if ( hasToUpgradeToPayForADomain( selectedSite, cart, searchQuery ) ) {
content = (
<div>
<Banner
<UpsellNudge
description={ translate(
'Only .blog domains are included with your plan, to use a different tld upgrade to a Personal plan.'
) }
plan={ PLAN_PERSONAL }
title={ translate( 'Personal plan required' ) }
showIcon={ true }
/>
{ content }
</div>
Expand Down
104 changes: 42 additions & 62 deletions client/landing/gutenboarding/onboarding-block/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,93 +12,73 @@
--highlightColor: var( --studio-blue-20 );
}

&[data-vertical~='football' i] {
--contrastColor: var( --studio-green-40 );
--mainColor: var( --studio-gray-0 );
--highlightColor: var( --studio-green-20 );
&[data-vertical*='sport' i],
&[data-vertical~='fooball' i] {
--contrastColor: #83cd7b;
--mainColor: #25541f;
--highlightColor: rgb( 21, 53, 17 );
}

&[data-vertical~='web' i] {
--contrastColor: var( --studio-blue-40 );
--mainColor: var( --studio-blue-0 );
--highlightColor: var( --studio-blue-20 );
}

&[data-vertical~='animals' i] {
--contrastColor: var( --studio-blue-40 );
--mainColor: var( --studio-blue-0 );
--highlightColor: var( --studio-blue-20 );
&[data-vertical~='shopping' i] {
--contrastColor: #c2ecde;
--mainColor: #0e3e58;
--highlightColor: #0a3750;
}

&[data-vertical~='coffee' i] {
--contrastColor: #4a2512;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
}

&[data-vertical~='cats' i] {
--contrastColor: #1382d2;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
}

&[data-vertical~='car' i] {
--contrastColor: #c33939;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
&[data-vertical~='beauty' i] {
--contrastColor: #fac8ba;
--mainColor: #434f5c;
--highlightColor: #2f3a46;
}

&[data-vertical~='doctor' i] {
--contrastColor: #1382d2;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
&[data-vertical~='animals' i],
&[data-vertical~='dogs' i] {
--contrastColor: #fed7ad;
--mainColor: #4c485c;
--highlightColor: #252330;
}

&[data-vertical~='dogs' i] {
--contrastColor: #f3e4be;
--mainColor: #a68b46;
--highlightColor: #a68b46;
&[data-vertical*='coffee' i] {
--contrastColor: #4a2512;
--mainColor: #f2d6b2;
--highlightColor: #e0c49e;
}

&[data-vertical~='food' i] {
&[data-vertical~='food' i],
&[data-vertical~='restaurant' i] {
--contrastColor: #e35f27;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
}

&[data-vertical~='fashion' i] {
&[data-vertical~='fashion' i],
&[data-vertical*='design' i] {
--contrastColor: #000;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
}

&[data-vertical~='football' i] {
--contrastColor: #47b845;
--mainColor: #0e390d;
--highlightColor: #0e390d;
&[data-vertical*='real estate' i] {
--contrastColor: #e3dcd4;
--mainColor: #425a68;
--highlightColor: #2f4450;
}

&[data-vertical~='movies' i] {
--contrastColor: #1382d2;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
&[data-vertical~='marketing' i] {
--contrastColor: #244458;
--mainColor: #dffffe;
--highlightColor: #c9eeed;
}

&[data-vertical~='photo' i] {
--contrastColor: #1382d2;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
&[data-vertical*='photography' i] {
--contrastColor: #fff;
--mainColor: #000;
--highlightColor: rgb( 54, 54, 54 );
}

&[data-vertical~='tv' i] {
--contrastColor: #1382d2;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
}

&[data-vertical~='jersey' i] {
--contrastColor: #1382d2;
--mainColor: var( --studio-white );
--highlightColor: var( --studio-gray-0 );
&[data-vertical*='travel' i] {
--contrastColor: #3b8598;
--mainColor: #ffffff;
--highlightColor: rgb( 209, 209, 209 );
}
}
59 changes: 29 additions & 30 deletions client/landing/gutenboarding/onboarding-block/create-site/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
*/
import React, { FunctionComponent } from 'react';
import { useI18n } from '@automattic/react-i18n';
import { Icon } from '@wordpress/components';

/**
* Internal dependencies
*/
import AnimatedPlaceholder from '../animated-placeholder';
import CreateAndRedirect from './create-and-redirect';
import { useNewQueryParam } from '../../path';
import './style.scss';
Expand All @@ -16,44 +16,43 @@ import './style.scss';
const CreateSite: FunctionComponent< {} > = () => {
const { __: NO__ } = useI18n();
const shouldTriggerCreate = useNewQueryParam();
const [ shouldCreateAndRedirect, setCreateAndRedirect ] = React.useState( false );

const createAndRedirect = shouldTriggerCreate ? <CreateAndRedirect /> : null;
// Some very rudimentary progress illusions

const progressSteps = [
NO__( 'Building your site' ),
NO__( 'Getting your domain' ),
NO__( 'Applying design' ),
];

return (
<div className="create-site__background">
{ createAndRedirect }
{ shouldTriggerCreate && shouldCreateAndRedirect && <CreateAndRedirect /> }
<div className="create-site__layout">
<div className="create-site__header">
<div className="create-site__toolbar">
<div className="create-site__placeholder create-site__placeholder-site">
Placeholder
</div>
</div>
<div className="create-site__settings">
<div className="create-site__placeholder create-site__placeholder-button">
Placeholder
</div>
<div className="create-site__placeholder create-site__placeholder-button">
Placeholder
</div>
<div className="create-site__placeholder create-site__placeholder-button">
Placeholder
</div>
<div className="gutenboarding__header-wp-logo">
<Icon icon="wordpress-alt" size={ 24 } />
</div>
</div>
<div className="create-site__content">
<div className="create-site__placeholder create-site__placeholder-title">Placeholder</div>
<div className="create-site__text">
<AnimatedPlaceholder
isSlow
texts={ [
NO__( 'We are creating your site.' ),
NO__( 'It will be ready in a moment.' ),
NO__( 'Almost there, hang on!' ),
NO__( 'Your site is almost ready!' ),
NO__( 'We are about to finish!' ),
] }
/>
<div className="create-site__progress">
<div className="create-site__progress-steps">
{ progressSteps.map( step => (
<div key={ step } className="create-site__progress-step">
{ step }
</div>
) ) }
</div>
</div>
<div
className="create-site__progress-bar"
onAnimationEnd={ () => setCreateAndRedirect( true ) }
/>
<div className="create-site__progress-numbered-steps">
{ progressSteps.map( ( _, index ) => (
<p>{ `Step ${ index + 1 } of ${ progressSteps.length }` }</p>
) ) }
</div>
</div>
</div>
Expand Down
113 changes: 73 additions & 40 deletions client/landing/gutenboarding/onboarding-block/create-site/style.scss
Original file line number Diff line number Diff line change
@@ -1,70 +1,103 @@
@import 'assets/stylesheets/gutenberg-base-styles';
@import '../../mixins';

$progress-step-title-height: 40px;
$progress-step-number-step-height: 45px;
$progress-duration: 5s;
$progress-widget-height: 300px;

.create-site__background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 50;
background-color: var( --studio-gray-0 );
background-color: $white;

.create-site__header {
display: flex;
justify-content: space-between;
align-items: center;
height: 56px;
padding: 8px;
background-color: $white;

.create-site__toolbar,
.create-site__settings {
display: inline-flex;
align-items: center;
}
}

.create-site__content {
min-height: 70vh;
padding-top: 40px;
position: absolute;
top: calc( 50% - #{$progress-widget-height / 4} );
left: 50%;
width: 100%;
max-width: 540px;
height: $progress-widget-height;
transform: translateX( -50% );
// for mobiles
padding: 1em;

.create-site__text {
@include onboarding-font-recoleta;
margin-top: 60px;
text-align: center;
font-size: 32px;
color: var( --studio-blue-40 );
display: flex;
justify-content: center;
.create-site__progress {
height: $progress-step-title-height;
overflow: hidden;
margin-bottom: 20px;
}

.animated-input-placeholder span {
color: var( --studio-blue-40 );
.create-site__progress-steps {
animation: create-site__progress-steps $progress-duration ease-out forwards;

@keyframes create-site__progress-steps {
@for $i from 0 through 3 {
#{$i / 3 * 100%} {
transform: translateY( -$progress-step-title-height * ( $i - 1 ) );
}
}
}
}
}

.create-site__placeholder {
@include placeholder();
height: 16px;
border-radius: 8px;
}
.create-site__progress-bar {
height: 7px;
background: var( --mainColor );
transform: scaleX( 0 );
transform-origin: 0% 0%;
margin-top: 1em;

.create-site__placeholder-site {
margin-left: 18px;
}
animation: create-site__progress-bar-progress-move #{$progress-duration + 1} ease-out forwards;

.create-site__placeholder-button {
width: 40px;
margin: 0 8px;
}
@keyframes create-site__progress-bar-progress-move {
@for $i from 1 through 3 {
#{$i / 3 * 100%} {
transform: scaleX( #{$i / 3} );
}
}
}
}

.create-site__progress-step {
@include onboarding-heading-text-mobile;
text-align: center;
vertical-align: middle;
margin: 0;
height: $progress-step-title-height;
}

.create-site__placeholder-title {
height: 40px;
min-width: 250px;
width: 40%;
max-width: 600px;
margin: 0 58px;
border-radius: 20px;
.create-site__progress-numbered-steps {
height: $progress-step-title-height;
overflow: hidden;
margin-top: 0.7em;

> p {
height: $progress-step-number-step-height;
padding: 1em;
text-align: center;
color: var( --studio-gray-40 );

animation: create-site__progress-numbered-step-up $progress-duration steps( 2, end )
forwards;

@keyframes create-site__progress-numbered-step-up {
to {
transform: translateY( -$progress-step-number-step-height * 2 );
}
}
}
}
}
}
Loading

0 comments on commit 0a3aa22

Please sign in to comment.