4 лабораторная работа
BIN
.vs/PIbd-21_Shanygin_A.V/v17/.wsuo
Normal file
BIN
.vs/slnx.sqlite
Normal file
20
laba4/.eslintrc.cjs
Normal file
@ -0,0 +1,20 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react/jsx-runtime',
|
||||
'plugin:react-hooks/recommended',
|
||||
],
|
||||
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
||||
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
|
||||
settings: { react: { version: '18.2' } },
|
||||
plugins: ['react-refresh'],
|
||||
rules: {
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
}
|
24
laba4/.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
8
laba4/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# React + Vite
|
||||
|
||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
||||
|
||||
Currently, two official plugins are available:
|
||||
|
||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
13
laba4/index.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root" class="h-100 d-flex flex-column"></div>
|
||||
<script type="module" src="/src/main.jsx"></script>
|
||||
</body>
|
||||
</html>
|
102
laba4/index2.html
Normal file
@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<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=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<title>BOOK SHOP</title>
|
||||
</head>
|
||||
<body>
|
||||
<header id="header" class="fixed-top">
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white" >
|
||||
<div class="container">
|
||||
<a href="index.html" class="navbar-brand">
|
||||
<img width="100%" src="img/icon book.svg"/>
|
||||
<div class="word">
|
||||
Book <br>
|
||||
shop
|
||||
</div>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarContent" aria-controls="navbarContent"
|
||||
aria-expanded="false">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarContent">
|
||||
<ul class="navbar-nav mr-auto mb-3 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="index.html" class="nav-link">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="Books.html" class="nav-link">Books</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="Contact.html" class="nav-link">Contact</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="Basket.html" class="nav-link">
|
||||
<img src="img/icon shopping curt.svg" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="Sign_in.html" class="nav-link">
|
||||
<img src="img/icon man.svg" alt="">
|
||||
<span>SIGN IN<span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
<div class="intro_wrapper">
|
||||
<div class="intro_block">
|
||||
<h1 class="intro_title">
|
||||
There are a lot of books in our store
|
||||
</h1>
|
||||
<p class="intro_text">
|
||||
Come to our store or choose any books­ to your taste at a very favorable price.
|
||||
Every day we are replenished with more and more products.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class = "footer_wrapper">
|
||||
<nav>
|
||||
<a href = "https://chat.whatsapp.com/KDJp7dnHzAWBQmT7PF3ZN3" class = "nav_foot">
|
||||
<img src="img/icon watsapp.svg" alt="">
|
||||
</a>
|
||||
<a href = "https://vk.com/shanygin2000" class = "nav_foot">
|
||||
<img src="img/icon vk.svg" alt="">
|
||||
</a>
|
||||
<a href = "https://instagram.com/sshanygin?igshid=NzZlODBkYWE4Ng==&utm_source=qr" class = "nav_foot">
|
||||
<img src="img/icon instogram.svg" alt="">
|
||||
</a>
|
||||
<a href="https://web.telegram.org/a/#1337526477" class="nav_foot">
|
||||
<img src="img/icon telegram.svg" alt="">
|
||||
</a>
|
||||
</nav>
|
||||
<nav class="nav_mail_line_phone">
|
||||
<a href = "#" class="mail_line_phone">
|
||||
Book_shop@mail.com
|
||||
</a>
|
||||
<img src="img/line.svg" alt="" class="mail_line_phone" id="line">
|
||||
<a href = "#" class="mail_line_phone">
|
||||
+7(999)-323-65-23
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
14
laba4/jsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"target": "ES2020",
|
||||
"jsx": "react",
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/node_modules/*"
|
||||
]
|
||||
}
|
4344
laba4/package-lock.json
generated
Normal file
32
laba4/package.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "lec4",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.18.0",
|
||||
"bootstrap": "^5.3.2",
|
||||
"react-bootstrap": "^2.9.1",
|
||||
"react-bootstrap-icons": "^1.10.3",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.2.15",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@vitejs/plugin-react": "^4.0.3",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-react": "^7.32.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.3",
|
||||
"vite": "^4.4.5"
|
||||
}
|
||||
}
|
1
laba4/public/vite.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
After Width: | Height: | Size: 1.5 KiB |
0
laba4/src/App.css
Normal file
24
laba4/src/App.jsx
Normal file
@ -0,0 +1,24 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import { Container } from 'react-bootstrap';
|
||||
import { Outlet } from 'react-router-dom';
|
||||
import './App.css';
|
||||
import Footer from './components/footer/Footer.jsx';
|
||||
import Navigation from './components/navigation/Navigation.jsx';
|
||||
|
||||
const App = ({ routes }) => {
|
||||
return (
|
||||
<>
|
||||
<Navigation routes={routes}></Navigation>
|
||||
<Container className='p-2' as="main" fluid>
|
||||
<Outlet />
|
||||
</Container>
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
App.propTypes = {
|
||||
routes: PropTypes.array,
|
||||
};
|
||||
|
||||
export default App;
|
BIN
laba4/src/assets/Contact_Imagin.jpg
Normal file
After Width: | Height: | Size: 814 KiB |
BIN
laba4/src/assets/Image1.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
laba4/src/assets/Intro_img.jpg
Normal file
After Width: | Height: | Size: 567 KiB |
BIN
laba4/src/assets/banner1.png
Normal file
After Width: | Height: | Size: 640 KiB |
BIN
laba4/src/assets/banner2.png
Normal file
After Width: | Height: | Size: 812 KiB |
BIN
laba4/src/assets/banner3.png
Normal file
After Width: | Height: | Size: 767 KiB |
9
laba4/src/assets/iconBook.svg
Normal file
After Width: | Height: | Size: 309 KiB |
9
laba4/src/assets/iconInstogram.svg
Normal file
After Width: | Height: | Size: 24 KiB |
9
laba4/src/assets/iconMan.svg
Normal file
After Width: | Height: | Size: 13 KiB |
9
laba4/src/assets/iconShoppingCurt.svg
Normal file
After Width: | Height: | Size: 18 KiB |
9
laba4/src/assets/iconTelegram.svg
Normal file
After Width: | Height: | Size: 26 KiB |
9
laba4/src/assets/iconVk.svg
Normal file
After Width: | Height: | Size: 22 KiB |
9
laba4/src/assets/iconWatsapp.svg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
laba4/src/assets/imageDracula.jpg
Normal file
After Width: | Height: | Size: 86 KiB |
3
laba4/src/assets/line.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="1" height="30" viewBox="0 0 1 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<line x1="0.5" y1="30" x2="0.5" stroke="black"/>
|
||||
</svg>
|
After Width: | Height: | Size: 150 B |
16
laba4/src/assets/menu-hamburger.svg
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>menu-hamburger</title>
|
||||
<g id="Layer_2" data-name="Layer 2">
|
||||
<g id="invisible_box" data-name="invisible box">
|
||||
<rect width="48" height="48" fill="none"/>
|
||||
</g>
|
||||
<g id="icons_Q2" data-name="icons Q2">
|
||||
<g>
|
||||
<path d="M42,12a2,2,0,0,1-2,2H8a2,2,0,0,1-2-2H6a2,2,0,0,1,2-2H40a2,2,0,0,1,2,2Z"/>
|
||||
<path d="M42,24a2,2,0,0,1-2,2H8a2,2,0,0,1-2-2H6a2,2,0,0,1,2-2H40a2,2,0,0,1,2,2Z"/>
|
||||
<path d="M42,36a2,2,0,0,1-2,2H8a2,2,0,0,1-2-2H6a2,2,0,0,1,2-2H40a2,2,0,0,1,2,2Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 750 B |
1
laba4/src/assets/react.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
After Width: | Height: | Size: 4.0 KiB |
25
laba4/src/components/banner/Banner.css
Normal file
@ -0,0 +1,25 @@
|
||||
#banner {
|
||||
margin: 2px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#banner img {
|
||||
border: 1px solid #3c3c3f;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#banner img.banner-show {
|
||||
width: 100%;
|
||||
opacity: 1;
|
||||
transition: opacity 1s, visibility 0s;
|
||||
}
|
||||
|
||||
#banner img.banner-hide {
|
||||
height: 0;
|
||||
width: 0;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 1s, visibility 0s 1s;
|
||||
}
|
40
laba4/src/components/banner/Banner.jsx
Normal file
@ -0,0 +1,40 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import banner1 from '../../assets/banner1.png';
|
||||
import banner2 from '../../assets/banner2.png';
|
||||
import banner3 from '../../assets/banner3.png';
|
||||
import './Banner.css';
|
||||
|
||||
const Banner = () => {
|
||||
const [currentBanner, setCurrentBanner] = useState(0);
|
||||
const banners = [banner1, banner2, banner3];
|
||||
|
||||
const getBannerClass = (index) => {
|
||||
return currentBanner === index ? 'banner-show' : 'banner-hide';
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const bannerInterval = setInterval(
|
||||
() => {
|
||||
console.info('Banner changed');
|
||||
let current = currentBanner + 1;
|
||||
if (current === banners.length) {
|
||||
current = 0;
|
||||
}
|
||||
setCurrentBanner(current);
|
||||
},
|
||||
5000,
|
||||
);
|
||||
return () => clearInterval(bannerInterval);
|
||||
});
|
||||
|
||||
return (
|
||||
<div id="banner" >
|
||||
{
|
||||
banners.map((banner, index) =>
|
||||
<img key={index} className={getBannerClass(index)} src={banner} alt={`banner${index}`} />)
|
||||
}
|
||||
</div >
|
||||
);
|
||||
};
|
||||
|
||||
export default Banner;
|
0
laba4/src/components/footer/Footer.css
Normal file
45
laba4/src/components/footer/Footer.jsx
Normal file
@ -0,0 +1,45 @@
|
||||
import InstogramLogo from '../../assets/iconInstogram.svg';
|
||||
import TelegramLogo from '../../assets/iconTelegram.svg';
|
||||
import VkLogo from '../../assets/iconVk.svg';
|
||||
import WatsappLogo from '../../assets/iconWatsapp.svg';
|
||||
import Line from '../../assets/line.svg';
|
||||
import '../../index.css';
|
||||
const Footer = () => {
|
||||
|
||||
return (
|
||||
// <footer className="my-footer mt-auto d-flex flex-shrink-0 justify-content-center align-items-center">
|
||||
// Автор, {year}
|
||||
// </footer>
|
||||
<footer className="footer">
|
||||
<div className="container">
|
||||
<div className = "footer_wrapper">
|
||||
<nav>
|
||||
<a href = "https://chat.whatsapp.com/KDJp7dnHzAWBQmT7PF3ZN3" className = "nav_foot">
|
||||
<img src={WatsappLogo} alt=""/>
|
||||
</a>
|
||||
<a href = "https://vk.com/shanygin2000" className = "nav_foot">
|
||||
<img src={VkLogo} alt=""/>
|
||||
</a>
|
||||
<a href = "https://instagram.com/sshanygin?igshid=NzZlODBkYWE4Ng==&utm_source=qr" className = "nav_foot">
|
||||
<img src={InstogramLogo} alt=""/>
|
||||
</a>
|
||||
<a href="https://web.telegram.org/a/#1337526477" className="nav_foot">
|
||||
<img src={TelegramLogo} alt=""/>
|
||||
</a>
|
||||
</nav>
|
||||
<nav className="nav_mail_line_phone">
|
||||
<a href = "#" className="mail_line_phone">
|
||||
Book_shop@mail.com
|
||||
</a>
|
||||
<img src={Line} alt="" className="mail_line_phone" id ="line"/>
|
||||
<a href = "#" className="mail_line_phone">
|
||||
+7(999)-323-65-23
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
0
laba4/src/components/navigation/Navigation.css
Normal file
47
laba4/src/components/navigation/Navigation.jsx
Normal file
@ -0,0 +1,47 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
Nav, Navbar, NavbarCollapse, NavbarToggle,
|
||||
} from 'react-bootstrap';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import iconBook from '../../assets/iconBook.svg';
|
||||
import '../../index.css';
|
||||
|
||||
const Navigation = ({ routes }) => {
|
||||
const location = useLocation();
|
||||
const indexPageLink = routes.filter((route) => route.index === false).shift();
|
||||
const pages = routes.filter((route) => Object.prototype.hasOwnProperty.call(route, 'title', 'title2'));
|
||||
|
||||
return(
|
||||
<header id="header" className="fixed-top">
|
||||
<Navbar expand='md' bg='light' data-bs-theme='dark' className='navbar navbar-expand-md navbar-dark'>
|
||||
<div className='container'>
|
||||
<Navbar.Brand as={Link} to={indexPageLink?.path ?? '/'}>
|
||||
<img src={iconBook} alt="логотип" />
|
||||
<div className="word">
|
||||
Book <br/>
|
||||
shop
|
||||
</div>
|
||||
</Navbar.Brand>
|
||||
|
||||
<NavbarToggle aria-controls='main-navbar' />
|
||||
<NavbarCollapse className="justify-content-end me-5" id='main-navbar '>
|
||||
<Nav className='main-navbar' activeKey={location.pathname}>
|
||||
{
|
||||
pages.map((page) =>
|
||||
<Nav.Link as={Link} key={page.path} eventKey={page.path} to={page.path ?? '/'}>
|
||||
{page.title} {page.title2}
|
||||
</Nav.Link>)
|
||||
}
|
||||
</Nav>
|
||||
</NavbarCollapse>
|
||||
</div>
|
||||
</Navbar >
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
||||
Navigation.propTypes = {
|
||||
routes: PropTypes.array,
|
||||
};
|
||||
|
||||
export default Navigation;
|
1092
laba4/src/index.css
Normal file
73
laba4/src/main.jsx
Normal file
@ -0,0 +1,73 @@
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
|
||||
import App from './App.jsx';
|
||||
import './index.css';
|
||||
import ErrorPage from './pages/ErrorPage.jsx';
|
||||
import MainPage from './pages/MainPage.jsx';
|
||||
import Books from './pages/Books.jsx';
|
||||
import Contact from './pages/Contact.jsx';
|
||||
import Basket from './pages/Basket.jsx';
|
||||
import iconBasket from './assets/iconShoppingCurt.svg';
|
||||
import SignIn from './pages/SignIn.jsx';
|
||||
import iconMan from './assets/iconMan.svg';
|
||||
import Register from './pages/Register.jsx';
|
||||
import PageAdmin from './pages/PageAdmin.jsx';
|
||||
|
||||
const routes = [
|
||||
{
|
||||
index: true,
|
||||
path: '/',
|
||||
element: <MainPage />,
|
||||
title: 'Home',
|
||||
},
|
||||
{
|
||||
path: '/Books',
|
||||
element: <Books />,
|
||||
title: 'Books',
|
||||
},
|
||||
{
|
||||
path: '/Contact',
|
||||
element: <Contact />,
|
||||
title: 'Contact',
|
||||
},
|
||||
{
|
||||
path: '/Basket',
|
||||
element: <Basket />,
|
||||
title: <img src={iconBasket}/>,
|
||||
},
|
||||
{
|
||||
path: '/SignIn',
|
||||
element: <SignIn />,
|
||||
title:
|
||||
<img src={iconMan} />,
|
||||
title2: 'sign in' ,
|
||||
},
|
||||
{
|
||||
path: '/Register',
|
||||
element: <Register />,
|
||||
},
|
||||
{
|
||||
path: '/PageAdmin',
|
||||
element: <PageAdmin />,
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
path: '/',
|
||||
element: <App routes={routes} />,
|
||||
children: routes,
|
||||
errorElement: <ErrorPage />,
|
||||
},
|
||||
]);
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
<React.StrictMode>
|
||||
<RouterProvider router={router} />
|
||||
</React.StrictMode>,
|
||||
);
|
181
laba4/src/pages/Basket.jsx
Normal file
@ -0,0 +1,181 @@
|
||||
import '../index.css';
|
||||
import imageDracula from '../assets/imageDracula.jpg';
|
||||
const Basket = () => {
|
||||
return (
|
||||
<div className="main_Basket">
|
||||
<div className="container">
|
||||
<div className="main_wrapper_Basket">
|
||||
<div className="main_block1_Basket">
|
||||
<h1 className="Word_Basket">
|
||||
Basket
|
||||
</h1>
|
||||
<div className="line_Basket"></div>
|
||||
<a href = "#" className = "Word_DeleteAll">
|
||||
Delete all
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="Block_Two_Three">
|
||||
<div className="Shell">
|
||||
<div className="line_black"></div>
|
||||
<div className="main_block2_Basket">
|
||||
<img src={imageDracula} className="Img_Films_Basket"/>
|
||||
<div className="Options_In_Films">
|
||||
<p className="word_Dracula">Dracula</p>
|
||||
<p className="word_Author">Bram Stoker</p>
|
||||
<p className="word_Ganres_Basket">Genres: Horror</p>
|
||||
<a href = "#" className = "word_Delete_Basket">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
<div className="Button_add_In_Basket">
|
||||
<div className="Circle_Left">-</div>
|
||||
<div className="main_field_one">
|
||||
<input type="text" className="text_Count" placeholder="1"/>
|
||||
</div>
|
||||
<div className="Circle_Right">+</div>
|
||||
</div>
|
||||
<p className="Word_Dollars">49 $</p>
|
||||
</div>
|
||||
<div className="line_black"></div>
|
||||
<div className="main_block2_Basket">
|
||||
<img src={imageDracula} className="Img_Films_Basket"/>
|
||||
<div className="Options_In_Films">
|
||||
<p className="word_Dracula">Dracula</p>
|
||||
<p className="word_Author">Bram Stoker</p>
|
||||
<p className="word_Ganres_Basket">Genres: Horror</p>
|
||||
<a href = "#" className = "word_Delete_Basket">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
<div className="Button_add_In_Basket">
|
||||
<div className="Circle_Left">-</div>
|
||||
<div className="main_field_one">
|
||||
<input type="text" className="text_Count" placeholder="1"/>
|
||||
</div>
|
||||
<div className="Circle_Right">+</div>
|
||||
</div>
|
||||
<p className="Word_Dollars">49 $</p>
|
||||
</div>
|
||||
<div className="line_black"></div>
|
||||
<div className="main_block2_Basket">
|
||||
<img src={imageDracula} className="Img_Films_Basket"/>
|
||||
<div className="Options_In_Films">
|
||||
<p className="word_Dracula">Dracula</p>
|
||||
<p className="word_Author">Bram Stoker</p>
|
||||
<p className="word_Ganres_Basket">Genres: Horror</p>
|
||||
<a href = "#" className = "word_Delete_Basket">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
<div className="Button_add_In_Basket">
|
||||
<div className="Circle_Left">-</div>
|
||||
<div className="main_field_one">
|
||||
<input type="text" className="text_Count" placeholder="1"/>
|
||||
</div>
|
||||
<div className="Circle_Right">+</div>
|
||||
</div>
|
||||
<p className="Word_Dollars">49 $</p>
|
||||
</div>
|
||||
<div className="line_black"></div>
|
||||
<div className="main_block2_Basket">
|
||||
<img src={imageDracula} className="Img_Films_Basket"/>
|
||||
<div className="Options_In_Films">
|
||||
<p className="word_Dracula">Dracula</p>
|
||||
<p className="word_Author">Bram Stoker</p>
|
||||
<p className="word_Ganres_Basket">Genres: Horror</p>
|
||||
<a href = "#" className = "word_Delete_Basket">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
<div className="Button_add_In_Basket">
|
||||
<div className="Circle_Left">-</div>
|
||||
<div className="main_field_one">
|
||||
<input type="text" className="text_Count" placeholder="1"/>
|
||||
</div>
|
||||
<div className="Circle_Right">+</div>
|
||||
</div>
|
||||
<p className="Word_Dollars">49 $</p>
|
||||
</div>
|
||||
<div className="line_black"></div>
|
||||
<div className="main_block2_Basket">
|
||||
<img src={imageDracula} className="Img_Films_Basket"/>
|
||||
<div className="Options_In_Films">
|
||||
<p className="word_Dracula">Dracula</p>
|
||||
<p className="word_Author">Bram Stoker</p>
|
||||
<p className="word_Ganres_Basket">Genres: Horror</p>
|
||||
<a href = "#" className = "word_Delete_Basket">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
<div className="Button_add_In_Basket">
|
||||
<div className="Circle_Left">-</div>
|
||||
<div className="main_field_one">
|
||||
<input type="text" className="text_Count" placeholder="1"/>
|
||||
</div>
|
||||
<div className="Circle_Right">+</div>
|
||||
</div>
|
||||
<p className="Word_Dollars">49 $</p>
|
||||
</div>
|
||||
<div className="line_black"></div>
|
||||
<div className="main_block2_Basket">
|
||||
<img src={imageDracula} className="Img_Films_Basket"/>
|
||||
<div className="Options_In_Films">
|
||||
<p className="word_Dracula">Dracula</p>
|
||||
<p className="word_Author">Bram Stoker</p>
|
||||
<p className="word_Ganres_Basket">Genres: Horror</p>
|
||||
<a href = "#" className = "word_Delete_Basket">
|
||||
Delete
|
||||
</a>
|
||||
</div>
|
||||
<div className="Button_add_In_Basket">
|
||||
<div className="Circle_Left">-</div>
|
||||
<div className="main_field_one">
|
||||
<input type="text" className="text_Count" placeholder="1"/>
|
||||
</div>
|
||||
<div className="Circle_Right">+</div>
|
||||
</div>
|
||||
<p className="Word_Dollars">49 $</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="main_block3">
|
||||
<div className="wrapper_block3">
|
||||
<p className="Word_with_Registr">
|
||||
<a href = "Register.html" className = "word_registr">
|
||||
Register
|
||||
</a>
|
||||
on the website and get a promo code for your first purchase
|
||||
</p>
|
||||
<div className="Class_Amount">
|
||||
<p className="Word_Amount">Products in the amount of</p>
|
||||
<p className="Word_Pay">98 $</p>
|
||||
</div>
|
||||
<div className="Class_Number">
|
||||
<p className="Word_Number">Number of Products</p>
|
||||
<p className="Word_Count">2</p>
|
||||
</div>
|
||||
<div className="Text_Promo">
|
||||
<input type="text" className="Input_Word" placeholder="promo code"/>
|
||||
<button className="Button_Apply">Apply</button>
|
||||
</div>
|
||||
<div className="All_price">
|
||||
<p className="Text_Left_All_price">Total order amount</p>
|
||||
<p className="Price">98 $</p>
|
||||
</div>
|
||||
<div className="class_Arrange">
|
||||
<button className="button_Arrange">
|
||||
Arrange
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Basket;
|
123
laba4/src/pages/Books.jsx
Normal file
@ -0,0 +1,123 @@
|
||||
import '../index.css';
|
||||
import { Link } from 'react-router-dom';
|
||||
import imageDracula from '../assets/imageDracula.jpg';
|
||||
const Books = () => {
|
||||
return (
|
||||
<div className="main_Books">
|
||||
<div className="container">
|
||||
<div className="main_wrapper">
|
||||
<div className="main_block1">
|
||||
<p className="Word_Genres">Genres</p>
|
||||
<div className="Label">
|
||||
<div className="Label_block_1">
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Fairy tale
|
||||
</label>
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Biography
|
||||
</label>
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Detective
|
||||
</label>
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Textbook
|
||||
</label>
|
||||
</div>
|
||||
<div className="Label_block_2">
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Detective
|
||||
</label>
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Fantasy
|
||||
</label>
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Romance
|
||||
</label>
|
||||
<label className="label_cb">
|
||||
<input className="cb" type="checkbox"/>Horror
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div className="block1_button">
|
||||
<button className="button_Apply_book">
|
||||
Apply
|
||||
</button>
|
||||
</div>
|
||||
<div className="Panel_Admin2">
|
||||
<Link to="/PageAdmin" className="Admin_Word2">Append Book</Link>
|
||||
</div>
|
||||
</div>
|
||||
<div className="main_block2">
|
||||
<div className="Conteiner_Films">
|
||||
<img src={imageDracula} className="Img_Films"/>
|
||||
<p className="word_Prince_book">123</p>
|
||||
<p className="word_Name_book">safasf</p>
|
||||
<p className="word_Author_book">sdfdsf</p>
|
||||
<p className="word_Genres_book">Genres: sdfs</p>
|
||||
<div className="Panel_Admin1">
|
||||
<a href="Admin.html" className="Admin_Word1">Edit</a>
|
||||
<a href="" className="Admin_Word1">Delete</a>
|
||||
</div>
|
||||
<div className="block2_button">
|
||||
<button className="button_InBusket_book">
|
||||
In a basket
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Conteiner_Films">
|
||||
<img src={imageDracula} className="Img_Films"/>
|
||||
<p className="word_Prince_book">123</p>
|
||||
<p className="word_Name_book">safasf</p>
|
||||
<p className="word_Author_book">sdfdsf</p>
|
||||
<p className="word_Genres_book">Genres: sdfs</p>
|
||||
<div className="Panel_Admin1">
|
||||
<a href="Admin.html" className="Admin_Word1">Edit</a>
|
||||
<a href="" className="Admin_Word1">Delete</a>
|
||||
</div>
|
||||
<div className="block2_button">
|
||||
<button className="button_InBusket_book">
|
||||
In a basket
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Conteiner_Films">
|
||||
<img src={imageDracula} className="Img_Films"/>
|
||||
<p className="word_Prince_book">123</p>
|
||||
<p className="word_Name_book">safasf</p>
|
||||
<p className="word_Author_book">sdfdsf</p>
|
||||
<p className="word_Genres_book">Genres: sdfs</p>
|
||||
<div className="Panel_Admin1">
|
||||
<a href="Admin.html" className="Admin_Word1">Edit</a>
|
||||
<a href="" className="Admin_Word1">Delete</a>
|
||||
</div>
|
||||
<div className="block2_button">
|
||||
<button className="button_InBusket_book">
|
||||
In a basket
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Conteiner_Films">
|
||||
<img src={imageDracula} className="Img_Films"/>
|
||||
<p className="word_Prince_book">123</p>
|
||||
<p className="word_Name_book">safasf</p>
|
||||
<p className="word_Author_book">sdfdsf</p>
|
||||
<p className="word_Genres_book">Genres: sdfs</p>
|
||||
<div className="Panel_Admin1">
|
||||
<a href="Admin.html" className="Admin_Word1">Edit</a>
|
||||
<a href="" className="Admin_Word1">Delete</a>
|
||||
</div>
|
||||
<div className="block2_button">
|
||||
<button className="button_InBusket_book">
|
||||
In a basket
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Books;
|
35
laba4/src/pages/Contact.jsx
Normal file
@ -0,0 +1,35 @@
|
||||
import '../index.css';
|
||||
import {Link} from 'react-router-dom';
|
||||
const Contact = () => {
|
||||
return (
|
||||
<div className='Unite'>
|
||||
<div className="main_Contact">
|
||||
<div className="container">
|
||||
<div className="intro_wrapper_Contact">
|
||||
<h1 className="intro_title_Contact">
|
||||
Contact
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="footer_Contact">
|
||||
<div className="container">
|
||||
<div className="footer_wrapper_Contact">
|
||||
<div className="footer_words_with_link">
|
||||
<p className="footer_word_Contact">
|
||||
If you have any questions or there was some mistake,
|
||||
please write to us by email<span className='e-mail'></span>
|
||||
<Link to={'/https://mail.ru/?ysclid=lqfruhxqbz509144246'} className = "word_link_mail">
|
||||
book_shop@mail.com.
|
||||
</Link>
|
||||
We will try to respond as soon as possible.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Contact;
|
19
laba4/src/pages/ErrorPage.jsx
Normal file
@ -0,0 +1,19 @@
|
||||
import { Alert, Button, Container } from 'react-bootstrap';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
const ErrorPage = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<Container fluid className="p-2 row justify-content-center">
|
||||
<Container className='col-md-6'>
|
||||
<Alert variant="danger">
|
||||
Страница не найдена
|
||||
</Alert>
|
||||
<Button className="w-25 mt-2" variant="primary" onClick={() => navigate(-1)}>Назад</Button>
|
||||
</Container>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
export default ErrorPage;
|
23
laba4/src/pages/MainPage.jsx
Normal file
@ -0,0 +1,23 @@
|
||||
import '../index.css';
|
||||
|
||||
const MainPage = () => {
|
||||
return (
|
||||
<div className="mainPage">
|
||||
<div className="container">
|
||||
<div className="intro_wrapper">
|
||||
<div className="intro_block">
|
||||
<h1 className="intro_title">
|
||||
There are a lot of books in our store
|
||||
</h1>
|
||||
<p className="intro_text">
|
||||
Come to our store or choose any books­ to your taste at a very favorable price.
|
||||
Every day we are replenished with more and more products.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default MainPage;
|
29
laba4/src/pages/PageAdmin.jsx
Normal file
@ -0,0 +1,29 @@
|
||||
import { Table } from 'react-bootstrap';
|
||||
const PageAdmin = () => {
|
||||
return (
|
||||
|
||||
<div className="main_Tabel">
|
||||
<div className="container">
|
||||
<div className="btn-group" role="group">
|
||||
<button id="items-add" className="btn btn-info">add a product</button>
|
||||
</div>
|
||||
<div>
|
||||
<Table id="items-table" className="table table-striped">
|
||||
<thead>
|
||||
<th scope="col">№</th>
|
||||
<th scope="col" className="w-25">Name</th>
|
||||
<th scope="col" className="w-25">Price</th>
|
||||
<th scope="col" className="w-25">Author</th>
|
||||
<th scope="col" className="w-25">Genre</th>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"></th>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</Table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PageAdmin;
|
38
laba4/src/pages/Register.jsx
Normal file
@ -0,0 +1,38 @@
|
||||
import '../index.css';
|
||||
|
||||
const Register = () => {
|
||||
return (
|
||||
<div className="main_Register">
|
||||
<div className="main_wrapper_Register">
|
||||
<div className="main_block_Register">
|
||||
<div className="up_word_Register">
|
||||
<p className="main_title_Register">
|
||||
Create an account
|
||||
</p>
|
||||
<p className="main_text_Register">
|
||||
Enter your nickname, username and password
|
||||
</p>
|
||||
</div>
|
||||
<div className="main_fields_Register">
|
||||
<div className="main_field_one_Register">
|
||||
<input type="text" placeholder="nickname" className="input_Register"/>
|
||||
</div>
|
||||
<div className="main_field_one_Register">
|
||||
<input type="text" placeholder="login" className="input_Register"/>
|
||||
</div>
|
||||
<div className="main_field_two_Register">
|
||||
<input type="text" placeholder="password" className="input_Register"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="class_login_Register">
|
||||
<button className="button_login_Register">
|
||||
Register
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Register;
|
40
laba4/src/pages/SignIn.jsx
Normal file
@ -0,0 +1,40 @@
|
||||
import '../index.css';
|
||||
import { Link } from 'react-router-dom';
|
||||
const SignIn = () => {
|
||||
return (
|
||||
<div className="main_Sign_in">
|
||||
<div className="main_wrapper_Sign_in">
|
||||
<div className="main_block_Sign_in">
|
||||
<div className="up_word">
|
||||
<p className="main_title">
|
||||
Sign in
|
||||
</p>
|
||||
<p className="main_text">
|
||||
Login using your username and password
|
||||
</p>
|
||||
</div>
|
||||
<div className="main_fields">
|
||||
<div className="main_field_one_Sign_in">
|
||||
<input type="text" placeholder="login" className="input_Sign_in"/>
|
||||
</div>
|
||||
<div className="main_field_two_Sign_in">
|
||||
<input type="text" placeholder="password" className="input_Sign_in"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="class_login">
|
||||
<button className="button_login">
|
||||
Login
|
||||
</button>
|
||||
</div>
|
||||
<div className="down_word">
|
||||
If you don't have an account, <br/>
|
||||
then
|
||||
<Link to="/Register" className = "word_registr_Sign_in">register</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default SignIn;
|
7
laba4/vite.config.js
Normal file
@ -0,0 +1,7 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
})
|