From eb8ad7b49342101c3a9d0e784ca58a2695ab1e7d Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Mon, 20 Jul 2020 16:02:58 +0200 Subject: [PATCH] Added account home CSS styles no refs. - added styles for free account home screen --- ghost/portal/src/components/Frame.styles.js | 33 +++++++++++++++++-- .../src/components/pages/AccountHomePage.js | 26 ++++++++++----- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/ghost/portal/src/components/Frame.styles.js b/ghost/portal/src/components/Frame.styles.js index 04239404e2..46717fe2a2 100644 --- a/ghost/portal/src/components/Frame.styles.js +++ b/ghost/portal/src/components/Frame.styles.js @@ -5,6 +5,7 @@ import {ActionButtonStyles} from './common/ActionButton'; import {SwitchStyles} from './common/Switch'; +import {AccountHomePageStyles} from './pages/AccountHomePage'; // Global styles export const GlobalStyles = ` @@ -78,7 +79,30 @@ export const GlobalStyles = ` .fixed { position: fixed; } .sticky { position: sticky; } - /* Global styles + /* Typography + /* ----------------------------------------------------- */ + h1, h2, h3, h4, h5, h6 { + padding: 0; + margin: 0; + } + + h1 { + font-size: 31px; + font-weight: 500; + letter-spacing: 0.2px; + } + + h2 { + font-size: 24px; + font-weight: 500; + letter-spacing: 0.2px; + } + + .ghp-main-title { + color: #333; + } + + /* Global layout styles /* ----------------------------------------------------- */ .ghp-popup-container { width: 100%; @@ -93,7 +117,7 @@ export const GlobalStyles = ` left: 0px; right: 0px; overflow: hidden; - padding-top: 32px; + padding: 32px; padding-bottom: 32px; text-align: left; box-sizing: border-box; @@ -113,10 +137,15 @@ export const GlobalStyles = ` cursor: pointer; padding: 12px; } + + .ghp-section { + margin-bottom: 32px; + } `; // Append all styles as string which we want to pass to iframe const FrameStyle = + AccountHomePageStyles + GlobalStyles + SwitchStyles + ActionButtonStyles; diff --git a/ghost/portal/src/components/pages/AccountHomePage.js b/ghost/portal/src/components/pages/AccountHomePage.js index f4bdb0b574..b8327085fb 100644 --- a/ghost/portal/src/components/pages/AccountHomePage.js +++ b/ghost/portal/src/components/pages/AccountHomePage.js @@ -6,6 +6,15 @@ import isPreviewMode from '../../utils/is-preview-mode'; const React = require('react'); +export const AccountHomePageStyles = ` + .ghp-account-header { + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 20px; + } +`; + const Divider = () => { return (
@@ -35,14 +44,15 @@ const UserAvatar = ({avatar}) => { const AccountFooter = ({onLogout, onSettings, brandColor}) => { return ( -
+ //
+
Contact support
{onSettings - ?
Settings
+ ?
Settings
: null } -
Logout
+
Logout
); @@ -51,9 +61,9 @@ const AccountFooter = ({onLogout, onSettings, brandColor}) => { const UserHeader = ({member}) => { const avatar = member.avatar_image; return ( -
+
-

Your Account

+

Your Account

); }; @@ -97,7 +107,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 @@ -110,7 +120,7 @@ class FreeAccountHomePage extends React.Component { render() { const {member, brandColor} = this.context; return ( -
+
{this.renderAccountDetail()} this.handleSignout(e)} onSettings={e => this.openSettings(e)} brandColor={brandColor} /> @@ -132,7 +142,7 @@ class PaidAccountHomePage extends React.Component { const siteTitle = this.context.site.title; return ( -
+
Hey {firstname || name || email}! You have an active {siteTitle} account with access to all areas. Get in touch if you have any problems or need some help getting things updated, and thanks for subscribing.