diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..91ac7b9 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,24 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + //'airbnb-base', + 'plugin:react/recommended', + 'plugin:react/jsx-runtime', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parserOptions: { ecmaVersion: 12, sourceType: 'module' }, + settings: { react: { version: '18.2' } }, + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + 'indent': 'off', + 'no-console': 'off', + 'arrow-body-style': 'off', + 'implicit-arrow-linebreak': 'off', + }, +} diff --git a/README.md b/README.md index 5fc4cc0..f768e33 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ -# PIbd-22_Internet_programming +# React + Vite -Интернет-программирование \ No newline at end of file +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 diff --git a/index.html b/index.html new file mode 100644 index 0000000..1cc82da --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Тольяттинский государственный университет + + +
+ + + + \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..458cf9b --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "Node", + "target": "ES2020", + "jsx": "react", + "strictNullChecks": true, + "strictFunctionTypes": true + }, + "exclude": [ + "node_modules", + "**/node_modules/*" + ] +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..f4d7825 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "univercity", + "private": true, + "version": "0.0.0", + "type": "module", + "description": "internet-programming 2023", + "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" + } +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..a87fe7c Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/App.css b/src/App.css new file mode 100644 index 0000000..a6fd221 --- /dev/null +++ b/src/App.css @@ -0,0 +1,53 @@ +html { + width: 100%; +} + +body { + height: 100%; + margin: 0px; + padding: 0px; + background-color: #e5e5e5; + font-family: Arial; + /* для закрепления подвала внизу страницы*/ + display: flex; + flex-direction: column; +} + +@media (max-width: 800px) { + body { + font-size: small; + } +} + +.btn { + background-color: #012362; + border: 0px; + display: block; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; +} + +table { + font-size: 13pt; + border: 2px solid; + border-left: 10px solid; + border-right: 10px solid; +} + +@media (max-width: 800px) { + table { + font-size: 10pt; + } +} + +@media (max-width: 500px) { + table { + font-size: 8pt; + } +} + +thead { + font-style: italic; +} \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..48a63ba --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,23 @@ +import PropTypes from 'prop-types'; +import Content from './components/content/Content'; +import './App.css'; +import Header from './components/header/Header.jsx' +import Navigation from './components/navigation/Navigation.jsx' +import Footer from './components/footer/Footer.jsx' + +const App = ({ routes }) => { + return ( + <> +
+ + +