add react-app
This commit is contained in:
parent
6b0b0c1a66
commit
d02015032a
17572
react-app/package-lock.json
generated
Normal file
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
38
react-app/package.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
BIN
react-app/public/favicon.ico
Normal file
BIN
react-app/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
20
react-app/public/index.html
Normal file
20
react-app/public/index.html
Normal 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>
|
BIN
react-app/public/logo192.png
Normal file
BIN
react-app/public/logo192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
BIN
react-app/public/logo512.png
Normal file
BIN
react-app/public/logo512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
25
react-app/public/manifest.json
Normal file
25
react-app/public/manifest.json
Normal 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"
|
||||
}
|
3
react-app/public/robots.txt
Normal file
3
react-app/public/robots.txt
Normal file
@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
0
react-app/src/components/app/app.css
Normal file
0
react-app/src/components/app/app.css
Normal file
17
react-app/src/components/app/app.js
vendored
Normal file
17
react-app/src/components/app/app.js
vendored
Normal 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;
|
6
react-app/src/components/header/css/bootstrap-grid.min.css
vendored
Normal file
6
react-app/src/components/header/css/bootstrap-grid.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6
react-app/src/components/header/css/bootstrap.min.css
vendored
Normal file
6
react-app/src/components/header/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
122
react-app/src/components/header/css/header.css
Normal file
122
react-app/src/components/header/css/header.css
Normal 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 */
|
50
react-app/src/components/header/header.js
vendored
Normal file
50
react-app/src/components/header/header.js
vendored
Normal 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;
|
BIN
react-app/src/components/header/img/logo/logoPayDay.png
Normal file
BIN
react-app/src/components/header/img/logo/logoPayDay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
13
react-app/src/index.css
Normal file
13
react-app/src/index.css
Normal 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
11
react-app/src/index.js
vendored
Normal 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>
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user