@@ -21,9 +22,9 @@ function Header() {
ПРОЕКТЫ
-
+
КОНТАКТЫ
-
+
ИКТИБ
@@ -32,4 +33,4 @@ function Header() {
);
}
-export default Header;
\ No newline at end of file
+export default Navbar;
\ No newline at end of file
diff --git a/src/components/Header/header.scss b/src/components/Navbar/Navbar.scss
similarity index 81%
rename from src/components/Header/header.scss
rename to src/components/Navbar/Navbar.scss
index 28f8a44..255a83b 100644
--- a/src/components/Header/header.scss
+++ b/src/components/Navbar/Navbar.scss
@@ -1,10 +1,11 @@
$primary-bg-color: #343434;
$primary-text-color: white;
-.header {
+.navbar {
position: absolute;
top: 0;
width: 80%;
+ max-height: 60px;
padding: 1em 10%;
background: $primary-bg-color;
@@ -14,11 +15,11 @@ $primary-text-color: white;
align-items: center;
.logo-container {
- width: 25%;
- }
+ height: 100%;
- .logo {
- width: 100%;
+ .logo {
+ width: 100%;
+ }
}
.bar {
diff --git a/src/error-page.jsx b/src/error-page.jsx
new file mode 100644
index 0000000..0c9055f
--- /dev/null
+++ b/src/error-page.jsx
@@ -0,0 +1,19 @@
+import { useRouteError } from 'react-router-dom'
+
+export default function ErrorPage() {
+ const error = useRouteError()
+ console.error(error)
+
+ return (
+
+
Oops!
+
Sorry, an unexpected error has occurred.
+
+ {error.statusText || error.message}
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index d563c0f..1af7802 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,13 +1,32 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
-import './index.css';
-import App from './App';
+import { createHashRouter, RouterProvider, Outlet } from 'react-router-dom';
+
+import Root from './routes/Root';
+import ErrorPage from './error-page';
+import Contact from './routes/Contact';
import reportWebVitals from './reportWebVitals';
+import './index.scss';
+
+const router = createHashRouter([
+
+ {
+ path: '/',
+ element:
,
+ errorElement:
,
+ children: [
+ {
+ path: "/contact",
+ element:
,
+ },
+ ]
+ },
+])
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
-
+
);
diff --git a/src/index.css b/src/index.scss
similarity index 99%
rename from src/index.css
rename to src/index.scss
index 253b7a6..54c62da 100644
--- a/src/index.css
+++ b/src/index.scss
@@ -14,4 +14,4 @@ body {
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
-}
+}
\ No newline at end of file
diff --git a/src/routes/Contact.jsx b/src/routes/Contact.jsx
new file mode 100644
index 0000000..022c92c
--- /dev/null
+++ b/src/routes/Contact.jsx
@@ -0,0 +1,25 @@
+import Navbar from '../components/Navbar/Navbar';
+
+function Contact() {
+ return (
+ <>
+
+ Студенческое конструкторское бюро
+ "Компьютерное инновационное творчество"
+
+
+
Контактное лицо: Кутковой Владимир Сергеевич
+
+
+ >
+ );
+}
+
+export default Contact;
\ No newline at end of file
diff --git a/src/routes/Root.jsx b/src/routes/Root.jsx
new file mode 100644
index 0000000..95ffaf6
--- /dev/null
+++ b/src/routes/Root.jsx
@@ -0,0 +1,17 @@
+import { Outlet } from "react-router-dom";
+
+import Navbar from '../components/Navbar/Navbar';
+import './Root.scss';
+
+function Root() {
+ return (
+ <>
+
+
+
+
+ >
+ );
+}
+
+export default Root;
\ No newline at end of file
diff --git a/src/routes/Root.scss b/src/routes/Root.scss
new file mode 100644
index 0000000..36d2b57
--- /dev/null
+++ b/src/routes/Root.scss
@@ -0,0 +1,23 @@
+$primary-bg-color: #343434;
+$secondary-bg-color: white;
+$primary-text-color: white;
+
+#page {
+ margin-top: calc(60px + 2em);
+
+ .header {
+ height: 25vh;
+
+ text-align: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ color: $primary-text-color;
+ background: $primary-bg-color;
+ }
+
+ .content {
+ background: $secondary-bg-color;
+ }
+}