Skip to content

Commit

Permalink
Frontend first view with style
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo S. de Paula committed Mar 28, 2020
1 parent 05519aa commit 1560f0d
Show file tree
Hide file tree
Showing 25 changed files with 553 additions and 316 deletions.
1 change: 0 additions & 1 deletion frontend/frontend
Submodule frontend deleted from 80b3e4
2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"@testing-library/user-event": "^7.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-icons": "^3.9.0",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1"
},
"scripts": {
Expand Down
Binary file removed frontend/public/favicon.ico
Binary file not shown.
34 changes: 3 additions & 31 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,14 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>

<title>Be The Hero</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file removed frontend/public/logo192.png
Binary file not shown.
Binary file removed frontend/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions frontend/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/public/robots.txt

This file was deleted.

38 changes: 0 additions & 38 deletions frontend/src/App.css

This file was deleted.

23 changes: 5 additions & 18 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';

import Routes from './routes'

import './global.css'

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<Routes></Routes>
);
}

Expand Down
9 changes: 0 additions & 9 deletions frontend/src/App.test.js

This file was deleted.

Binary file added frontend/src/assets/heroes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions frontend/src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions frontend/src/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

* {
margin:0;
padding: 0;
outline: 0;
box-sizing: border-box;

}

body {
font: 400 14px Roboto, sans-serif;
background: #f0f0f5;
-webkit-font-smoothing: antialiased;
}

input, button, textarea {
font: 400 18px Roboto, sans-serif;
}

form input {
width: 100%;
height: 60px;
color: #3333;
border: 1px solid #ececd6;
border-radius: 8px;
padding: 0 24px
}

.button {
width: 100%;
height: 60px;
background: #e02041;
border: 0px solid #ececd6;
border-radius: 8px;
color: #fff;
font-weight: bold;
margin-top: 16px;
display: inline-block;
text-align: center;
text-decoration: none;
font-size: 18px;
line-height: 60px;
transition: filter 0.2s;
}

.button:hover {
filter: brightness(90%)
}
button {
cursor: pointer;
}

.back-link {
display: flex;
align-items: center;
margin-top:40px;
color: #41414d;
font-size: 18px;
text-decoration: none;
font-weight: 500;
transition: opacity 0.2s;
}
.back-link svg {
margin-right: 8px;
}
.back-link:hover {
opacity: 0.8;
}
13 changes: 0 additions & 13 deletions frontend/src/index.css

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';

import App from './App';
import * as serviceWorker from './serviceWorker';

Expand Down
7 changes: 0 additions & 7 deletions frontend/src/logo.svg

This file was deleted.

28 changes: 28 additions & 0 deletions frontend/src/pages/Logon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';
import {FiLogIn} from 'react-icons/fi';
import { Link } from 'react-router-dom'

import './styles.css';

import heroesImg from '../../assets/heroes.png'
import logoImg from '../../assets/logo.svg'

export default function Logon(){
return(
<div className="logon-container">
<section className="form">
<img src={logoImg} alt="Be The Hero"></img>
<form>
<h1>Faça seu login</h1>
<input placeholder="Sua ID"></input>
<button className="button" type="submit">Entrar</button>
<Link className="back-link" to="/register">
<FiLogIn size={16} color="#e02041"></FiLogIn>
Não tenho Cadastro
</Link>
</form>
</section>
<img src={heroesImg} alt="Heroes"></img>
</div>
);
}
24 changes: 24 additions & 0 deletions frontend/src/pages/Logon/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.logon-container {
width: 100%;
max-width: 1120px;
height: 100vh;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
}

.logon-container section.form {
width: 100%;
max-width: 350px;
margin-right: 30px;
}

.logon-container section.form form {
margin-top: 100px;
}

.logon-container section.form form h1 {
font-size: 32px;
margin-bottom: 32px;
}
40 changes: 40 additions & 0 deletions frontend/src/pages/Register/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import {FiArrowLeft} from 'react-icons/fi';

import { Link } from 'react-router-dom'

import './styles.css';

import heroesImg from '../../assets/heroes.png'
import logoImg from '../../assets/logo.svg'

export default function Register(){
return(
<div className="register-container">
<div className="content">
<section>
<img src={logoImg} alt="Be The Hero"></img>
<h1>Cadastro</h1>
<p>Faça seu cadastro</p>
<Link className="back-link" to="/">
<FiArrowLeft size={16} color="#e02041"></FiArrowLeft>
Não tenho Cadastro
</Link>
</section>

<form>
<input placeholder="Nome da ONG"></input>
<input type="email" placeholder="E-mail"/>
<input type="number" placeholder="Whatsapp"/>

<div className="input-group">
<input type="text" placeholder="Cidade"/>
<input type="text" placeholder="UF" style={{width:80}}/>
</div>
<button className="button" type="submit">Cadastrar</button>

</form>
</div>
</div>
);
}
Loading

0 comments on commit 1560f0d

Please sign in to comment.