diff --git a/ghost/portal/src/App.js b/ghost/portal/src/App.js index c07a02cc3e..23c3071779 100644 --- a/ghost/portal/src/App.js +++ b/ghost/portal/src/App.js @@ -61,7 +61,7 @@ export default class App extends React.Component { // Loads default page and popup state for local UI testing if (process.env.NODE_ENV === 'development') { return { - page: 'accountHome', + page: 'accountProfile', showPopup: true }; } diff --git a/ghost/portal/src/components/Frame.styles.js b/ghost/portal/src/components/Frame.styles.js index 5abf74ab45..bbf4aaf52f 100644 --- a/ghost/portal/src/components/Frame.styles.js +++ b/ghost/portal/src/components/Frame.styles.js @@ -6,6 +6,8 @@ import {ActionButtonStyles} from './common/ActionButton'; import {SwitchStyles} from './common/Switch'; import {AccountHomePageStyles} from './pages/AccountHomePage'; +import {AccountProfilePageStyles} from './pages/AccountProfilePage'; +import {InputFieldStyles} from './common/InputField'; // Global styles export const GlobalStyles = ` @@ -115,6 +117,12 @@ export const GlobalStyles = ` letter-spacing: 0.2px; } + h3 { + font-size: 20px; + font-weight: 500; + letter-spacing: 0.2px; + } + p { font-size: 15px; line-height: 1.55em; @@ -146,6 +154,8 @@ export const GlobalStyles = ` .gh-portal-setting-heading { font-size: 13px; + margin-bottom: 4px; + font-weight: 500; } /* Buttons @@ -216,12 +226,37 @@ export const GlobalStyles = ` .gh-portal-section { margin-bottom: 32px; } + + .gh-portal-section.form { + margin-bottom: 20px; + } + + .gh-portal-detail-header { + position: relative; + display: flex; + align-items: center; + justify-content: center; + margin: 0 0 20px; + } + + .gh-portal-detail-header .gh-portal-btn-back, + .gh-portal-detail-header .gh-portal-btn-back:hover { + position: absolute; + top: -8px; + left: 0; + background: none; + box-shadow: none; + padding: 0; + margin: 0; + } `; // Append all styles as string which we want to pass to iframe const FrameStyle = GlobalStyles + AccountHomePageStyles + + AccountProfilePageStyles + + InputFieldStyles + SwitchStyles + ActionButtonStyles; diff --git a/ghost/portal/src/components/common/ActionButton.js b/ghost/portal/src/components/common/ActionButton.js index 059a1aa34f..e1060ff2e0 100644 --- a/ghost/portal/src/components/common/ActionButton.js +++ b/ghost/portal/src/components/common/ActionButton.js @@ -6,6 +6,11 @@ export const ActionButtonStyles = ` width: 100%; box-shadow: none; } + + .gh-portal-btn-main:hover { + box-shadow: none; + } + .gh-portal-btn-primary:hover::before { position: absolute; content: ""; diff --git a/ghost/portal/src/components/common/InputField.js b/ghost/portal/src/components/common/InputField.js index 4166f9b07d..858b0c858a 100644 --- a/ghost/portal/src/components/common/InputField.js +++ b/ghost/portal/src/components/common/InputField.js @@ -1,47 +1,36 @@ import React from 'react'; -const Styles = ({disabled, style = {}} = {}) => { - return { - input: { - display: 'block', - padding: '0 .6em', - width: '100%', - height: '44px', - outline: '0', - border: '1px solid #c5d2d9', - color: 'inherit', - textDecoration: 'none', - background: disabled ? '#ececec' : '#fff', - borderRadius: '9px', - fontSize: '14px', - marginBottom: '12px', - boxSizing: 'border-box', - ...(style.input || {}) // Override any custom style - }, - label: { - marginBottom: '3px', - fontSize: '12px', - fontWeight: '700', - ...(style.label || {}) // Override any custom style - } - }; -}; +export const InputFieldStyles = ` + .gh-portal-input { + display: block; + padding: 0 12px; + width: 100%; + height: 40px; + outline: none; + border: 1px solid #ddd; + color: inherit; + background: #fff; + border-radius: 5px; + font-size: 1.5rem; + margin-bottom: 12px; + box-sizing: border-box; + } +`; function InputField({name, id, label, type, value, placeholder, disabled, onChange, style}) { - const Style = Styles({disabled, style}); id = id || `input-${name}`; return ( <> - + onChange(e, name)} - style={Style.input} aria-label={label} /> > diff --git a/ghost/portal/src/components/pages/AccountProfilePage.js b/ghost/portal/src/components/pages/AccountProfilePage.js index 57e373b4fd..fbcb4bcfc9 100644 --- a/ghost/portal/src/components/pages/AccountProfilePage.js +++ b/ghost/portal/src/components/pages/AccountProfilePage.js @@ -7,6 +7,8 @@ import isPreviewMode from '../../utils/is-preview-mode'; const React = require('react'); +export const AccountProfilePageStyles = ``; + export default class AccountProfilePage extends React.Component { static contextType = AppContext; @@ -75,7 +77,7 @@ export default class AccountProfilePage extends React.Component { renderAccountFooter() { return ( -