add react-app

This commit is contained in:
bruhmagedon 2023-07-29 00:47:01 +03:00
parent 6b0b0c1a66
commit d02015032a
17 changed files with 17883 additions and 0 deletions

17572
react-app/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

38
react-app/package.json Normal file
View File

@ -0,0 +1,38 @@
{
"name": "payday-react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,20 @@
<!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="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -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"
}

View File

@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

View File

17
react-app/src/components/app/app.js vendored Normal file
View File

@ -0,0 +1,17 @@
import { Component } from "react";
import Header from "../header/header";
import "./app.css";
class App extends Component {
state = {};
render() {
return (
<div className="app">
<Header />
</div>
);
}
}
export default App;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,122 @@
* {
font-family: "Roboto", sans-serif;
}
header {
position: relative;
height: 83px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-ms-flex-line-pack: center;
align-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background-color: #fff;
}
.menu {
width: 435px;
height: 58px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: left;
-ms-flex-pack: left;
justify-content: left;
-ms-flex-line-pack: center;
align-content: center;
margin-left: 88px;
}
.menu_logo {
width: 40px;
height: 52px;
}
.menu_project_name {
margin-left: 20px;
}
.menu_project_name_text {
color: #20d37d;
font-size: 48px;
font-style: normal;
font-weight: 500;
}
.menu_hamburger {
display: block;
position: absolute;
left: 50px;
top: 17px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
height: 50px;
width: 50px;
background-color: #20d37d;
border-radius: 9px;
}
.menu_hamburger span {
display: block;
height: 5px;
width: 32px;
background-color: #fff;
margin: 0 9px 6px 9px;
}
.menu_hamburger span:nth-child(1) {
margin-top: 12px;
}
.menu_hamburger span:nth-child(3) {
margin-bottom: 12px;
}
.menu_hamburger_active {
margin-top: 6px;
-webkit-transition: 0.8 all;
transition: 0.8 all;
}
.menu_hamburger_active span:nth-child(1) {
margin-top: -2px;
-webkit-transform: translateY(3px) rotate(-45deg);
transform: translateY(3px) rotate(-45deg);
}
.menu_hamburger_active span:nth-child(2) {
display: none;
}
.menu_hamburger_active span:nth-child(3) {
margin-top: -2px;
-webkit-transform: translateY(3px) rotate(45deg);
transform: translateY(3px) rotate(45deg);
}
.header_login {
height: 100%;
padding-left: 19px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin-right: 10px;
width: 290px;
height: 71px;
background-color: #43ca79;
border-radius: 40px;
color: #fff;
font-size: 32px;
font-style: normal;
font-weight: 500;
}
.header_login_text {
padding-top: 6px;
height: 100%;
margin-left: 10px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: #000;
font-size: 22px;
font-style: normal;
font-weight: 500;
} /*# sourceMappingURL=style.css.map */

View File

@ -0,0 +1,50 @@
import { Component } from "react";
import "./css/header.css";
import "./css/bootstrap-grid.min.css";
import "./css/bootstrap.min.css";
import logo from "./img/logo/logoPayDay.png";
class Header extends Component {
state = {
hamburgerActive: false,
};
onHambClick = () => {
this.setState(({ hamburgerActive }) => ({
hamburgerActive: !hamburgerActive,
}));
};
render() {
const { hamburgerActive } = this.state;
const hamburgerMenuClass =
"menu_hamburger" + (hamburgerActive ? "_active" : "");
return (
<header className="header_menu">
<div className="menu">
<div
className={hamburgerMenuClass}
onClick={this.onHambClick}
>
<span></span>
<span></span>
<span></span>
</div>
<img src={logo} alt="logo" className="menu_logo" />
<div className="menu_project_name menu_project_name_text">
Имя проекта
</div>
</div>
<div className="header_login">
Вход через <span className="header_login_text">ЕСИА</span>
</div>
</header>
);
}
}
export default Header;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

13
react-app/src/index.css Normal file
View File

@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

11
react-app/src/index.js vendored Normal file
View File

@ -0,0 +1,11 @@
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./components/app/app";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);