Skip to content

Commit

Permalink
Adding first parts of frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Haltz01 committed Oct 18, 2019
1 parent c8367e2 commit 56a29f6
Show file tree
Hide file tree
Showing 15 changed files with 10,945 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"react-router-dom": "^5.1.2"
}
}
24 changes: 24 additions & 0 deletions price-optimizer-frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
35 changes: 35 additions & 0 deletions price-optimizer-frontend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "price-optimizer-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"bootstrap": "^4.3.1",
"jquery": "^3.4.1",
"react": "^16.10.2",
"react-bootstrap": "^1.0.0-beta.14",
"react-dom": "^16.10.2",
"react-router-dom": "^5.1.2",
"react-scripts": "3.2.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
43 changes: 43 additions & 0 deletions price-optimizer-frontend/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<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="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>
</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>
25 changes: 25 additions & 0 deletions price-optimizer-frontend/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
2 changes: 2 additions & 0 deletions price-optimizer-frontend/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
11 changes: 11 additions & 0 deletions price-optimizer-frontend/src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
body {
background: #f5f5f5;
}

html, body {
height: 100%;
}

body, input, button { /* Input e button, por padrão, não herdam a fonte do corpo do HTML */
font-family: Arial, Helvetica, sans-serif;
}
12 changes: 12 additions & 0 deletions price-optimizer-frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import './App.css'

import Routes from './routes';

function App() {
return (
<Routes />
);
}

export default App;
11 changes: 11 additions & 0 deletions price-optimizer-frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'; // Bilbioteca do React
import ReactDOM from 'react-dom'; // Versão do React que lida com a DOM (árvore de elementos)
import 'bootstrap'; // Bliblioteca para CSS
import 'jquery';
import 'popper.js';

import 'bootstrap/dist/css/bootstrap.css';

import App from './App';

ReactDOM.render(<App />, document.getElementById('root')); // Renderiza App (arquivo javascript com html) dentro da div de id 'root'
111 changes: 111 additions & 0 deletions price-optimizer-frontend/src/pages/Main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
@-webkit-keyframes maintitleAnimation {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}
@-moz-keyframes maintitleAnimation {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}
@keyframes maintitleAnimation {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}

.mainPageTitleBlock {
border-radius: 20px;
background: linear-gradient(92deg, #006bff, #000000, #ff0000, #00a306, #ffffff);
background-size: 400% 400%;
-webkit-animation: maintitleAnimation 30s ease infinite;
-moz-animation: maintitleAnimation 30s ease infinite;
animation: maintitleAnimation 30s ease infinite;
}

.mainPageTitle {
font-weight: bold;
font-size: 50px;
color: #ffffff;
}

.formInsertCards {
background: #ffffffe3;
border-radius: 10px;
}

.insertCardButton {
border: 3px solid rgb(0, 0, 0);
background: #ffffff;
font-weight: bold;
text-decoration: none;
outline: none;
color: rgb(0, 0, 0);
}

.insertCardButton:hover {
transition-duration: 0.3s;
border: 3px solid rgb(0, 255, 221);
color: rgb(0, 255, 221);
}

.group {
position: relative;
margin: 45px 0;
}

textarea {
resize: none;
}

input {
background: none;
color: #c6c6c6;
font-size: 22px;
padding: 10px 10px 10px 5px;
display: block;
width: 320px;
border: none;
border-radius: 0;
border-bottom: 1px solid #c6c6c6;
}
input:focus {
outline: none;
}

input:focus ~ label, input:valid ~ label {
top: -14px;
font-size: 16px;
color: rgb(3, 3, 3);
}

input:focus ~ .bar:before {
width: 320px;
}

label {
color: #c6c6c6;
font-size: 16px;
font-weight: normal;
position: absolute;
pointer-events: none;
left: 5px;
top: 10px;
transition: 300ms ease all;
}

.bar {
position: relative;
display: block;
width: 320px;
}
.bar:before {
content: '';
height: 2px;
width: 0;
bottom: 0px;
position: absolute;
background: rgb(0, 255, 221);
transition: 300ms ease all;
left: 0%;
}
30 changes: 30 additions & 0 deletions price-optimizer-frontend/src/pages/Main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';

import './Main.css'

export default function Main() {
return (
<div className="container bg-light p-4">
<div className="mainPageTitleBlock row d-flex flex-column align-itens center justify-content-center text-center shadow p-4">
<h1 className="mainPageTitle"> MTG Price Optimizer </h1>
<h3 className="text-white"> Aqui tem que ir uma descrição do que fazer </h3>
</div>
<div className="row d-flex mt-4">
<div className="formInsertCards d-flex flex-column shadow justify-content-center align-itens-center p-4 m-2 col">
<div className="d-flex justify-content-center">
<div class="group">
<input type="text" required="required"/>
<span class="highlight"></span>
<span class="bar"></span>
<label>Quantidade e nome da carta</label>
</div>
</div>
<button className="insertCardButton mx-auto w-75 p-2"> INSERIR NA LISTA </button>
</div>
<div className="formInsertCards resultListCards shadow p-4 m-2 col">

</div>
</div>
</div>
);
}
12 changes: 12 additions & 0 deletions price-optimizer-frontend/src/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import { BrowserRouter, Route } from 'react-router-dom';

import Main from './pages/Main';

export default function Routes() {
return (
<BrowserRouter>
<Route path="/" exact component={ Main }/>
</BrowserRouter>
);
}
Loading

0 comments on commit 56a29f6

Please sign in to comment.