diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/package-lock.json b/package-lock.json old mode 100644 new mode 100755 index dab67d4..702a1b4 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "react-dom": "^18.2.0", "react-router-dom": "^6.22.0", "react-scripts": "5.0.1", + "reactpress": "^1.0.0", "sass": "^1.70.0", "web-vitals": "^2.1.4", "wpapi": "^1.2.2" @@ -15130,6 +15131,11 @@ } } }, + "node_modules/reactpress": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/reactpress/-/reactpress-1.0.0.tgz", + "integrity": "sha512-eeyL1FrUzJ8zImkwfoP5T7D6aksky4CSc6cKeJbOwRbs9Kjy2Oc6jddlvcQrQ80KzjPYRjGKfTX4074yjgAi9Q==" + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", diff --git a/package.json b/package.json old mode 100644 new mode 100755 index f545478..de90dc8 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "react-dom": "^18.2.0", "react-router-dom": "^6.22.0", "react-scripts": "5.0.1", + "reactpress": "^1.0.0", "sass": "^1.70.0", "web-vitals": "^2.1.4", "wpapi": "^1.2.2" diff --git a/public/favicon.ico b/public/favicon.ico old mode 100644 new mode 100755 diff --git a/public/index.html b/public/index.html old mode 100644 new mode 100755 index aa069f2..4d6e51a --- a/public/index.html +++ b/public/index.html @@ -1,43 +1,162 @@ - - - - - - - - - - - - React App - - - -
- - + + + + +main — skb-site + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
+ +
+ +
+ + + + + + diff --git a/public/logo192.png b/public/logo192.png old mode 100644 new mode 100755 diff --git a/public/logo512.png b/public/logo512.png old mode 100644 new mode 100755 diff --git a/public/manifest.json b/public/manifest.json old mode 100644 new mode 100755 diff --git a/public/robots.txt b/public/robots.txt old mode 100644 new mode 100755 diff --git a/src/App.css b/src/App.css old mode 100644 new mode 100755 diff --git a/src/App.js b/src/App.js old mode 100644 new mode 100755 diff --git a/src/App.test.js b/src/App.test.js old mode 100644 new mode 100755 diff --git a/src/api.js b/src/api.js new file mode 100755 index 0000000..e0ffa68 --- /dev/null +++ b/src/api.js @@ -0,0 +1,21 @@ +import * as WPAPI from 'wpapi'; + +const wp = new WPAPI( + process.env.NODE_ENV === 'development' + ? { + endpoint: reactPress.api.rest_url, + username: 'admin', + password: 'testapi', + } + : { endpoint: reactPress.api.rest_url, nonce: reactPress.api.nonce } +); + +export async function getContacts(q = '') { + try { + const users = await wp.users().search(q); + return users; + } catch (error) { + console.error(error); + return []; + } +} \ No newline at end of file diff --git a/src/assets/car.jpeg b/src/assets/car.jpeg old mode 100644 new mode 100755 diff --git a/src/assets/react.svg b/src/assets/react.svg old mode 100644 new mode 100755 diff --git a/src/assets/scb.svg b/src/assets/scb.svg old mode 100644 new mode 100755 diff --git a/src/components/Main/News.jsx b/src/components/Main/News.jsx old mode 100644 new mode 100755 diff --git a/src/components/Main/News.scss b/src/components/Main/News.scss old mode 100644 new mode 100755 diff --git a/src/components/Main/Projects.jsx b/src/components/Main/Projects.jsx old mode 100644 new mode 100755 diff --git a/src/components/Main/Projects.scss b/src/components/Main/Projects.scss old mode 100644 new mode 100755 diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx old mode 100644 new mode 100755 diff --git a/src/components/Navbar/Navbar.scss b/src/components/Navbar/Navbar.scss old mode 100644 new mode 100755 diff --git a/src/error-page.jsx b/src/error-page.jsx old mode 100644 new mode 100755 diff --git a/src/index.js b/src/index.js old mode 100644 new mode 100755 index 335bf9c..7b38189 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import { createHashRouter, RouterProvider, Outlet } from 'react-router-dom'; +import { createHashRouter, RouterProvider } from 'react-router-dom'; import Root from './routes/Root'; import ErrorPage from './error-page'; diff --git a/src/index.scss b/src/index.scss old mode 100644 new mode 100755 diff --git a/src/logo.svg b/src/logo.svg old mode 100644 new mode 100755 diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js old mode 100644 new mode 100755 diff --git a/src/routes/Aboutus.jsx b/src/routes/Aboutus.jsx old mode 100644 new mode 100755 diff --git a/src/routes/Contact copy.jsx b/src/routes/Contact copy.jsx new file mode 100755 index 0000000..4ad36c7 --- /dev/null +++ b/src/routes/Contact copy.jsx @@ -0,0 +1,25 @@ +function Contact() { + return ( + <> +
+

Студенческое конструкторское бюро
+ "Компьютерное инновационное творчество"

+
+
+
+

Контактное лицо: Кутковой Владимир Сергеевич

+
+
+ + + + + + +
+
+ + ); +} + +export default Contact; \ No newline at end of file diff --git a/src/routes/Contact.jsx b/src/routes/Contact.jsx old mode 100644 new mode 100755 diff --git a/src/routes/Labs.jsx b/src/routes/Labs.jsx old mode 100644 new mode 100755 diff --git a/src/routes/Main.jsx b/src/routes/Main.jsx old mode 100644 new mode 100755 diff --git a/src/routes/Projects.jsx b/src/routes/Projects.jsx old mode 100644 new mode 100755 diff --git a/src/routes/Root.jsx b/src/routes/Root.jsx old mode 100644 new mode 100755 index 95ffaf6..591ada8 --- a/src/routes/Root.jsx +++ b/src/routes/Root.jsx @@ -1,17 +1,42 @@ import { Outlet } from "react-router-dom"; +//import { getContacts } from "../api"; import Navbar from '../components/Navbar/Navbar'; import './Root.scss'; +// async function loader() { +// const contacts = await getContacts(); +// return { contacts }; +// } + function Root() { +// const { contacts } = useLoaderData(); return ( <>
+ {/*
+ {contacts.length ? ( + + ) : ( +

+ No contacts +

+ )} +
*/} ); } +//export { loader }; export default Root; \ No newline at end of file diff --git a/src/routes/Root.scss b/src/routes/Root.scss old mode 100644 new mode 100755 diff --git a/src/setupTests.js b/src/setupTests.js old mode 100644 new mode 100755