diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx
index c06d6f9..fdf1b25 100755
--- a/src/components/Navbar/Navbar.jsx
+++ b/src/components/Navbar/Navbar.jsx
@@ -1,33 +1,43 @@
-import { Link } from 'react-router-dom';
-
import { scb as logo } from '../../images';
+import NavbarLink from './NavbarLink';
import './Navbar.styles.scss';
-function Navbar() {
+const mock = [
+ {
+ text: "ГЛАВНАЯ",
+ to: "/",
+ },
+ {
+ text: "О НАС",
+ to: "/aboutus",
+ },
+ {
+ text: "ЛАБОРАТОРИИ",
+ to: "/labs",
+ },
+ {
+ text: "ПРОЕКТЫ",
+ to: "/projects",
+ },
+ {
+ text: "КОНТАКТЫ",
+ to: "/contact",
+ },
+ {
+ text: "ИКТИБ",
+ to: "https://ictis.sfedu.ru",
+ newTab: true,
+ },
+];
+
+function Navbar({ links = mock }) {
return (
-
- ГЛАВНАЯ
-
-
- О НАС
-
-
- ЛАБОРАТОРИИ
-
-
- ПРОЕКТЫ
-
-
- КОНТАКТЫ
-
-
- ИКТИБ
-
+ { links.map(link =>
) }
);
diff --git a/src/components/Navbar/Navbar.styles.scss b/src/components/Navbar/Navbar.styles.scss
index 9c8b703..bb95a2d 100755
--- a/src/components/Navbar/Navbar.styles.scss
+++ b/src/components/Navbar/Navbar.styles.scss
@@ -26,8 +26,11 @@ $primary-text-color: white;
.bar {
display: flex;
+ align-items: center;
+
+ .nav-link {
+ position: relative;
- a {
font-size: 16px;
font-weight: 500;
line-height: 20px;
@@ -36,6 +39,25 @@ $primary-text-color: white;
margin-left: 40px;
color: $primary-text-color;
text-decoration: none;
+ text-wrap: nowrap;
+ }
+
+ .nav-link::after {
+ position: absolute;
+ content: '';
+ left: 50%;
+ transform: translateX(-50%);
+ bottom: 0;
+ display: block;
+ width: 0;
+ height: 1px;
+ background: white;
+ transition: 0.3s;
+ }
+
+ .nav-link:hover:after,
+ .nav-link.active:after {
+ width: 100%;
}
}
}
\ No newline at end of file
diff --git a/src/components/Navbar/NavbarLink.jsx b/src/components/Navbar/NavbarLink.jsx
new file mode 100644
index 0000000..4f431b6
--- /dev/null
+++ b/src/components/Navbar/NavbarLink.jsx
@@ -0,0 +1,18 @@
+import { NavLink } from "react-router-dom";
+
+function NavbarLink({ link }) {
+ return (
+
+ `nav-link ${isActive ? 'active' : isPending ? 'disabled' : ''
+ }`
+ }
+ to={ link.to }
+ target={ link.newTab && '_blank' }
+ >
+ { link.text }
+
+ );
+}
+
+export default NavbarLink;
\ No newline at end of file
diff --git a/src/images/index.js b/src/images/index.js
index 2fb4507..d252fe0 100644
--- a/src/images/index.js
+++ b/src/images/index.js
@@ -1,4 +1,3 @@
export { default as car } from './car.jpeg';
export { default as newsMock } from './newsMock.png';
-export { default as projectMock } from './projectMock.png';
export { default as scb } from './scb.svg';
\ No newline at end of file
diff --git a/src/images/projects/3t.jpeg b/src/images/projects/3t.jpeg
new file mode 100644
index 0000000..bbb91b9
Binary files /dev/null and b/src/images/projects/3t.jpeg differ
diff --git a/src/images/projects/comBattle.jpeg b/src/images/projects/comBattle.jpeg
new file mode 100644
index 0000000..fe76d39
Binary files /dev/null and b/src/images/projects/comBattle.jpeg differ
diff --git a/src/images/projects/droneMock.jpeg b/src/images/projects/droneMock.jpeg
new file mode 100644
index 0000000..3d70b0c
Binary files /dev/null and b/src/images/projects/droneMock.jpeg differ
diff --git a/src/images/projects/index.js b/src/images/projects/index.js
new file mode 100644
index 0000000..5bb4721
--- /dev/null
+++ b/src/images/projects/index.js
@@ -0,0 +1,4 @@
+export { default as drone } from './droneMock.jpeg';
+export { default as project } from './projectMock.png';
+export { default as ttt } from './3t.jpeg';
+export { default as comBattle } from './comBattle.jpeg';
\ No newline at end of file
diff --git a/src/images/projectMock.png b/src/images/projects/projectMock.png
similarity index 100%
rename from src/images/projectMock.png
rename to src/images/projects/projectMock.png
diff --git a/src/pages/Main/components/Projects/Projects.jsx b/src/pages/Main/components/Projects/Projects.jsx
index 532e58e..cf7682f 100755
--- a/src/pages/Main/components/Projects/Projects.jsx
+++ b/src/pages/Main/components/Projects/Projects.jsx
@@ -1,23 +1,28 @@
import BlockHeading from '../BlockHeading';
import ProjectCard from './ProjectCard';
import './Projects.styles.scss';
-import { projectMock } from '../../../../images';
+import {
+ project,
+ drone,
+ ttt,
+ comBattle
+} from '../../../../images/projects';
const mock = [
{
- image: projectMock,
+ image: drone,
link: "/projects",
},
{
- image: projectMock,
+ image: ttt,
link: "/projects",
},
{
- image: projectMock,
+ image: comBattle,
link: "/projects",
},
{
- image: projectMock,
+ image: project,
link: "/projects",
},
];
@@ -25,9 +30,9 @@ const mock = [
function Projects({ projects = mock }) {
return (
-
+
- { mock.map(item =>
) }
+ {mock.map(item =>
)}
);