This commit is contained in:
Vovchik
2025-04-09 19:26:35 +03:00
commit 2d3d58c43f
57 changed files with 20270 additions and 0 deletions

23
.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
# 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.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

70
README.md Normal file
View File

@@ -0,0 +1,70 @@
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

17714
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

47
package.json Normal file
View File

@@ -0,0 +1,47 @@
{
"name": "service",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.2.0",
"@testing-library/user-event": "^13.5.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-modal": "^3.16.3",
"react-router-dom": "^7.4.0",
"react-scripts": "^5.0.1",
"styled-components": "^6.1.15",
"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"
]
},
"devDependencies": {
"autoprefixer": "^10.4.21",
"postcss": "^8.5.3",
"tailwindcss": "^4.0.14"
}
}

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

9
public/images/1 poc.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 96 KiB

9
public/images/2 poc.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 101 KiB

9
public/images/3 poc.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 123 KiB

9
public/images/4 poc.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 131 KiB

21
public/images/5 poc.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 88 KiB

9
public/images/6 poc.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 111 KiB

View File

@@ -0,0 +1,9 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M0 0H48V48H0V0Z" fill="url(#pattern0_3_5)"/>
<defs>
<pattern id="pattern0_3_5" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_3_5" transform="scale(0.00520833)"/>
</pattern>
<image id="image0_3_5" width="192" height="192" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAAAHlBMVEVMaXEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABKvP01AAAACXRSTlMA5iAQoYvIXDgsH2ZiAAAACXBIWXMAACxLAAAsSwGlPZapAAACUUlEQVR4nO3byXbDIAxA0XgO///DzemiPREY4QBGat/dJgthC4MYHg8AAAAAAAAAAAAAAAAAAFBhOdZ9CmHa12MZHcsH5vUV/I91Hh3PRcsWhG10SJfMk4z/lUqOXsIzEb+nFqSev6cWLCfxh7D7+BpF/ddZT57P4w/BQxKtuQY4eAXZFxAm+73gyDYgHKPjU2UzyEMO7fkG7KPjUykNmEbHp0pPI36Nju+S5Yhbc/ZPo7VDNC1KptC82a0dnnonTtQOht7CImOL/mG9dhChRQPZSe3wHBFrikihaCphvXaQtcGq/J5p6ghLlB/yud5dO8y7MkwpZFB31w5nCVsqGgTurh2UmaYav3ym8hsr/t6+FzSO//7aoSqDEh9G5Y3KT1Y9ZaqclZoe3F47fNyJpy35Sbm/dpg/6MaZKfI/rR3MiqYV9stPoaB2sE2Oa+0/o72JBthfBBNkClmYUF+h1Q7G6bVDK7U1Qaleq6i1NUGpboNAZU1QHH+3ov6m+Pstq9ySQT0XVWpqglJdlxa7d+KT2qFhCzp2Y3vL6wCAP6mmJrAwWNVPJwbvBbeYTAw9ttIg/rH7kG0mpANb0KgmGNeCVjXBuHOkrWoC+wfQ3sV7AEYOFJSTyeftFeiHP8yTewDultDlIOguh+TmvLdtJOcbefEegIOtVPeb2e6PIisvwH4ndn8c3/2FiPODld9dwMFUIptDHvaC3V/Lcn8xLne8eHRohawf8NZ5v55r/5KDzvY1kyJvKzHd94K7MHvVCgAAAAAAAAAAAAAAAAAAN74AN6d3Z4l5lSUAAAAASUVORK5CYII="/>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

11
public/images/box 1.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 153 KiB

11
public/images/box 2.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 190 KiB

18
public/images/box 3.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 103 KiB

18
public/images/box 4.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 166 KiB

BIN
public/images/caR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 96 KiB

9
public/images/car.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 101 KiB

9
public/images/dost.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

9
public/images/info.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

1
public/images/logo.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

9
public/images/return.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

23
public/index.html Normal file
View File

@@ -0,0 +1,23 @@
<!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" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<title>QuickDrops - Delivery Service</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>

BIN
public/logo192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
public/logo512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

25
public/manifest.json Normal file
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"
}

3
public/robots.txt Normal file
View File

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

466
src/App.css Normal file
View File

@@ -0,0 +1,466 @@
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f8f8f8;
color: #333;
}
.app {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* Header Styles */
.header {
background-color: #E4975F;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
padding: 10px 0;
}
.header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.header .logo {
display: flex;
align-items: center;
font-size: 1.5em;
font-family: 'DM Serif Display';
font-style: normal;
font-weight: 600;
font-size: 24px;
line-height: 100%;
}
.header .logo img {
margin-right: 10px;
}
.header nav a {
margin-left: 60px;
text-decoration: none;
color: white;
font-family: "Poppins",sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
}
.header .order-button {
background-color: #477758;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 11px;
width: 100px;
font-family: "Poppins",sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
}
/* Hero Section Styles */
.hero-section {
padding: 40px 0;
background-color: #F1E7D6;
}
.hero-section .container {
display: flex;
align-items: center;
/* Добавлено для вертикального выравнивания */
}
.hero-section .hero-image {
flex: 1;
padding-right: 20px;
}
.hero-section .hero-image img {
vertical-align: middle;
}
.hero-section .hero-content {
flex: 1;
}
.hero-section h1 {
font-size: 60px;
margin-bottom: 10px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
line-height: 120%;
}
.hero-section p {
font-size: 19px;
color: #6C6762;
margin-bottom: 20px;
font-family: "Poppins", sans-serif;
font-style: normal;
font-weight: 500;
}
.hero-section .buttons .shop-button {
background-color: #FF9800;
color: white;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 8px;
margin-right: 10px;
width: 200px;
}
.hero-section .buttons .cart-button {
background-color: #E99B62;
color: white;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 8px;
width: 200px;
}
/* About Delivery Styles */
.about-delivery {
background-color: #F1E7D6;
padding: 40px 0;
}
.about-delivery .container {
text-align: center;
}
.about-delivery h2 {
margin-bottom: 30px;
text-align: left;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 68px;
}
.about-delivery .delivery-cards {
display: flex;
justify-content: space-around;
}
.about-delivery .delivery-card {
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 378px;
height: 525px;
}
.about-delivery .delivery-card img {
width: 100%;
border-radius: 10px;
margin-bottom: 15px;
}
.about-delivery .delivery-card h3 {
font-size: 1.3em;
margin-bottom: 10px;
}
.about-delivery .delivery-card p {
color: #666;
}
/* Monitor Delivery Styles */
.monitor-delivery {
padding: 40px 0;
background-color: #FDF6EB;
}
.monitor-delivery .container {
text-align: center;
}
.monitor-delivery h2 {
margin-bottom: 30px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 80px;
line-height: 120%;
/* identical to box height, or 108px */
text-align: center;
color: #313033;
}
.monitor-delivery .monitor-cards {
display: flex;
justify-content: space-around;
}
.monitor-delivery .monitor-card {
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 375px;
height: 574px;
margin: 10px;
background-color: white;
}
.monitor-delivery .monitor-card img {
width: 100%;
border-radius: 10px;
margin-bottom: 15px;
}
.monitor-delivery .monitor-card h3 {
font-size: 1.3em;
margin-bottom: 10px;
}
.monitor-delivery .monitor-card p {
color: #666;
}
/* Secure Checkout Styles */
.secure-checkout {
background-color: #F2E9DA;
padding: 40px 0;
}
.secure-checkout .container {
text-align: center;
}
.secure-checkout .checkout-cards {
display: flex;
justify-content: space-around;
}
.secure-checkout .checkout-card {
background-color: #e0e0e0;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 771px;
height: 431px;
margin: 39px;
}
.secure-checkout .checkout-card .icon-container {
width: 131px;
height: 128px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
}
.secure-checkout .checkout-card h3 {
margin-bottom: 10px;
color: #F9F9F2;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 36px;
line-height: 120%;
/* identical to box height, or 43px */
color: #F9F9F2;
}
.secure-checkout .checkout-card p {
color: #E1EBDD;
margin-bottom: 20px;
height: 102px;
line-height: 230%;
padding: 10px;
width: 457px;
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 212.5%;
}
.secure-checkout .checkout-card button {
background-color: #67816B;
color: white;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 68px;
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 15px;
line-height: 120%;
/* identical to box height, or 24px */
text-align: center;
color: #FDE5D0;
}
/* Delivery Options Styles */
.delivery-options {
padding: 40px 0;
background-color: #E2935D;
}
.delivery-options .container {
text-align: center;
}
.delivery-options .delivery-content {
display: flex;
align-items: center;
}
.delivery-options .delivery-content img {
margin-right: 98px;
}
.delivery-options .delivery-content .text-content {
text-align: left;
position: relative;
top: -50px;
}
.delivery-options .delivery-content h2 {
margin-bottom: 10px;
color: white;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 60px;
line-height: 120%;
/* identical to box height, or 91px */
color: #FEFAF4;
}
.delivery-options .delivery-content p {
color: #FDE4CC;
margin-bottom: 20px;
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 200%;
}
.delivery-options .delivery-content button {
background-color: #67816B;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 68px;
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 18px;
line-height: 120%;
text-align: center;
color: #FDECD8;
}
/* Shipping Details Styles */
.shipping-details {
background-color: #F1E8D9;
padding: 40px 0;
}
.shipping-details .container {
text-align: center;
}
.shipping-details h2 {
margin-bottom: 30px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 70px;
line-height: 120%;
text-align: center;
color: #121113;
}
.shipping-details .shipping-forms {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.shipping-details .shipping-forms .shipping-form {
/*background-color: #F8F3E9;*/
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 45%;
margin-bottom: 20px;
}
.shipping-details .shipping-forms .shipping-form img {
width: 100%;
border-radius: 10px;
margin-bottom: 15px;
}
.shipping-details .shipping-forms .shipping-form h3 {
font-size: 1.3em;
margin-bottom: 10px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
line-height: 120%;
color: #2B2927;
}
.shipping-details .shipping-forms .shipping-form input,
.shipping-details .shipping-forms .shipping-form select {
width: 500px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
margin-bottom: 15px;
}
.shipping-details .shipping-forms .shipping-form a {
color: #4CAF50;
text-decoration: none;
}
/* Footer Styles */
.footer {
background-color: #333;
color: white;
text-align: center;
padding: 20px 0;
}

46
src/App.js Normal file
View File

@@ -0,0 +1,46 @@
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import Header from './components/Header';
import Footer from './components/Footer';
import HeroSection from './components/HeroSection';
import AboutDelivery from './components/AboutDelivery';
import DeliveryOptions from './components/DeliveryOptions';
import MonitorDelivery from './components/MonitorDelivery';
import SecureCheckout from './components/SecureCheckout';
import ShippingDetails from './components/ShippingDetails';
import DeliveryForm from './components/DeliveryForm';
import OrderTracking from './components/OrderTracking';
import './App.css';
function Home() {
return (
<>
<HeroSection />
<AboutDelivery />
<MonitorDelivery />
<SecureCheckout />
<DeliveryOptions />
<ShippingDetails />
<Footer/>
</>
);
}
function App() {
return (
<div className="App">
<Header />
<Routes>
{/* Parent Route */}
<Route path="/" element={<Home />} />
{/* Nested Routes */}
<Route path="/delivery-form" element={<DeliveryForm />} />
<Route path="/order-tracking" element={<OrderTracking />} />
</Routes>
</div>
);
}
export default App;

8
src/App.test.js Normal file
View File

@@ -0,0 +1,8 @@
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});

View File

@@ -0,0 +1,49 @@
/* About Delivery Styles */
.about-delivery {
background-color: #F1E7D6;
padding: 40px 0;
}
.about-delivery .container {
text-align: center;
}
.about-delivery h2 {
margin-bottom: 30px;
text-align: left;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 68px;
}
.about-delivery .delivery-cards {
display: flex;
justify-content: space-around;
}
.about-delivery .delivery-card {
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 378px;
height: 525px;
}
.about-delivery .delivery-card img {
width: 100%;
border-radius: 10px;
margin-bottom: 15px;
}
.about-delivery .delivery-card h3 {
font-size: 1.3em;
margin-bottom: 10px;
}
.about-delivery .delivery-card p {
color: #666;
}

View File

@@ -0,0 +1,29 @@
import React from 'react';
import './AboutDelivery.css';
function AboutDelivery() {
return (
<section className="about-delivery">
<div className="container">
<h2>About Our Delivery</h2>
<div className="delivery-cards">
<img src={process.env.PUBLIC_URL + '/images/1 poc.svg'} alt="Изображение" />
<img src={process.env.PUBLIC_URL + '/images/2 poc.svg'} alt="Изображение" />
<img src={process.env.PUBLIC_URL + '/images/3 poc.svg'} alt="Изображение" />
</div>
</div>
</section>
);
}
function DeliveryCard({ image, title, description }) {
return (
<div className="delivery-card">
<img src={image} alt={title} />
<h3>{title}</h3>
<p>{description}</p>
</div>
);
}
export default AboutDelivery;

View File

@@ -0,0 +1,67 @@
.delivery-form-container {
max-width: 800px;
margin: auto;
padding: 20px;
background-color: #67816B;
/* Цвет фона в стиле сайта */
border-radius: 8px;
position: relative;
top: 30px;
}
.delivery-form h2 {
text-align: center;
color: #d27c4b;
/* Цвет заголовка */
}
.delivery-form label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: white;
}
.delivery-form input,
.delivery-form select,
.delivery-form textarea {
width: 97%;
padding: 10px;
margin-bottom: 20px;
border: none;
border-radius: 4px;
background-color: white;
/* Цвет полей */
}
.delivery-form textarea {
height: 100px;
}
.button-group {
display: flex;
justify-content: space-between;
}
.submit-button,
.back-button {
padding: 10px 20px;
border: none;
border-radius: 4px;
}
.submit-button {
background-color: #d27c4b;
/* Цвет кнопки "Create Order" */
color: white;
}
.back-button {
background-color: #E4975F;
color: white;
/* Цвет кнопки "Back" */
}
.heading_h2{
color: white;
}

View File

@@ -0,0 +1,105 @@
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import './DeliveryForm.css';
function DeliveryForm() {
const [formData, setFormData] = useState({
address: '',
deliveryDate: '',
deliveryTime: '',
products: '',
comment: '',
});
const navigate = useNavigate(); // Хук для навигации
const handleInputChange = (e) => {
const { name, value } = e.target;
setFormData({ ...formData, [name]: value });
};
const handleSubmit = (e) => {
e.preventDefault();
const productsArray = formData.products.split(',').map((product) => product.trim());
console.log('Order Created:', {
...formData,
products: productsArray,
});
// Переход на страницу OrderTracking после создания заказа
navigate('/order-tracking');
};
const handleBackClick = () => {
window.history.back();
};
return (
<div className="delivery-form-container">
<h2 className='heading_h2'>Create Your Order</h2>
<form onSubmit={handleSubmit} className="delivery-form">
<label htmlFor="address">Delivery Address</label>
<input
type="text"
id="address"
name="address"
value={formData.address}
onChange={handleInputChange}
placeholder="Enter your delivery address"
required
/>
<label htmlFor="deliveryDate">Delivery Date</label>
<input
type="date"
id="deliveryDate"
name="deliveryDate"
value={formData.deliveryDate}
onChange={handleInputChange}
required
/>
<label htmlFor="deliveryTime">Delivery Time</label>
<input
type="time"
id="deliveryTime"
name="deliveryTime"
value={formData.deliveryTime}
onChange={handleInputChange}
required
/>
<label htmlFor="products">Products</label>
<input
type="text"
id="products"
name="products"
value={formData.products}
onChange={handleInputChange}
placeholder="Enter products (separate by comma)"
/>
<label htmlFor="comment">Comment</label>
<textarea
id="comment"
name="comment"
value={formData.comment}
onChange={handleInputChange}
placeholder="Add any additional comments"
></textarea>
<div className="button-group">
<button type="submit" className="submit-button">
Create Order
</button>
<button type="button" className="back-button" onClick={handleBackClick}>
Back
</button>
</div>
</form>
</div>
);
}
export default DeliveryForm;

View File

@@ -0,0 +1,64 @@
/* Delivery Options Styles */
.delivery-options {
padding: 40px 0;
background-color: #E2935D;
}
.delivery-options .container {
text-align: center;
}
.delivery-options .delivery-content {
display: flex;
align-items: center;
}
.delivery-options .delivery-content img {
margin-right: 98px;
}
.delivery-options .delivery-content .text-content {
text-align: left;
position: relative;
top: -50px;
}
.delivery-options .delivery-content h2 {
margin-bottom: 10px;
color: white;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 60px;
line-height: 120%;
/* identical to box height, or 91px */
color: #FEFAF4;
}
.delivery-options .delivery-content p {
color: #FDE4CC;
margin-bottom: 20px;
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-size: 17px;
line-height: 200%;
}
.delivery-options .delivery-content button {
background-color: #67816B;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 68px;
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 18px;
line-height: 120%;
text-align: center;
color: #FDECD8;
}

View File

@@ -0,0 +1,21 @@
import React from 'react';
import './DeliveryOptions.css';
function DeliveryOptions() {
return (
<section className="delivery-options">
<div className="container">
<div className="delivery-content">
<img src={process.env.PUBLIC_URL + '/images/car two.svg'} alt="Изображение" />
<div className="text-content">
<h2>Delivery Options</h2>
<p>Choose from a variety of delivery options that fit your schedule. Same-day, next-day, or standard shipping - we've got you covered.</p>
<button>Schedule Delivery</button>
</div>
</div>
</div>
</section>
);
}
export default DeliveryOptions;

View File

@@ -0,0 +1,7 @@
/* Footer Styles */
.footer {
background-color: #333;
color: white;
text-align: center;
padding: 20px 0;
}

16
src/components/Footer.js Normal file
View File

@@ -0,0 +1,16 @@
import React from 'react';
import './Footer.css';
function Footer() {
return (
<footer className="footer">
<div className="container">
<p>&copy; 2024 QuickDrops. All rights reserved.</p>
</div>
</footer>
);
}
export default Footer;

72
src/components/Header.css Normal file
View File

@@ -0,0 +1,72 @@
/* HeroSection.module.css */
.heroSection {
padding: 40px 0;
background-color: #F1E7D6;
}
/* Header Styles */
.header {
background-color: #E4975F;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
padding: 10px 0;
}
.header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.header .logo {
display: flex;
align-items: center;
font-size: 1.5em;
font-family: 'DM Serif Display';
font-style: normal;
font-weight: 600;
font-size: 24px;
line-height: 100%;
}
.header .logo img {
margin-right: 10px;
}
.header nav a {
margin-left: 60px;
text-decoration: none;
color: white;
font-family: "Poppins", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
}
.header .order-button {
background-color: #477758;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 11px;
width: 100px;
font-family: "Poppins", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
}
.header .login-button {
background-color: #477758;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 11px;
width: 100px;
font-family: "Poppins", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
}

47
src/components/Header.js Normal file
View File

@@ -0,0 +1,47 @@
import React, { useState } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import './Header.css';
import ModalRegistration from './LoginRegister';
function Header() {
const [isModalOpen, setIsModalOpen] = useState(false);
const navigate = useNavigate();
const handleLoginClick = () => {
setIsModalOpen(true);
};
const handleCloseModal = () => {
setIsModalOpen(false);
};
const handleOrderClick = () => {
navigate('/delivery-form');
};
return (
<header className="header">
<div className="container">
<div className="logo">
<img src={process.env.PUBLIC_URL + '/images/Logo(Nav).svg'} alt="Изображение" />
<span>QuickDrops</span>
</div>
<nav>
<Link to="/">Home</Link>
<Link to="/products">Products</Link>
<Link to="/about">About</Link>
<Link to="/contact">Contact</Link>
</nav>
<button className="login-button" onClick={handleLoginClick}>
Log in
</button>
<button className="order-button" onClick={handleOrderClick}>
Order
</button>
</div>
<ModalRegistration isOpen={isModalOpen} onClose={handleCloseModal} />
</header>
);
}
export default Header;

View File

@@ -0,0 +1,63 @@
/* Hero Section Styles */
.hero-section {
padding: 40px 0;
background-color: #F1E7D6;
}
.hero-section .container {
display: flex;
align-items: center;
/* Добавлено для вертикального выравнивания */
}
.hero-section .hero-image {
flex: 1;
padding-right: 20px;
}
.hero-section .hero-image img {
vertical-align: middle;
}
.hero-section .hero-content {
flex: 1;
}
.hero-section h1 {
font-size: 60px;
margin-bottom: 10px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
line-height: 120%;
}
.hero-section p {
font-size: 19px;
color: #6C6762;
margin-bottom: 20px;
font-family: "Poppins", sans-serif;
font-style: normal;
font-weight: 500;
}
.hero-section .buttons .shop-button {
background-color: #FF9800;
color: white;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 8px;
margin-right: 10px;
width: 200px;
}
.hero-section .buttons .cart-button {
background-color: #E99B62;
color: white;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 8px;
width: 200px;
}

View File

@@ -0,0 +1,25 @@
import React from 'react';
import './HeroSection.css';
function HeroSection() {
return (
<section className="hero-section">
<div className="container">
<div className="hero-image">
<img src={process.env.PUBLIC_URL + '/images/car.svg'} alt="Изображение" />
</div>
<div className="hero-content">
<h1>Discover Our Product Catalog</h1>
<p>Explore our wide range of products, from electronics to home goods, all delivered right to your doorstep.</p>
<div className="buttons">
<button className="shop-button">Shop Now</button>
<button className="cart-button">View Cart</button>
</div>
</div>
</div>
</section>
);
}
export default HeroSection;

View File

@@ -0,0 +1,95 @@
/* LoginRegister.css */
.modal-overlay {
background-color: rgba(0, 0, 0, 0.75);
}
.modal-content {
top: 50%;
left: 50%;
right: auto;
bottom: auto;
margin-right: -50%;
transform: translate(-50%, -50%);
padding: 20px;
border: none;
border-radius: 10px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
background-color: #f8f8f8;
font-family: Arial, sans-serif;
width: 400px;
/* Ширина модального окна */
}
.modal-title {
color: #333;
text-align: center;
margin-bottom: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-label {
display: block;
margin-bottom: 5px;
color: #555;
}
.form-input {
width: 100%;
padding: 8px;
border-radius: 5px;
border: 1px solid #ddd;
box-sizing: border-box;
}
.password-input-container {
display: flex;
align-items: center;
}
.password-input {
width: 100%;
padding: 8px;
border-radius: 5px;
border: 1px solid #ddd;
box-sizing: border-box;
}
.password-toggle-button {
margin-left: 10px;
padding: 8px 12px;
border: none;
border-radius: 5px;
background-color: #f0f0f0;
cursor: pointer;
}
.button-container {
display: flex;
justify-content: space-between;
}
.register-button {
background-color: #5cb85c;
color: white;
padding: 10px 15px;
border: none;
border-radius: 5px;
cursor: pointer;
width: 48%;
/* Чтобы кнопки занимали примерно половину ширины контейнера */
}
.back-button {
background-color: #d9534f;
color: white;
padding: 10px 15px;
border: none;
border-radius: 5px;
cursor: pointer;
width: 48%;
/* Чтобы кнопки занимали примерно половину ширины контейнера */
}

View File

@@ -0,0 +1,166 @@
import React, { useState } from 'react';
import Modal from 'react-modal';
const RegistrationModal = ({ isOpen, onClose }) => {
const [name, setName] = useState('');
const [surname, setSurname] = useState('');
const [phone, setPhone] = useState('');
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [showPassword, setShowPassword] = useState(false);
const handleRegistration = () => {
// Здесь будет логика регистрации
console.log('Регистрация:', name, surname, phone, password);
onClose();
};
return (
<Modal
isOpen={isOpen}
onRequestClose={onClose}
style={{
overlay: {
backgroundColor: 'rgba(0, 0, 0, 0.75)',
},
content: {
top: '50%',
left: '50%',
right: 'auto',
bottom: 'auto',
marginRight: '-50%',
transform: 'translate(-50%, -50%)',
padding: '20px',
border: 'none',
borderRadius: '10px',
boxShadow: '0px 0px 10px rgba(0,0,0,0.5)',
backgroundColor: '#f8f8f8', // Светлый фон
fontFamily: 'Arial, sans-serif',
},
}}
>
<h2 style={{ color: '#333', textAlign: 'center' }}>Регистрация</h2>
<div style={{ marginBottom: '15px' }}>
<label style={{ display: 'block', marginBottom: '5px', color: '#555' }}>Имя:</label>
<input
type="text"
value={name}
onChange={(e) => setName(e.target.value)}
style={{
width: '100%',
padding: '8px',
borderRadius: '5px',
border: '1px solid #ddd',
boxSizing: 'border-box',
}}
/>
</div>
<div style={{ marginBottom: '15px' }}>
<label style={{ display: 'block', marginBottom: '5px', color: '#555' }}>Фамилия:</label>
<input
type="text"
value={surname}
onChange={(e) => setSurname(e.target.value)}
style={{
width: '100%',
padding: '8px',
borderRadius: '5px',
border: '1px solid #ddd',
boxSizing: 'border-box',
}}
/>
</div>
<div style={{ marginBottom: '15px' }}>
<label style={{ display: 'block', marginBottom: '5px', color: '#555' }}>Номер телефона:</label>
<input
type="tel"
value={phone}
onChange={(e) => setPhone(e.target.value)}
style={{
width: '100%',
padding: '8px',
borderRadius: '5px',
border: '1px solid #ddd',
boxSizing: 'border-box',
}}
/>
</div>
<div style={{ marginBottom: '15px' }}>
<label style={{ display: 'block', marginBottom: '5px', color: '#555' }}>Пароль:</label>
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
type={showPassword ? 'text' : 'password'}
value={password}
onChange={(e) => setPassword(e.target.value)}
style={{
width: '100%',
padding: '8px',
borderRadius: '5px',
border: '1px solid #ddd',
boxSizing: 'border-box',
}}
/>
<button
type="button"
onClick={() => setShowPassword(!showPassword)}
style={{
marginLeft: '10px',
padding: '8px 12px',
border: 'none',
borderRadius: '5px',
backgroundColor: '#f0f0f0',
cursor: 'pointer',
}}
>
{showPassword ? 'Скрыть' : 'Показать'}
</button>
</div>
</div>
<div style={{ marginBottom: '15px' }}>
<label style={{ display: 'block', marginBottom: '5px', color: '#555' }}>Подтверждение пароля:</label>
<input
type="password"
value={confirmPassword}
onChange={(e) => setConfirmPassword(e.target.value)}
style={{
width: '100%',
padding: '8px',
borderRadius: '5px',
border: '1px solid #ddd',
boxSizing: 'border-box',
}}
/>
</div>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<button
onClick={handleRegistration}
style={{
backgroundColor: '#5cb85c',
color: 'white',
padding: '10px 15px',
border: 'none',
borderRadius: '5px',
cursor: 'pointer',
}}
>
Зарегистрироваться
</button>
<button
onClick={onClose}
style={{
backgroundColor: '#d9534f',
color: 'white',
padding: '10px 15px',
border: 'none',
borderRadius: '5px',
cursor: 'pointer',
}}
>
Назад
</button>
</div>
</Modal>
);
};
export default RegistrationModal;

View File

@@ -0,0 +1,53 @@
/* Monitor Delivery Styles */
.monitor-delivery {
padding: 40px 0;
background-color: #FDF6EB;
}
.monitor-delivery .container {
text-align: center;
}
.monitor-delivery h2 {
margin-bottom: 30px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 80px;
line-height: 120%;
/* identical to box height, or 108px */
text-align: center;
color: #313033;
}
.monitor-delivery .monitor-cards {
display: flex;
justify-content: space-around;
}
.monitor-delivery .monitor-card {
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 375px;
height: 574px;
margin: 10px;
background-color: white;
}
.monitor-delivery .monitor-card img {
width: 100%;
border-radius: 10px;
margin-bottom: 15px;
}
.monitor-delivery .monitor-card h3 {
font-size: 1.3em;
margin-bottom: 10px;
}
.monitor-delivery .monitor-card p {
color: #666;
}

View File

@@ -0,0 +1,34 @@
import React from 'react';
import './MonitorDelivery.css';
function MonitorDelivery() {
return (
<section className="monitor-delivery">
<div className="container">
<h2>Monitor Your Delivery</h2>
<div className="monitor-cards">
<img src={process.env.PUBLIC_URL + '/images/4 poc.svg'} alt="Изображение" />
<img src={process.env.PUBLIC_URL + '/images/5 poc.svg'} alt="Изображение" style={{position: 'relative',top: '4px'}}/>
<img src={process.env.PUBLIC_URL + '/images/6 poc.svg'} alt="Изображение" />
</div>
</div>
</section>
);
}
function MonitorCard({ image, title, description, bgColor }) {
const cardStyle = {
backgroundColor: bgColor,
};
return (
<div className="monitor-card" style={cardStyle}>
<img src={image} alt={title} />
<h3>{title}</h3>
<p>{description}</p>
</div>
);
}
export default MonitorDelivery;

View File

@@ -0,0 +1,332 @@
import React, { useState } from 'react';
import './OrderTrackingScreen.css';
function OrderTrackingScreen() {
// Пример данных для заказа
const [orderData, setOrderData] = useState({
orderId: 'ORD-90123',
status: 'Подтвержден',
deliveryAddress: 'Москва, ул. Тверская, д. 5',
deliveryDateTime: '2025-04-20 18:00',
items: [
{ name: 'Avocado', quantity: 4, image: '/images/avocado.jpg' },
{ name: 'Blueberries', quantity: 2, image: '/images/blueberries.jpg' },
{ name: 'Cheddar Cheese', quantity: 1, image: '/images/cheese.jpg' },
{ name: 'Dark Chocolate', quantity: 3, image: '/images/chocolate.jpg' },
{ name: 'Almonds', quantity: 1, image: '/images/almonds.jpg' },
],
customerName: 'Анна Петрова',
customerEmail: 'anna@example.com',
shippingMethod: 'Самовывоз',
paymentMethod: 'Наличными',
orderDate: '2025-04-10',
estimatedDelivery: '2025-04-20',
contactNumber: '+7 (499) 765-43-21',
discountCode: 'WELCOME10',
totalAmount: 3200,
notes: 'Позвонить за час до доставки',
});
const [orderData2, setOrderData2] = useState({
orderId: 'ORD-90124',
status: 'Создан',
deliveryAddress: 'Санкт-Петербург, ул. невский пр., д. 5',
deliveryDateTime: '2025-04-19 12:00',
items: [
{ name: 'Mango', quantity: 2, image: '/images/mango.jpg' },
{ name: 'Pineapple', quantity: 2, image: '/images/pineapple.jpg' },
{ name: 'Tomatoes', quantity: 4, image: '/images/tomatoes.jpg' },
{ name: 'Cucumber', quantity: 4, image: '/images/cucumber.jpg' },
],
customerName: 'Алексей Сидоров',
customerEmail: 'Alex@example.com',
shippingMethod: 'Экспресс',
paymentMethod: 'Онлайн картой',
orderDate: '2025-04-10',
estimatedDelivery: '2025-04-19',
contactNumber: '+7 (499) 765-43-22',
discountCode: 'WELCOME11',
totalAmount: 1000,
notes: 'Позвонить при доставке',
});
const [orderData3, setOrderData3] = useState({
orderId: 'ORD-90125',
status: 'В пути',
deliveryAddress: 'Казань, ул. Баумана, д. 5',
deliveryDateTime: '2025-04-21 15:00',
items: [
{ name: 'Orange', quantity: 2, image: '/images/orange.jpg' },
{ name: 'Kiwi', quantity: 2, image: '/images/kiwi.jpg' },
{ name: 'Potato', quantity: 4, image: '/images/potato.jpg' },
{ name: 'Onion', quantity: 4, image: '/images/onion.jpg' },
],
customerName: 'Ольга Васильева',
customerEmail: 'olga@example.com',
shippingMethod: 'Стандарт',
paymentMethod: 'Онлайн картой',
orderDate: '2025-04-11',
estimatedDelivery: '2025-04-21',
contactNumber: '+7 (499) 765-43-23',
discountCode: 'WELCOME12',
totalAmount: 1200,
notes: 'Позвонить при доставке',
});
const [orderData4, setOrderData4] = useState({
orderId: 'ORD-90126',
status: 'Доставлен',
deliveryAddress: 'Самара, ул. Ленинградская, д. 5',
deliveryDateTime: '2025-04-22 16:00',
items: [
{ name: 'Apple', quantity: 2, image: '/images/apple.jpg' },
{ name: 'Lemon', quantity: 2, image: '/images/lemon.jpg' },
{ name: 'Meat', quantity: 1, image: '/images/meat.jpg' },
],
customerName: 'Петр Иванов',
customerEmail: 'petr@example.com',
shippingMethod: 'Стандарт',
paymentMethod: 'Онлайн картой',
orderDate: '2025-04-12',
estimatedDelivery: '2025-04-22',
contactNumber: '+7 (499) 765-43-24',
discountCode: 'WELCOME13',
totalAmount: 3000,
notes: 'Позвонить за час до доставки',
});
const [orderData5, setOrderData5] = useState({
orderId: 'ORD-90127',
status: 'Отменен',
deliveryAddress: 'Ростов, ул. Пушкинская, д. 5',
deliveryDateTime: '2025-04-23 17:00',
items: [
{ name: 'Fish', quantity: 1, image: '/images/fish.jpg' },
{ name: 'Milk', quantity: 2, image: '/images/milk.jpg' },
{ name: 'Bread', quantity: 1, image: '/images/bread.jpg' },
],
customerName: 'Екатерина Смирнова',
customerEmail: 'kate@example.com',
shippingMethod: 'Экспресс',
paymentMethod: 'Онлайн картой',
orderDate: '2025-04-13',
estimatedDelivery: '2025-04-23',
contactNumber: '+7 (499) 765-43-25',
discountCode: 'WELCOME14',
totalAmount: 1400,
notes: 'Позвонить при доставке',
});
const handleStatusUpdate = (newStatus) => {
setOrderData((prevData) => ({ ...prevData, status: newStatus }));
};
const handleStatusUpdate2 = (newStatus) => {
setOrderData2((prevData) => ({ ...prevData, status: newStatus }));
};
const handleStatusUpdate3 = (newStatus) => {
setOrderData3((prevData) => ({ ...prevData, status: newStatus }));
};
const handleStatusUpdate4 = (newStatus) => {
setOrderData4((prevData) => ({ ...prevData, status: newStatus }));
};
const handleStatusUpdate5 = (newStatus) => {
setOrderData5((prevData) => ({ ...prevData, status: newStatus }));
};
return (
<div className="order-tracking-screen">
<h2>Order tracking</h2>
<table className="order-table">
<thead>
<tr>
<th>Order Number</th>
<th>Status</th>
<th>Delivery Address</th>
<th>Delivery Date and Time</th>
<th>Products</th>
<th>Customer Name</th>
<th>Email</th>
<th>Shipping</th>
<th>Payment</th>
<th>Order Date</th>
<th>Expected Delivery</th>
<th>Contacts</th>
<th>Discount Code</th>
<th>Order Total</th>
<th>Notes</th>
<th>Change Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>{orderData.orderId}</td>
<td>{orderData.status}</td>
<td>{orderData.deliveryAddress}</td>
<td>{orderData.deliveryDateTime}</td>
<td>
<ul className="order-items-list">
{orderData.items.map((item, index) => (
<li key={index} className="order-item">
{item.name} (x{item.quantity})
</li>
))}
</ul>
</td>
<td>{orderData.customerName}</td>
<td>{orderData.customerEmail}</td>
<td>{orderData.shippingMethod}</td>
<td>{orderData.paymentMethod}</td>
<td>{orderData.orderDate}</td>
<td>{orderData.estimatedDelivery}</td>
<td>{orderData.contactNumber}</td>
<td>{orderData.discountCode}</td>
<td>{orderData.totalAmount} руб.</td>
<td>{orderData.notes}</td>
<td>
<select value={orderData.status} onChange={(e) => handleStatusUpdate(e.target.value)}>
<option value="Создан">Создан</option>
<option value="Подтвержден">Подтвержден</option>
<option value="В пути">В пути</option>
<option value="Доставлен">Доставлен</option>
<option value="Отменен">Отменен</option>
</select>
</td>
</tr>
<tr>
<td>{orderData2.orderId}</td>
<td>{orderData2.status}</td>
<td>{orderData2.deliveryAddress}</td>
<td>{orderData2.deliveryDateTime}</td>
<td>
<ul className="order-items-list">
{orderData2.items.map((item, index) => (
<li key={index} className="order-item">
{item.name} (x{item.quantity})
</li>
))}
</ul>
</td>
<td>{orderData2.customerName}</td>
<td>{orderData2.customerEmail}</td>
<td>{orderData2.shippingMethod}</td>
<td>{orderData2.paymentMethod}</td>
<td>{orderData2.orderDate}</td>
<td>{orderData2.estimatedDelivery}</td>
<td>{orderData2.contactNumber}</td>
<td>{orderData2.discountCode}</td>
<td>{orderData2.totalAmount} руб.</td>
<td>{orderData2.notes}</td>
<td>
<select value={orderData2.status} onChange={(e) => handleStatusUpdate2(e.target.value)}>
<option value="Создан">Создан</option>
<option value="Подтвержден">Подтвержден</option>
<option value="В пути">В пути</option>
<option value="Доставлен">Доставлен</option>
<option value="Отменен">Отменен</option>
</select>
</td>
</tr>
<tr>
<td>{orderData3.orderId}</td>
<td>{orderData3.status}</td>
<td>{orderData3.deliveryAddress}</td>
<td>{orderData3.deliveryDateTime}</td>
<td>
<ul className="order-items-list">
{orderData3.items.map((item, index) => (
<li key={index} className="order-item">
{item.name} (x{item.quantity})
</li>
))}
</ul>
</td>
<td>{orderData3.customerName}</td>
<td>{orderData3.customerEmail}</td>
<td>{orderData3.shippingMethod}</td>
<td>{orderData3.paymentMethod}</td>
<td>{orderData3.orderDate}</td>
<td>{orderData3.estimatedDelivery}</td>
<td>{orderData3.contactNumber}</td>
<td>{orderData3.discountCode}</td>
<td>{orderData3.totalAmount} руб.</td>
<td>{orderData3.notes}</td>
<td>
<select value={orderData3.status} onChange={(e) => handleStatusUpdate3(e.target.value)}>
<option value="Создан">Создан</option>
<option value="Подтвержден">Подтвержден</option>
<option value="В пути">В пути</option>
<option value="Доставлен">Доставлен</option>
<option value="Отменен">Отменен</option>
</select>
</td>
</tr>
<tr>
<td>{orderData4.orderId}</td>
<td>{orderData4.status}</td>
<td>{orderData4.deliveryAddress}</td>
<td>{orderData4.deliveryDateTime}</td>
<td>
<ul className="order-items-list">
{orderData4.items.map((item, index) => (
<li key={index} className="order-item">
{item.name} (x{item.quantity})
</li>
))}
</ul>
</td>
<td>{orderData4.customerName}</td>
<td>{orderData4.customerEmail}</td>
<td>{orderData4.shippingMethod}</td>
<td>{orderData4.paymentMethod}</td>
<td>{orderData4.orderDate}</td>
<td>{orderData4.estimatedDelivery}</td>
<td>{orderData4.contactNumber}</td>
<td>{orderData4.discountCode}</td>
<td>{orderData4.totalAmount} руб.</td>
<td>{orderData4.notes}</td>
<td>
<select value={orderData4.status} onChange={(e) => handleStatusUpdate4(e.target.value)}>
<option value="Создан">Создан</option>
<option value="Подтвержден">Подтвержден</option>
<option value="В пути">В пути</option>
<option value="Доставлен">Доставлен</option>
<option value="Отменен">Отменен</option>
</select>
</td>
</tr>
<tr>
<td>{orderData5.orderId}</td>
<td>{orderData5.status}</td>
<td>{orderData5.deliveryAddress}</td>
<td>{orderData5.deliveryDateTime}</td>
<td>
<ul className="order-items-list">
{orderData5.items.map((item, index) => (
<li key={index} className="order-item">
{item.name} (x{item.quantity})
</li>
))}
</ul>
</td>
<td>{orderData5.customerName}</td>
<td>{orderData5.customerEmail}</td>
<td>{orderData5.shippingMethod}</td>
<td>{orderData5.paymentMethod}</td>
<td>{orderData5.orderDate}</td>
<td>{orderData5.estimatedDelivery}</td>
<td>{orderData5.contactNumber}</td>
<td>{orderData5.discountCode}</td>
<td>{orderData5.totalAmount} руб.</td>
<td>{orderData5.notes}</td>
<td>
<select value={orderData5.status} onChange={(e) => handleStatusUpdate5(e.target.value)}>
<option value="Создан">Создан</option>
<option value="Подтвержден">Подтвержден</option>
<option value="В пути">В пути</option>
<option value="Отменен">Отменен</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
);
}
export default OrderTrackingScreen;

View File

@@ -0,0 +1,83 @@
/* OrderTrackingScreen.css */
.order-tracking-screen {
font-family: 'Arial', sans-serif;
padding: 20px;
background-color: #f9f9f9;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.order-tracking-screen h2 {
color: #333;
margin-bottom: 20px;
text-align: center;
}
.order-table {
width: 100%;
border-collapse: collapse;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 8px;
overflow: hidden;
background-color: #fff;
}
.order-table thead {
background-color: #f5f5f5;
color: #555;
font-weight: 600;
}
.order-table th,
.order-table td {
padding: 8px 9px;
text-align: left;
border-bottom: 1px solid #eee;
}
.order-table tbody tr:nth-child(even) {
background-color: #f9f9f9;
}
.order-table tbody tr:hover {
background-color: #f0f0f0;
}
.order-items-list {
list-style: none;
padding: 0;
margin: 0;
}
.order-item {
display: flex;
align-items: center;
margin-bottom: 8px;
padding: 8px;
border-radius: 6px;
background-color: #f9f9f9;
}
.item-image {
width: 50px;
height: 50px;
margin-right: 10px;
border-radius: 4px;
object-fit: cover;
}
.order-table select {
padding: 8px 12px;
border: 1px solid #ccc;
border-radius: 6px;
background-color: #fff;
color: #555;
cursor: pointer;
transition: border-color 0.3s ease;
}
.order-table select:focus {
outline: none;
border-color: #66b3ff;
box-shadow: 0 0 5px rgba(102, 179, 255, 0.5);
}

View File

@@ -0,0 +1,84 @@
/* Secure Checkout Styles */
.secure-checkout {
background-color: #F2E9DA;
padding: 40px 0;
}
.secure-checkout .container {
text-align: center;
}
.secure-checkout .checkout-cards {
display: flex;
justify-content: space-around;
}
.secure-checkout .checkout-card {
background-color: #e0e0e0;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 771px;
height: 431px;
margin: 39px;
}
.secure-checkout .checkout-card .icon-container {
width: 131px;
height: 128px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
}
.secure-checkout .checkout-card h3 {
margin-bottom: 10px;
color: #F9F9F2;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 36px;
line-height: 120%;
/* identical to box height, or 43px */
color: #F9F9F2;
}
.secure-checkout .checkout-card p {
color: #E1EBDD;
margin-bottom: 20px;
height: 102px;
line-height: 230%;
padding: 10px;
width: 457px;
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-size: 16px;
line-height: 212.5%;
}
.secure-checkout .checkout-card button {
background-color: #67816B;
color: white;
padding: 12px 24px;
border: none;
cursor: pointer;
border-radius: 68px;
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-size: 15px;
line-height: 120%;
/* identical to box height, or 24px */
text-align: center;
color: #FDE5D0;
}

View File

@@ -0,0 +1,47 @@
import React from 'react';
import './SecureCheckout.css';
function SecureCheckout() {
return (
<section className="secure-checkout">
<div className="container">
<div className="checkout-cards">
<CheckoutCard
icon = "https://pplx-res.cloudinary.com/image/upload/v1742750792/user_uploads/lvXnWfmGJeACxbS/info.jpg"
title="Protect Your Information"
description="Enjoy a seamless and secure checkout experience with our state-of-the-art payment processing system. Your personal and financial information is safeguarded."
buttonText="Complete Order"
bgColor="#67816B"
buttonColor = "#E29864"
/>
<CheckoutCard
icon = "https://pplx-res.cloudinary.com/image/upload/v1742750923/user_uploads/wAlZdsRaDPZTVGw/return.jpg"
title="Hassle-Free Returns"
description="If you're not completely satisfied with your purchase, we offer a hassle-free returns policy. Contact our customer service team, and we'll work with you."
buttonText="Start Return"
bgColor = "#FF9800"
buttonColor = "#67816B"
/>
</div>
</div>
</section>
);
}
function CheckoutCard({ icon, title, description, buttonText, buttonColor, bgColor }) {
const cardStyle = {
backgroundColor: bgColor,
};
return (
<div className="checkout-card" style={cardStyle}>
<div className="icon-container">
<img src={icon} alt="Icon" />
</div>
<h3>{title}</h3>
<p>{description}</p>
<button style={{ backgroundColor: buttonColor }}>{buttonText}</button>
</div>
);
}
export default SecureCheckout;

View File

@@ -0,0 +1,82 @@
/* Shipping Details Styles */
.shipping-details {
background-color: #F1E8D9;
padding: 40px 0;
}
.shipping-details .container {
text-align: center;
}
.shipping-details h2 {
margin-bottom: 30px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
font-size: 70px;
line-height: 120%;
text-align: center;
color: #121113;
}
.shipping-details .shipping-forms {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.shipping-details .shipping-forms .shipping-form {
/*background-color: #F8F3E9;*/
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
text-align: left;
width: 45%;
margin-bottom: 20px;
}
.shipping-details .shipping-forms .shipping-form img {
width: 100%;
border-radius: 10px;
margin-bottom: 15px;
}
.shipping-details .shipping-forms .shipping-form h3 {
font-size: 1.3em;
margin-bottom: 10px;
font-family: 'Staatliches';
font-style: normal;
font-weight: 700;
line-height: 120%;
color: #2B2927;
}
.shipping-details .shipping-forms .shipping-form input,
.shipping-details .shipping-forms .shipping-form select {
width: 500px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
margin-bottom: 15px;
}
.shipping-details .shipping-forms .shipping-form a {
color: #4CAF50;
text-decoration: none;
}
.button-form{
background-color: #477758;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 11px;
font-family: "Poppins",
sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
}

View File

@@ -0,0 +1,81 @@
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import './ShippingDetails.css';
function ShippingDetails() {
const [address, setAddress] = useState('');
const [deliveryDate, setDeliveryDate] = useState('');
const [deliveryTime, setDeliveryTime] = useState('');
const navigate = useNavigate();
const handleSubmit = () => {
navigate(`/delivery-form?address=${address}&deliveryDate=${deliveryDate}&deliveryTime=${deliveryTime}`);
};
return (
<section className="shipping-details">
<div className="container">
<h2>Shipping Details</h2>
<div className="shipping-forms">
<ShippingForm
title="Delivery Address"
inputPlaceholder="Enter your delivery address"
type="text"
value={address}
onChange={(e) => setAddress(e.target.value)}
/>
<ShippingForm
title="Delivery Date"
type="date"
value={deliveryDate}
onChange={(e) => setDeliveryDate(e.target.value)}
/>
<ShippingTimeForm
title="Delivery Time"
value={deliveryTime}
onChange={(e) => setDeliveryTime(e.target.value)}
/>
<FAQ
title="FAQ"
description="Answers to your delivery-related questions."
/>
</div>
<button className='button-form' onClick={handleSubmit}>Continue to Delivery Form</button>
</div>
</section>
);
}
function ShippingForm({ title, inputPlaceholder, type, value, onChange }) {
return (
<div className="shipping-form">
<h3>{title}</h3>
<input type={type} placeholder={inputPlaceholder} value={value} onChange={onChange} />
</div>
);
}
function ShippingTimeForm({ title, value, onChange }) {
return (
<div className="shipping-form">
<h3>{title}</h3>
<select value={value} onChange={(e) => onChange(e.target.value)}>
<option>Choose your desired delivery time slot</option>
<option value="8:00 AM - 12:00 PM">8:00 AM - 12:00 PM</option>
<option value="12:00 PM - 4:00 PM">12:00 PM - 4:00 PM</option>
<option value="4:00 PM - 8:00 PM">4:00 PM - 8:00 PM</option>
</select>
</div>
);
}
function FAQ({ title, description }) {
return (
<div className="shipping-form">
<h3>{title}</h3>
<p>{description}</p>
</div>
);
}
export default ShippingDetails;

13
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;
}

13
src/index.js Normal file
View File

@@ -0,0 +1,13 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { BrowserRouter } from 'react-router-dom';
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
);

13
src/reportWebVitals.js Normal file
View File

@@ -0,0 +1,13 @@
const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;

5
src/setupTests.js Normal file
View File

@@ -0,0 +1,5 @@
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';