This commit is contained in:
Kakabay 2022-10-11 15:23:56 +05:00
parent f54b55411a
commit 1814b180c2
16 changed files with 3148 additions and 0 deletions

24
.gitignore vendored Normal file
View 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?

13
index.html Normal file
View 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"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

2890
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

24
package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "exchange_10.10.2022",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.2"
},
"devDependencies": {
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.1.0",
"sass": "^1.55.0",
"vite": "^3.1.0"
}
}

23
src/App.jsx Normal file
View File

@ -0,0 +1,23 @@
// Modules
import React from 'react';
import { Routes, Route } from 'react-router-dom';
// Styles
import './assets/styles/style.scss';
// Components
import Header from './components/Header';
// Pages
import Home from './pages/Home';
const App = () => {
return (
<div className="App">
<Header />
<Routes>
<Route index element={<Home />} />
</Routes>
</div>
);
};
export default App;

View File

@ -0,0 +1,3 @@
<svg width="17" height="8" viewBox="0 0 17 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.3536 4.35355C16.5488 4.15829 16.5488 3.84171 16.3536 3.64645L13.1716 0.464466C12.9763 0.269204 12.6597 0.269204 12.4645 0.464466C12.2692 0.659728 12.2692 0.976311 12.4645 1.17157L15.2929 4L12.4645 6.82843C12.2692 7.02369 12.2692 7.34027 12.4645 7.53553C12.6597 7.7308 12.9763 7.7308 13.1716 7.53553L16.3536 4.35355ZM0 4.5H16V3.5H0V4.5Z" fill="#05172D"/>
</svg>

After

Width:  |  Height:  |  Size: 468 B

12
src/assets/icons/file.svg Normal file
View File

@ -0,0 +1,12 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_555_638)">
<path d="M30 32H18C17.4696 32 16.9609 32.2107 16.5858 32.5858C16.2107 32.9609 16 33.4696 16 34C16 34.5304 16.2107 35.0391 16.5858 35.4142C16.9609 35.7893 17.4696 36 18 36H30C30.5304 36 31.0391 35.7893 31.4142 35.4142C31.7893 35.0391 32 34.5304 32 34C32 33.4696 31.7893 32.9609 31.4142 32.5858C31.0391 32.2107 30.5304 32 30 32Z" fill="#05172D"/>
<path d="M18 28H24C24.5304 28 25.0391 27.7893 25.4142 27.4142C25.7893 27.0391 26 26.5304 26 26C26 25.4696 25.7893 24.9609 25.4142 24.5858C25.0391 24.2107 24.5304 24 24 24H18C17.4696 24 16.9609 24.2107 16.5858 24.5858C16.2107 24.9609 16 25.4696 16 26C16 26.5304 16.2107 27.0391 16.5858 27.4142C16.9609 27.7893 17.4696 28 18 28Z" fill="#05172D"/>
<path d="M39.48 16.6599L28.6 4.65987C28.413 4.45269 28.1847 4.28693 27.9298 4.17326C27.6749 4.05959 27.3991 4.00053 27.12 3.99987H13.12C12.4555 3.99195 11.7959 4.11499 11.179 4.36198C10.5621 4.60898 9.99981 4.97508 9.52436 5.43938C9.04892 5.90368 8.66959 6.45709 8.40804 7.068C8.14648 7.67892 8.00783 8.33537 8 8.99987V38.9999C8.00783 39.6644 8.14648 40.3208 8.40804 40.9317C8.66959 41.5426 9.04892 42.0961 9.52436 42.5604C9.99981 43.0247 10.5621 43.3908 11.179 43.6378C11.7959 43.8848 12.4555 44.0078 13.12 43.9999H34.88C35.5445 44.0078 36.2041 43.8848 36.821 43.6378C37.4379 43.3908 38.0002 43.0247 38.4756 42.5604C38.9511 42.0961 39.3304 41.5426 39.592 40.9317C39.8535 40.3208 39.9922 39.6644 40 38.9999V17.9999C39.9987 17.5042 39.8134 17.0267 39.48 16.6599ZM28 9.99987L33.48 15.9999H29.48C29.2706 15.9872 29.0657 15.933 28.8775 15.8403C28.6892 15.7477 28.5213 15.6185 28.3835 15.4602C28.2458 15.3019 28.1409 15.1178 28.075 14.9186C28.0092 14.7194 27.9837 14.5091 28 14.2999V9.99987ZM34.88 39.9999H13.12C12.9807 40.008 12.8413 39.9885 12.7095 39.9426C12.5778 39.8967 12.4565 39.8253 12.3524 39.7324C12.2484 39.6395 12.1637 39.5269 12.1032 39.4012C12.0427 39.2755 12.0077 39.1391 12 38.9999V8.99987C12.0077 8.8606 12.0427 8.7242 12.1032 8.5985C12.1637 8.47281 12.2484 8.36029 12.3524 8.26739C12.4565 8.17449 12.5778 8.10303 12.7095 8.05713C12.8413 8.01122 12.9807 7.99177 13.12 7.99987H24V14.2999C23.9677 15.7731 24.5195 17.1993 25.5349 18.2672C26.5504 19.3351 27.947 19.958 29.42 19.9999H36V38.9999C35.9923 39.1391 35.9573 39.2755 35.8968 39.4012C35.8363 39.5269 35.7516 39.6395 35.6476 39.7324C35.5435 39.8253 35.4222 39.8967 35.2905 39.9426C35.1587 39.9885 35.0193 40.008 34.88 39.9999Z" fill="#05172D"/>
</g>
<defs>
<clipPath id="clip0_555_638">
<rect width="48" height="48" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

13
src/assets/icons/logo.svg Normal file
View File

@ -0,0 +1,13 @@
<svg width="51" height="51" viewBox="0 0 51 51" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_523_1749)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.17909 32.5099L17.5208 22.1373V17.4502H22.1888L23.8992 15.7341L15.6421 7.44971H7.55829V17.9967L0.128906 25.4454L7.17909 32.5099Z" fill="#003197"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.1707 23.8474L43.4266 15.5646V7.45366H32.911L25.4928 0L18.4463 7.06731L28.7893 17.4495H33.464V22.1366L35.1707 23.8474Z" fill="#ABA17D"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.5337 43.8237L22.1883 33.4453H17.5209V28.7544L15.8105 27.0464L7.55469 35.3295V43.4414H18.0585L25.4891 50.8947L32.5337 43.8237Z" fill="#0056FF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.3427 43.4413H43.4266V32.8915L50.8554 25.4494L43.8077 18.3833L33.4628 28.7568V33.4464H28.7918L27.0869 35.1619L35.3427 43.4413Z" fill="#003197"/>
</g>
<defs>
<clipPath id="clip0_523_1749">
<rect width="51" height="51.0001" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,36 @@
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');
* {
padding: 0;
margin: 0;
box-sizing: border-box;
scroll-behavior: smooth;
}
.container {
padding: 0 4rem;
margin: 0 auto;
max-width: 159.2rem;
width: 100%;
}
html {
font-size: 62.5%;
font-family: 'Lato', sans-serif;
}
ul {
list-style-type: none;
}
input,
button {
background: none;
outline: none;
border: none;
}
a {
color: $base-black;
text-decoration: none;
}

View File

@ -0,0 +1,27 @@
.header {
background: $base-light-blue;
}
.header-wrapper {
padding: 1.6rem 0;
color: $base-black;
font-weight: 700;
display: flex;
align-items: center;
justify-content: space-between;
}
.header-nav-list {
display: flex;
gap: 0.8rem;
}
.header-nav-list-item a {
padding: 0.8rem;
font-size: 1.6rem;
}
.sign-in-item {
font-size: 1.6rem;
padding: 0.8rem;
font-weight: 700;
}

View File

@ -0,0 +1,6 @@
// Variables
$base-black: #151515;
$base-white: #fff;
$base-gray: #868686;
$base-blue: #05172d;
$base-light-blue: #afbfcb;

View File

@ -0,0 +1,4 @@
// General
@import './variables';
@import './general';
@import './header';

45
src/components/Header.jsx Normal file
View File

@ -0,0 +1,45 @@
// Modules
import React from 'react';
import { Link } from 'react-router-dom';
// Icons
import logo from '../assets/icons/logo.svg';
const Header = () => {
return (
<header className="header">
<div className="container">
<div className="header-wrapper">
<div className="logo">
<img src={logo} alt="logo" />
</div>
<nav className="header-nav">
<ul className="header-nav-list">
<li className="header-nav-list-item">
<Link to={'/'}>ГТСБТ</Link>
</li>
<li className="header-nav-list-item">
<Link to={'/'}>Нормативная база</Link>
</li>
<li className="header-nav-list-item">
<Link to={'/'}>Новости</Link>
</li>
<li className="header-nav-list-item">
<Link to={'/'}>Мультимедия</Link>
</li>
<li className="header-nav-list-item">
<Link to={'/'}>Контакты</Link>
</li>
</ul>
</nav>
<div className="sign-in">
<Link to={'/'} className="sign-in-item">
Войти / Регистрация
</Link>
</div>
</div>
</div>
</header>
);
};
export default Header;

16
src/main.jsx Normal file
View File

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

5
src/pages/Home.jsx Normal file
View File

@ -0,0 +1,5 @@
const Home = () => {
return <div>Home</div>;
};
export default Home;

7
vite.config.js Normal file
View File

@ -0,0 +1,7 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()]
})