From d1761d4ec0da7f76293763adf07edaf43f5015dd Mon Sep 17 00:00:00 2001 From: Alexander Rau Date: Mon, 3 Dec 2018 20:44:58 -0700 Subject: [PATCH] Add CSS styles to /login route page, including media queries --- client/src/components/Login.js | 36 +++++++--- client/src/stylesheets/components/_Login.scss | 68 +++++++++++++++++++ client/src/stylesheets/main.scss | 4 +- 3 files changed, 96 insertions(+), 12 deletions(-) create mode 100644 client/src/stylesheets/components/_Login.scss diff --git a/client/src/components/Login.js b/client/src/components/Login.js index 6bcb5fde..f4b4a5ff 100644 --- a/client/src/components/Login.js +++ b/client/src/components/Login.js @@ -3,25 +3,39 @@ import PropTypes from 'prop-types'; import { withRouter } from 'react-router'; import { Button } from 'react-bootstrap'; -const NavBarSignIn = ({ auth, firebaseSignInGoogle, firebaseSignInFacebook, router }) => { +const Login = ({ auth, firebaseSignInGoogle, firebaseSignInFacebook, router }) => { if (auth.status === 'SIGNED_IN' && router.location.state.createCampaignFlow === true) { router.push('/create-campaign'); } return ( -
- To continue please sign in:{' '} - {' '} - +
+
+

CREATE A LOG-IN

+
+ SIGN WITH:{' '} + + OR + {' '} +
+
+
+

Sign up to create a campaign

+

As a campaign supporter,

+

your account lets you access your

+

campaign and make progress.

+

You can only sign one campaign

+

at a time.

+
); }; -NavBarSignIn.propTypes = { +Login.propTypes = { auth: PropTypes.shape({}).isRequired, firebaseSignInGoogle: PropTypes.func.isRequired, firebaseSignInFacebook: PropTypes.func.isRequired, @@ -30,4 +44,4 @@ NavBarSignIn.propTypes = { }).isRequired }; -export default withRouter(NavBarSignIn); +export default withRouter(Login); diff --git a/client/src/stylesheets/components/_Login.scss b/client/src/stylesheets/components/_Login.scss new file mode 100644 index 00000000..d02f9253 --- /dev/null +++ b/client/src/stylesheets/components/_Login.scss @@ -0,0 +1,68 @@ +.campaign-sign-in-container { + align-items: center; + display: flex; + justify-content: center; +} + +.create-a-login-title { + font-weight: 700; + margin-bottom: 50px; + margin-top: 100px; + text-decoration: underline; +} + +.facebook-login-btn, +.google-login-btn { + margin-bottom: 10px; + margin-top: 10px; +} + +.sign-in-container { + background-color: #F2F2F2; + color: #22556f; + display: flex; + flex-direction: column; + margin: auto; + padding: 30px; + width: 100%; +} + +.sign-in-explaination { + margin-top: 150px; + padding: 40px; +} + +.sign-up-campaign-body { + font-style: italic; +} + +.sign-up-campaign-title { + font-weight: 700; + margin-bottom: 10px; + text-decoration: underline; +} + +.title-and-signin-container { + align-items: center; + display: flex; + flex-direction: column; + width: 30%; +} + +@media screen and (max-width: 906px) { + .campaign-sign-in-container { + flex-direction: column; + } + + .sign-in-container { + width: 272px; + } + + .sign-in-explaination { + margin-top: 30px; + } + + .title-and-signin-container { + width: 272px; + } +} \ No newline at end of file diff --git a/client/src/stylesheets/main.scss b/client/src/stylesheets/main.scss index f771bfdd..be2ca406 100644 --- a/client/src/stylesheets/main.scss +++ b/client/src/stylesheets/main.scss @@ -45,7 +45,9 @@ 'components/TenantOrPMChoice', 'components/RecyclingInfo', 'components/AdminAddSigantureModal', - 'components/NotFound'; + 'components/NotFound', + 'components/Login'; + //Do not change the order of these imports: