From 59e729e7bda0d6248ba9b02b140b5e6fe5cddcb9 Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Fri, 16 Oct 2020 16:42:46 +0200 Subject: [PATCH] Refined invite-only signup page no refs. - added default invitation icon for sites without icon - refined copy and position of invite only notification --- ghost/portal/src/App.js | 2 +- .../src/components/pages/MagicLinkPage.js | 4 +-- .../portal/src/components/pages/SignupPage.js | 36 +++++++++++++++++-- ghost/portal/src/images/icons/invitation.svg | 1 + 4 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 ghost/portal/src/images/icons/invitation.svg diff --git a/ghost/portal/src/App.js b/ghost/portal/src/App.js index d0abfc9716..e25a07429b 100644 --- a/ghost/portal/src/App.js +++ b/ghost/portal/src/App.js @@ -16,7 +16,7 @@ const DEV_MODE_DATA = { showPopup: true, site: Fixtures.site, member: Fixtures.member.paid, - page: 'accountHome' + page: 'signup' }; export default class App extends React.Component { constructor(props) { diff --git a/ghost/portal/src/components/pages/MagicLinkPage.js b/ghost/portal/src/components/pages/MagicLinkPage.js index c01177f3de..a056276860 100644 --- a/ghost/portal/src/components/pages/MagicLinkPage.js +++ b/ghost/portal/src/components/pages/MagicLinkPage.js @@ -6,7 +6,7 @@ import {ReactComponent as EnvelopeIcon} from '../../images/icons/envelope.svg'; const React = require('react'); export const MagicLinkStyles = ` - .gh-portal-envelope { + .gh-portal-icon-envelope { width: 44px; margin: 0 0 2px; } @@ -30,7 +30,7 @@ export default class MagicLinkPage extends React.Component { return (
- +

Check your inbox!

Check your inbox and click on the login link to complete the signin.

diff --git a/ghost/portal/src/components/pages/SignupPage.js b/ghost/portal/src/components/pages/SignupPage.js index 7e0927e4a5..39d482c8d9 100644 --- a/ghost/portal/src/components/pages/SignupPage.js +++ b/ghost/portal/src/components/pages/SignupPage.js @@ -6,6 +6,7 @@ import InputForm from '../common/InputForm'; import {ValidateInputForm} from '../../utils/form'; import CalculateDiscount from '../../utils/discount'; import {getSitePlans, hasOnlyFreePlan} from '../../utils/helpers'; +import {ReactComponent as InvitationIcon} from '../../images/icons/invitation.svg'; const React = require('react'); @@ -111,6 +112,28 @@ export const SignupPageStyles = ` .gh-portal-content.signin + footer.gh-portal-signin-footer { height: 120px; } + + footer.gh-portal-signup-footer.invite-only { + height: unset; + } + + .gh-portal-invite-only-notification { + margin: 8px 32px; + padding: 0; + text-align: center; + color: var(--grey2); + } + + .gh-portal-icon-invitation { + width: 44px; + margin: 12px 0 2px; + } + + .gh-portal-icon-invitation path, + .gh-portal-icon-invitation circle, + .gh-portal-icon-invitation line { + stroke-width: 1.2px; + } `; class SignupPage extends React.Component { @@ -378,7 +401,7 @@ class SignupPage extends React.Component { return (
- This site is invite only. Contact owner if you'd like to sign up. +

This site is invite-only, contact the owner for access.

); @@ -398,6 +421,7 @@ class SignupPage extends React.Component { } renderSiteLogo() { + const plansData = this.getPlans(); const {site} = this.context; const siteLogo = site.icon; @@ -408,6 +432,10 @@ class SignupPage extends React.Component { return ( {site.title} ); + } else if (plansData.length === 0) { + return ( + + ); } return null; } @@ -428,6 +456,7 @@ class SignupPage extends React.Component { const plansData = this.getPlans(); const fields = this.getInputFields({state: this.state}); let sectionClass = ''; + let footerClass = ''; if (plansData.length <= 1) { if ((plansData.length === 1 && plansData[0].type === 'free') || plansData.length === 0) { @@ -435,6 +464,9 @@ class SignupPage extends React.Component { if (fields.length === 1) { sectionClass = 'single-field'; } + if (plansData.length === 0) { + footerClass = 'invite-only'; + } } else { sectionClass = 'singleplan'; } @@ -447,7 +479,7 @@ class SignupPage extends React.Component { {this.renderFormHeader()} {this.renderForm()} -