From f5c653551ac54e51b736caa2a2be77e4eaec87b1 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Sun, 11 Nov 2018 20:39:20 -0800 Subject: [PATCH] First design of first factor page. --- client-react/package-lock.json | 13 ++- client-react/src/App.css | 32 ------- .../src/first-factor/index.module.css | 80 ++++++++++++++++ client-react/src/first-factor/index.tsx | 92 ++++++++++++++++--- client-react/src/index.css | 1 + client-react/src/logo.svg | 8 +- 6 files changed, 172 insertions(+), 54 deletions(-) create mode 100644 client-react/src/first-factor/index.module.css diff --git a/client-react/package-lock.json b/client-react/package-lock.json index 374e4b69..5a73f60e 100644 --- a/client-react/package-lock.json +++ b/client-react/package-lock.json @@ -5531,7 +5531,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5896,7 +5897,8 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5944,6 +5946,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5982,11 +5985,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.2", - "bundled": true + "bundled": true, + "optional": true } } }, diff --git a/client-react/src/App.css b/client-react/src/App.css index 92f956e8..e69de29b 100644 --- a/client-react/src/App.css +++ b/client-react/src/App.css @@ -1,32 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 40vmin; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/client-react/src/first-factor/index.module.css b/client-react/src/first-factor/index.module.css new file mode 100644 index 00000000..22a85274 --- /dev/null +++ b/client-react/src/first-factor/index.module.css @@ -0,0 +1,80 @@ + +.mainContent { + width: 440px; + margin: 0 auto; + padding: 1.5em 3em 3em 3em; +} + +/* HEADER */ + +.header { + margin-bottom: 2em; + text-align: center; +} + +/* MAIN */ + +.frame { + box-shadow: rgba(0,0,0,0.14902) 0px 1px 1px 0px,rgba(0,0,0,0.09804) 0px 1px 2px 0px; + background-color: white; + border-radius: 5px; + padding: 0.5em 3em 3em 3em; +} + +.innerFrame { + width: 100%; +} + +.field { + width: 100%; + margin: 20px 0px; +} + +.field .input { + width: 100%; +} + +.controls { + display: inline-block; + width: 100%; + font-size: 0.875rem; +} + +.controls .rememberMe { + float: left; +} + +.controls .resetPassword { + padding: 12px 0px; + float: right; +} + +.controls .resetPassword a { + color: black; +} + +.buttons { + margin-top: 20px; +} + +.buttons button { + width: 100%; +} + +/* FOOTER */ + +.footer { + margin-top: 1em; + text-align: center; + font-size: 0.75em; + color: grey; +} + +.footer img { + width: 64px; + margin: 20px; +} + +.footer a { + color: grey; +} \ No newline at end of file diff --git a/client-react/src/first-factor/index.tsx b/client-react/src/first-factor/index.tsx index 601dd1e5..24005a82 100644 --- a/client-react/src/first-factor/index.tsx +++ b/client-react/src/first-factor/index.tsx @@ -1,20 +1,90 @@ import React, { Component } from "react"; import TextField from '@material-ui/core/TextField'; +import Button from '@material-ui/core/Button'; + +import FormControlLabel from '@material-ui/core/FormControlLabel'; +import Checkbox from '@material-ui/core/Checkbox'; + +import logo from '../logo.svg'; +import styles from "./index.module.css" + +interface State { + rememberMe: boolean; +} + +export class FirstFactor extends Component { + constructor(props: any) { + super(props) + this.state = { + rememberMe: false + } + } + + toggleRememberMe = () => { + this.setState({ + rememberMe: !(this.state.rememberMe) + }) + } -export class FirstFactor extends Component { render() { return ( -
- - - - +
+
+

Sign in

+
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+ + } + label="Remember me" + /> +
+ +
+
+ +
+
+
+
+
+ logo +
Powered by Authelia
+
) } diff --git a/client-react/src/index.css b/client-react/src/index.css index cee5f348..85fac3cb 100644 --- a/client-react/src/index.css +++ b/client-react/src/index.css @@ -6,6 +6,7 @@ body { sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + background: #eee; } code { diff --git a/client-react/src/logo.svg b/client-react/src/logo.svg index 6b60c104..7c365be4 100644 --- a/client-react/src/logo.svg +++ b/client-react/src/logo.svg @@ -1,7 +1 @@ - - - - - - - + \ No newline at end of file