diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 68eea6a..c06d6f9 100755 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -25,7 +25,7 @@ function Navbar() { КОНТАКТЫ - + ИКТИБ diff --git a/src/images/index.js b/src/images/index.js index cd3a51b..2fb4507 100644 --- a/src/images/index.js +++ b/src/images/index.js @@ -1,2 +1,4 @@ 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/newsMock.png b/src/images/newsMock.png new file mode 100644 index 0000000..3ebf58a Binary files /dev/null and b/src/images/newsMock.png differ diff --git a/src/images/projectMock.png b/src/images/projectMock.png new file mode 100644 index 0000000..769cad3 Binary files /dev/null and b/src/images/projectMock.png differ diff --git a/src/pages/Main/components/BlockHeading/BlockHeading.jsx b/src/pages/Main/components/BlockHeading/BlockHeading.jsx new file mode 100644 index 0000000..f99ec2d --- /dev/null +++ b/src/pages/Main/components/BlockHeading/BlockHeading.jsx @@ -0,0 +1,14 @@ +import { Link } from 'react-router-dom'; + +function BlockHeading({ heading, link, linkText }) { + return ( +
+

{heading}

+ {link && linkText && + {linkText} + } +
+ ); +} + +export default BlockHeading; \ No newline at end of file diff --git a/src/pages/Main/components/BlockHeading/index.js b/src/pages/Main/components/BlockHeading/index.js new file mode 100644 index 0000000..cc9d012 --- /dev/null +++ b/src/pages/Main/components/BlockHeading/index.js @@ -0,0 +1 @@ +export { default } from './BlockHeading'; \ No newline at end of file diff --git a/src/pages/Main/components/Labs.jsx b/src/pages/Main/components/Labs/Labs.jsx similarity index 100% rename from src/pages/Main/components/Labs.jsx rename to src/pages/Main/components/Labs/Labs.jsx diff --git a/src/pages/Main/components/Labs.styles.scss b/src/pages/Main/components/Labs/Labs.styles.scss similarity index 100% rename from src/pages/Main/components/Labs.styles.scss rename to src/pages/Main/components/Labs/Labs.styles.scss diff --git a/src/pages/Main/components/Labs/index.js b/src/pages/Main/components/Labs/index.js new file mode 100644 index 0000000..af7a175 --- /dev/null +++ b/src/pages/Main/components/Labs/index.js @@ -0,0 +1 @@ +export { default } from './Labs'; \ No newline at end of file diff --git a/src/pages/Main/components/News.jsx b/src/pages/Main/components/News.jsx deleted file mode 100755 index 81a8577..0000000 --- a/src/pages/Main/components/News.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import './News.styles.scss'; - -function News() { - return ( -
-
-

Новости

- Все новости -
-
-
-
- Еще одна новость -
-
-
- Новость поменьше -
-
-
- Новость маленькая совсем жесть а текст какой длинный ого -
-
-
- ); -} - -export default News; \ No newline at end of file diff --git a/src/pages/Main/components/News/News.jsx b/src/pages/Main/components/News/News.jsx new file mode 100755 index 0000000..cde8a67 --- /dev/null +++ b/src/pages/Main/components/News/News.jsx @@ -0,0 +1,37 @@ +import BlockHeading from '../BlockHeading'; +import NewsCard from './NewsCard'; +import './News.styles.scss'; +import { newsMock } from '../../../../images'; + +const mock = [ + { + text: "Какая-то новость", + image: newsMock + }, + { + text: "Еще одна новость", + image: newsMock + }, + { + text: "Новость поменбше", + image: newsMock + }, + { + text: "Новость маленькая совсем жестб а текст какой длинный ого", + image: newsMock + }, +]; + +function News({ news = mock }) { + + return ( +
+ +
+ { news.map(item => ) } +
+
+ ); +} + +export default News; \ No newline at end of file diff --git a/src/pages/Main/components/News.styles.scss b/src/pages/Main/components/News/News.styles.scss similarity index 63% rename from src/pages/Main/components/News.styles.scss rename to src/pages/Main/components/News/News.styles.scss index 36b46a0..bf5d939 100755 --- a/src/pages/Main/components/News.styles.scss +++ b/src/pages/Main/components/News/News.styles.scss @@ -11,9 +11,14 @@ .pic { width: 100%; aspect-ratio: 1; - border-radius: 8px; margin-bottom: .5em; - background-color: #D9D9D9; + + .image { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 8px; + } } } } diff --git a/src/pages/Main/components/News/NewsCard.jsx b/src/pages/Main/components/News/NewsCard.jsx new file mode 100644 index 0000000..1533e64 --- /dev/null +++ b/src/pages/Main/components/News/NewsCard.jsx @@ -0,0 +1,12 @@ +function NewsCard({ news }) { + return ( +
+
+ news_image +
+ { news.text } +
+ ); +} + +export default NewsCard; \ No newline at end of file diff --git a/src/pages/Main/components/News/index.js b/src/pages/Main/components/News/index.js new file mode 100644 index 0000000..66189c6 --- /dev/null +++ b/src/pages/Main/components/News/index.js @@ -0,0 +1 @@ +export { default } from './News'; \ No newline at end of file diff --git a/src/pages/Main/components/Projects.jsx b/src/pages/Main/components/Projects.jsx deleted file mode 100755 index 8e0891e..0000000 --- a/src/pages/Main/components/Projects.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Link } from 'react-router-dom'; - -import './Projects.styles.scss'; - -function Projects() { - return ( -
-
-

Наши проекты

- Все проекты -
-
- -
Перейти→
-
- -
Перейти→
-
- -
Перейти→
-
- -
Перейти→
-
-
-
- ); -} - -export default Projects; \ No newline at end of file diff --git a/src/pages/Main/components/Projects/ProjectCard.jsx b/src/pages/Main/components/Projects/ProjectCard.jsx new file mode 100644 index 0000000..8fc2d9b --- /dev/null +++ b/src/pages/Main/components/Projects/ProjectCard.jsx @@ -0,0 +1,14 @@ +import { Link } from 'react-router-dom'; + +function ProjectCard({ project }) { + return ( + + project_image +
+ Перейти→ +
+ + ); +} + +export default ProjectCard; \ No newline at end of file diff --git a/src/pages/Main/components/Projects/Projects.jsx b/src/pages/Main/components/Projects/Projects.jsx new file mode 100755 index 0000000..532e58e --- /dev/null +++ b/src/pages/Main/components/Projects/Projects.jsx @@ -0,0 +1,36 @@ +import BlockHeading from '../BlockHeading'; +import ProjectCard from './ProjectCard'; +import './Projects.styles.scss'; +import { projectMock } from '../../../../images'; + +const mock = [ + { + image: projectMock, + link: "/projects", + }, + { + image: projectMock, + link: "/projects", + }, + { + image: projectMock, + link: "/projects", + }, + { + image: projectMock, + link: "/projects", + }, +]; + +function Projects({ projects = mock }) { + return ( +
+ +
+ { mock.map(item => ) } +
+
+ ); +} + +export default Projects; \ No newline at end of file diff --git a/src/pages/Main/components/Projects.styles.scss b/src/pages/Main/components/Projects/Projects.styles.scss similarity index 66% rename from src/pages/Main/components/Projects.styles.scss rename to src/pages/Main/components/Projects/Projects.styles.scss index 12b6597..a2792ff 100755 --- a/src/pages/Main/components/Projects.styles.scss +++ b/src/pages/Main/components/Projects/Projects.styles.scss @@ -12,20 +12,32 @@ } .card { + display: block; position: relative; width: calc(100%/3 - 64px); aspect-ratio: 3/2; - background-color: #D9D9D9; + + .image { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 8px; + } .link-label { position: absolute; right: 24px; bottom: 16px; + padding: 2px; + border-radius: 4px; + font-size: 20px; font-weight: 500; line-height: 24px; color: #767676; + + background-color: rgba(255, 255, 255, 0.75); } } } diff --git a/src/pages/Main/components/Projects/index.js b/src/pages/Main/components/Projects/index.js new file mode 100644 index 0000000..61f1ce0 --- /dev/null +++ b/src/pages/Main/components/Projects/index.js @@ -0,0 +1 @@ +export { default } from './Projects'; \ No newline at end of file