Skip to content

Commit

Permalink
Merge pull request #125 from canyener/styling-login-page
Browse files Browse the repository at this point in the history
Styling login page
  • Loading branch information
canyener authored May 3, 2020
2 parents 87ab4ba + 83d74de commit a7cc02d
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 9 deletions.
Binary file added public/images/bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/components/LoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import { connect } from 'react-redux'
import { startLogin } from '../actions/auth'

export const LoginPage = ({ startLogin }) => (
<div>
<button onClick={startLogin}>Login</button>
<div className="box-layout">
<div className="box-layout__box">
<h1 className="box-layout__title">Expensify</h1>
<p>It's time to get your expenses under control.</p>
<button className="button" onClick={startLogin}>Login with Google</button>
</div>
</div>
)

Expand Down
10 changes: 10 additions & 0 deletions src/styles/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ html {
}

body {
color: $dark-grey;
font-family: Helvetica, Arial, sans-serif;
font-size: $m-size;
line-height: 1.6;
}

button {
cursor: pointer;
}

button:disabled {
cursor: default;
}

.is-active {
Expand Down
9 changes: 8 additions & 1 deletion src/styles/base/_settings.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
//Colors
$dark-blue: #333745;
$dark-grey: #333333;
$blue: #1c88bf;

// Font Size
$font-size-large: 1.8rem;

//Spacing
$m-size: 1.6rem;
$s-size: 1.2rem;
$m-size: 1.6rem;
$l-size: 3.2rem;
22 changes: 22 additions & 0 deletions src/styles/components/_box-layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.box-layout {
align-items: center;
background: url('/images/bg.jpg');
background-size: cover;
display: flex;
height: 100vh;
justify-content: center;
width: 100vw;
}

.box-layout__box {
background: fade-out(white, .15);
border-radius: 3px;
padding: $l-size $m-size;
text-align: center;
width: 25rem;
}

.box-layout__title {
margin: 0 0 $m-size 0;
line-height: 1;
}
8 changes: 8 additions & 0 deletions src/styles/components/_button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.button {
background: $blue;
border: none;
color: white;
font-size: $font-size-large;
font-weight: 300;
padding: $s-size;
}
4 changes: 3 additions & 1 deletion src/styles/styles.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '/base/normalize';
@import '/base/settings';
@import '/base/base';
@import '/base/base';
@import './components/box-layout';
@import './components/button';
25 changes: 20 additions & 5 deletions src/tests/components/__snapshots__/LoginPage.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`LoginPage #Snapshots Should render LoginPage correctly 1`] = `
<div>
<button
onClick={[Function]}
<div
className="box-layout"
>
<div
className="box-layout__box"
>
Login
</button>
<h1
className="box-layout__title"
>
Expensify
</h1>
<p>
It's time to get your expenses under control.
</p>
<button
className="button"
onClick={[Function]}
>
Login with Google
</button>
</div>
</div>
`;

0 comments on commit a7cc02d

Please sign in to comment.