Skip to content

Commit

Permalink
Merge pull request #156 from WrippleFoss/feature/form-setup-login-screen
Browse files Browse the repository at this point in the history
Feature/form setup login screen
  • Loading branch information
abhishek71994 authored Nov 29, 2019
2 parents 21efd0f + 823ea4c commit a6a1978
Show file tree
Hide file tree
Showing 25 changed files with 2,043 additions and 363 deletions.
4 changes: 4 additions & 0 deletions src-view/Routes.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import React from 'react'
import LandingView from './views/LandingView'
import { Router } from '@reach/router'
import LoginView from './views/LoginView'

import SignUpView from './views/SignUpView'
export default () => {
return (
<Router>
<LandingView path='/' />
<LoginView path='/login' />
<SignUpView path='/sign-up' />
</Router>
)
}
49 changes: 49 additions & 0 deletions src-view/assets/styles/LoginView.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@import './mixins';

.loginDiv {
display: flex;
justify-content: center;
align-content: center;
flex-direction: column;
align-self: center;
flex-shrink: 1;
padding: 5rem 0rem;
width: 80%;
max-width: 36rem;

>a {
cursor: pointer;
align-self: center;
margin-top: 1rem;
}

>h1 {
align-self: center;
font-weight: 400;
}

@include for-desktop {
box-shadow: 0px 0px 30px -2px rgba(150, 144, 150, 0.85);
padding: 5rem 3rem;
width: 50%;

}

&Wrapper {
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
}

.loginForm {
display: flex;
flex-direction: column;
margin: 2rem 0 0 0;

>button {
width: 100%;
margin: 2rem 0 0 0;
}
}
}
43 changes: 43 additions & 0 deletions src-view/assets/styles/SignUpView.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@import './mixins';

.signUpDiv {
display: flex;
justify-content: center;
align-content: center;
flex-direction: column;
align-self: center;
flex-shrink: 1;
padding: 5rem 0rem;
width: 80%;
max-width: 36rem;

>h1 {
align-self: center;
font-weight: 400;
}

@include for-desktop {
box-shadow: 0px 0px 30px -2px rgba(150, 144, 150, 0.85);
padding: 5rem 3rem;
width: 50%;

}

&Wrapper {
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
}

.signUpForm {
display: flex;
flex-direction: column;
margin: 2rem 0 0 0;

>button {
width: 100%;
margin: 2rem 0 0 0;
}
}
}
2 changes: 1 addition & 1 deletion src-view/assets/styles/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

$primary-violet: hsl(277, 49%, 52%);
$primary-green: #28E2BC;

Expand All @@ -8,6 +7,7 @@ $primary-green: #28E2BC;
--gray: hsl(0, 0%, 65%);
--space: 1.25rem;
--ruby: #ff9494;
--red: #ee534c;
--violet: #{$primary-violet};
--light-violet: #ECCCFF;
--green: #{$primary-green};
Expand Down
33 changes: 32 additions & 1 deletion src-view/assets/styles/components/AppLayout.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
@import '../mixins';

.AppLayout {
display: flex;
.navbar {
padding: 1rem;
box-shadow: 0px 2px 5px rgba(68, 68, 68, 0.6);
}

display: flex;
flex-direction: column;

.childContent {
position: relative;
flex: 1;
padding: 0 1rem;
margin-bottom: 2rem;

@include for-desktop {
padding: 0 1.625rem;
}


&Wrapper {
display: flex;
flex-flow: column;
min-height: 90vh;

@include for-desktop {
flex-flow: row;
}
}

}
}
11 changes: 11 additions & 0 deletions src-view/assets/styles/components/FormikError.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import '../variables';

.error {
transition: all ease 0.3s;
color: var(--red);
margin: 0 0.5rem;

&.hasError {
margin: 0.5rem;
}
}
8 changes: 8 additions & 0 deletions src-view/assets/styles/components/Navbar.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.navbar {
display: flex;

.navRight {
font-weight: 600;
display: flex;
flex-grow: 1;
justify-content: flex-end;
margin-top: 0.5rem;
}
}
27 changes: 27 additions & 0 deletions src-view/components/FormikError.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
import styles from "../assets/styles/components/FormikError.module.scss";

const FormikError = ({ name, error, touched }) => {
const hasError = error[name] && touched[name];
return (
<div className={classNames(styles.error, hasError && styles.hasError)}>
{hasError ? errors[name] : ""}
</div>
);
};

FormikError.propTypes = {
name: PropTypes.string,
error: PropTypes.object,
touched: PropTypes.object,
};

FormikError.defaultProps = {
name: "",
error: {},
touched: {},
};

export default FormikError;
9 changes: 8 additions & 1 deletion src-view/components/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { Link } from '@reach/router'

import { Button } from 'semantic-ui-react'
import Masterlogo from '../assets/logo/master-logo.png'
import styles from '../assets/styles/components/Navbar.module.scss'

Expand All @@ -12,6 +12,13 @@ const Navbar = () => {
<img src={Masterlogo} />
</Link>
</div>
<div className={styles.navRight}>
<Link to='/login'>
<Button basic color='blue'>
Login
</Button>
</Link>
</div>
</nav>
)
}
Expand Down
10 changes: 10 additions & 0 deletions src-view/components/TextInput.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React, { useState } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
import { Field } from "formik";
import FormikError from "../components/FormikError";

const TextInput = {
errors,
touched
};
1,409 changes: 1,409 additions & 0 deletions src-view/dist/src-view.77168581.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src-view/dist/src-view.77168581.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src-view/dist/src-view.93c8e8a2.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src-view/dist/src-view.93c8e8a2.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a6a1978

Please sign in to comment.