diff --git a/ghost/portal/src/components/Frame.styles.js b/ghost/portal/src/components/Frame.styles.js index bfcbb00337..9013747c49 100644 --- a/ghost/portal/src/components/Frame.styles.js +++ b/ghost/portal/src/components/Frame.styles.js @@ -9,6 +9,7 @@ import {AccountHomePageStyles} from './pages/AccountHomePage'; import {InputFieldStyles} from './common/InputField'; import {SignupPageStyles} from './pages/SignupPage'; import {PlanSectionStyles} from './common/PlansSection'; +import {AvatarStyles} from './common/MemberGravatar'; // Global styles export const GlobalStyles = ` @@ -161,6 +162,12 @@ export const GlobalStyles = ` letter-spacing: 0.35px; } + .gh-portal-setting-data { + font-size: 1.3rem; + color: #7f7f7f; + line-height: 1.15em; + } + /* Buttons /* ----------------------------------------------------- */ .gh-portal-btn { @@ -217,6 +224,10 @@ export const GlobalStyles = ` opacity: 0.85; } + .gh-portal-btn-branded { + color: var(--brandcolor); + } + /* Global layout styles /* ----------------------------------------------------- */ .gh-portal-popup-container { @@ -283,6 +294,61 @@ export const GlobalStyles = ` .gh-portal-detail-footer .gh-portal-btn { min-width: 90px; } + + /* Lists */ + .gh-portal-list { + background: #fff; + box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.07), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.05); + border-radius: 3px; + padding: 20px; + } + + .gh-portal-list section { + display: flex; + align-items: center; + margin: 0 -20px 20px; + padding: 0 20px 20px; + border-bottom: 1px solid #eaeaea; + } + + .gh-portal-list section:last-of-type { + margin-bottom: 0; + padding-bottom: 0; + border: none; + } + + .gh-portal-list-detail { + flex-grow: 1; + } + + .gh-portal-list-detail h3 { + font-size: 1.5rem; + font-weight: 500; + } + + .gh-portal-list-detail p { + font-size: 1.3rem; + letter-spacing: 0.3px; + line-height: 1.15em; + padding: 0; + margin: 2px 0 0; + color: #7f7f7f; + } + + .gh-portal-btn-list { + height: 38px; + font-size: 1.4rem; + width: unset; + padding: 0 4px; + margin: 0 -4px; + box-shadow: none; + color: var(--brandcolor); + } + + .gh-portal-btn-list:hover { + box-shadow: none; + opacity: 0.75; + } `; // Append all styles as string which we want to pass to iframe @@ -293,6 +359,7 @@ const FrameStyle = PlanSectionStyles + SwitchStyles + ActionButtonStyles + + AvatarStyles + SignupPageStyles; export default FrameStyle; \ No newline at end of file diff --git a/ghost/portal/src/components/common/MemberGravatar.js b/ghost/portal/src/components/common/MemberGravatar.js index 135f9113b4..f6b26d3067 100644 --- a/ghost/portal/src/components/common/MemberGravatar.js +++ b/ghost/portal/src/components/common/MemberGravatar.js @@ -1,6 +1,18 @@ import React from 'react'; import {ReactComponent as UserIcon} from '../../images/icons/user.svg'; +export const AvatarStyles = ` + .gh-portal-avatar { + position: relative; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; + margin-bottom: 12px; + border-radius: 999px; + } +`; + const Styles = ({style = {}}) => { return { userIcon: { @@ -28,7 +40,7 @@ const Styles = ({style = {}}) => { function MemberGravatar({gravatar, style}) { let Style = Styles({style}); return ( -
+
{gravatar ? Gravatar : null}
diff --git a/ghost/portal/src/components/common/Switch.js b/ghost/portal/src/components/common/Switch.js index 5bdc5d61cf..f547a9c52a 100644 --- a/ghost/portal/src/components/common/Switch.js +++ b/ghost/portal/src/components/common/Switch.js @@ -30,8 +30,8 @@ export const SwitchStyles = ` left: 0; right: 0; bottom: 0; - background: #f4f4f4; - border: 1px solid #e4e4e4; + background: #f8f8f8; + border: 1px solid #e0e0e0; transition: .3s; width: 36px !important; height: 22px !important; @@ -63,7 +63,7 @@ export const SwitchStyles = ` } .gh-portal-for-switch input:checked + .input-toggle-component:before { - transform: translateX(22px); + transform: translateX(14px); box-shadow: none; } @@ -71,21 +71,6 @@ export const SwitchStyles = ` width: 38px !important; height: 22px !important; } - - .gh-portal-for-switch.small .input-toggle-component { - width: 38px !important; - height: 22px !important; - } - - .gh-portal-for-switch.small .input-toggle-component:before { - height: 16px !important; - width: 16px !important; - box-shadow: 0 0 1px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.1); - } - - .gh-portal-for-switch.small input:checked + .input-toggle-component:before { - transform: translateX(16px); - } `; function Switch({id, label, onToggle, checked = false}) { diff --git a/ghost/portal/src/components/pages/AccountHomePage.js b/ghost/portal/src/components/pages/AccountHomePage.js index d505cb73a3..a99c5c7c19 100644 --- a/ghost/portal/src/components/pages/AccountHomePage.js +++ b/ghost/portal/src/components/pages/AccountHomePage.js @@ -6,16 +6,23 @@ import Switch from '../common/Switch'; const React = require('react'); export const AccountHomePageStyles = ` + .gh-portal-account-main { + background: #f8f8f8; + margin: -32px -32px 0; + padding: 32px; + border-bottom: 1px solid #eaeaea; + } + .gh-portal-account-header { display: flex; flex-direction: column; align-items: center; - margin-bottom: 20px; + margin: 0 0 32px; } .gh-portal-account-footer { display: flex; - margin-top: -16px; + margin-top: 32px; } .gh-portal-account-footer.paid { @@ -36,75 +43,12 @@ export const AccountHomePageStyles = ` .gh-portal-account-footermenu li:last-of-type { margin-right: 0; } - - .gh-portal-accountdetail-section { - display: flex; - align-items: flex-start; - margin-bottom: 40px; - } - - .gh-portal-accountdetail-section:first-of-type { - margin-top: 32px; - margin-bottom: 22px; - } - - .gh-portal-account-divider { - margin: 12px -32px; - border: none; - border-bottom: 1px solid #EDEDED; - } - - .gh-portal-account-divider:last-of-type { - margin-bottom: 40px; - } - - .gh-portal-btn-accountdetail { - height: 38px; - font-size: 1.3rem; - width: 78px; - padding: 0 12px; - } - - .gh-portal-accountdetail-data { - line-height: 1em; - margin-top: 2px; - color: #777; - } - - .gh-portal-accountdetail-data.small { - font-size: 1.3rem; - margin-top: 5px; - } - - .gh-portal-setting-heading.paid-home { - font-weight: 600; - } - - /* Avatar styles */ - .gh-portal-avatar-container { - position: relative; - display: flex; - align-items: center; - justify-content: center; - overflow: hidden; - width: 64px; - height: 64px; - margin-bottom: 8px; - border-radius: 999px; - box-shadow: 0 0 0 3px #fff; - } `; -const Divider = () => { - return ( -
- ); -}; - const UserAvatar = ({avatar, brandColor}) => { return ( -
- +
+
); }; @@ -113,15 +57,19 @@ const AccountFooter = ({onLogout, onSettings, brandColor}) => { return (
    -
  • Contact support
  • + {onSettings ? null : +
  • + } + {onSettings + ?
  • + : null + }
    - {onSettings - ?
  • Settings
  • - : null - } -
  • Logout
  • +
  • + +
@@ -133,7 +81,7 @@ const UserHeader = ({member, brandColor}) => { return (
-

Your Account

+

Your account

); }; @@ -177,7 +125,7 @@ class FreeAccountHomePage extends React.Component { const {title: siteTitle} = this.context.site; return ( -
+

Hey {firstname || name || email}! You are subscribed to free updates from {siteTitle}, but you don't have a paid subscription to unlock full access @@ -191,8 +139,10 @@ class FreeAccountHomePage extends React.Component { const {member, brandColor} = this.context; return (

- - {this.renderAccountDetail()} +
+ + {this.renderAccountDetail()} +
this.handleSignout(e)} onSettings={e => this.openSettings(e)} brandColor={brandColor} />
); @@ -266,38 +216,35 @@ class PaidAccountHomePage extends React.Component { } = subscriptions[0]; return ( -
-
-
-

Profile

-
-
{name}
-
{email}
-
+
+
+
+

{name}

+

{email}

- +
-
-
-

Plan

-
{this.getPlanLabel(plan)}
+
+
+

Plan

+

{this.getPlanLabel(plan)}

- +
-
-
-

Billing Info

-
{this.getCardLabel({defaultCardLast4})}
+
+
+

Billing Info

+

{this.getCardLabel({defaultCardLast4})}

- +
-
-
-

Newsletter

-
You are subscribed to email newsletters
+
+
+

Newsletter

+

Not subscribed to email newsletters

{ @@ -313,11 +260,10 @@ class PaidAccountHomePage extends React.Component { const {member, brandColor} = this.context; return (
- - {/* {this.renderAccountWelcome()} */} - - {this.renderAccountDetails()} - +
+ + {this.renderAccountDetails()} +
this.handleSignout(e)} brandColor={brandColor} />
); diff --git a/ghost/portal/src/components/pages/AccountProfilePage.js b/ghost/portal/src/components/pages/AccountProfilePage.js index 35c7477a1c..705b25fdc4 100644 --- a/ghost/portal/src/components/pages/AccountProfilePage.js +++ b/ghost/portal/src/components/pages/AccountProfilePage.js @@ -165,12 +165,12 @@ export default class AccountProfilePage extends React.Component { if (paid) { return null; } - const label = subscribed ? 'You are subscribed to email newsletters' : 'You are not subscribed to email newsletters'; + const label = subscribed ? 'Subscribed to email newsletters' : 'Not subscribed to email newsletters'; return (
-

Newsletter

-
{label}
+

Newsletter

+
{label}
{ @@ -189,7 +189,7 @@ export default class AccountProfilePage extends React.Component { return (
{this.renderHeader()} -
+
{this.renderProfileData()} {this.renderNewsletterOption()}
diff --git a/ghost/portal/src/images/icons/user.svg b/ghost/portal/src/images/icons/user.svg index 35df9bc469..5e6f3f1f6e 100644 --- a/ghost/portal/src/images/icons/user.svg +++ b/ghost/portal/src/images/icons/user.svg @@ -1 +1 @@ -single-neutral \ No newline at end of file +single-neutral-circle \ No newline at end of file