diff --git a/package-lock.json b/package-lock.json index f085a063..63a9e4ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28906,7 +28906,11 @@ "dependencies": { "deepmerge": { "version": "2.2.1", +<<<<<<< HEAD + "resolved": "http://npm.prakticum-team.ru/deepmerge/-/deepmerge-2.2.1.tgz", +======= "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", +>>>>>>> master "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==" } } diff --git a/src/assets/icons/IconCompare.tsx b/src/assets/icons/IconCompare.svg similarity index 81% rename from src/assets/icons/IconCompare.tsx rename to src/assets/icons/IconCompare.svg index 5b64e88a..1de6054c 100644 --- a/src/assets/icons/IconCompare.tsx +++ b/src/assets/icons/IconCompare.svg @@ -1,19 +1,5 @@ -import { FC, useMemo } from 'react' -import type { TProps } from '../../models/SvgModel' -/** - * @param {Array | string} styles - стилизация иконки - * - * @return {svg} - svg изображение - */ -const IconCompare: FC = props => { - const { styles } = props - const style = useMemo(() => { - return Array.isArray(styles) ? styles.join(' ') : styles - }, [styles]) - - return ( - + = props => { - ) -} - -export default IconCompare diff --git a/src/assets/images/articleBlock/arrow.svg b/src/assets/images/articleBlock/arrow.svg new file mode 100644 index 00000000..97c8f83c --- /dev/null +++ b/src/assets/images/articleBlock/arrow.svg @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/src/assets/images/blogMainItem/img-article-02-1500x1000.webp b/src/assets/images/blogMainItem/img-article-02-1500x1000.webp new file mode 100644 index 00000000..f82921d7 Binary files /dev/null and b/src/assets/images/blogMainItem/img-article-02-1500x1000.webp differ diff --git a/src/assets/images/blogPage/img-blog-05.svg b/src/assets/images/blogPage/img-blog-05.svg deleted file mode 100644 index cac6940b..00000000 --- a/src/assets/images/blogPage/img-blog-05.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/blogPage/img-blog-05.webp b/src/assets/images/blogPage/img-blog-05.webp new file mode 100644 index 00000000..eeb2a11b Binary files /dev/null and b/src/assets/images/blogPage/img-blog-05.webp differ diff --git a/src/assets/images/blogPage/img-blog-06.svg b/src/assets/images/blogPage/img-blog-06.svg deleted file mode 100644 index 2441d6ef..00000000 --- a/src/assets/images/blogPage/img-blog-06.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/blogPage/img-blog-06.webp b/src/assets/images/blogPage/img-blog-06.webp new file mode 100644 index 00000000..fbac65e1 Binary files /dev/null and b/src/assets/images/blogPage/img-blog-06.webp differ diff --git a/src/assets/images/blogPage/img-blog-07.svg b/src/assets/images/blogPage/img-blog-07.svg deleted file mode 100644 index 2ea173f7..00000000 --- a/src/assets/images/blogPage/img-blog-07.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/blogPage/img-blog-07.webp b/src/assets/images/blogPage/img-blog-07.webp new file mode 100644 index 00000000..e618f505 Binary files /dev/null and b/src/assets/images/blogPage/img-blog-07.webp differ diff --git a/src/assets/images/blogPage/img-blog-08.svg b/src/assets/images/blogPage/img-blog-08.svg deleted file mode 100644 index a9de4c15..00000000 --- a/src/assets/images/blogPage/img-blog-08.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/blogPage/img-blog-08.webp b/src/assets/images/blogPage/img-blog-08.webp new file mode 100644 index 00000000..bf051407 Binary files /dev/null and b/src/assets/images/blogPage/img-blog-08.webp differ diff --git a/src/assets/images/blogPage/img-blog-09.svg b/src/assets/images/blogPage/img-blog-09.svg deleted file mode 100644 index 576a8f26..00000000 --- a/src/assets/images/blogPage/img-blog-09.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/blogPage/img-blog-09.webp b/src/assets/images/blogPage/img-blog-09.webp new file mode 100644 index 00000000..1521f4bd Binary files /dev/null and b/src/assets/images/blogPage/img-blog-09.webp differ diff --git a/src/assets/images/blogPage/img-blog-10.svg b/src/assets/images/blogPage/img-blog-10.svg deleted file mode 100644 index f1fcf6d0..00000000 --- a/src/assets/images/blogPage/img-blog-10.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/assets/images/blogPage/img-blog-10.webp b/src/assets/images/blogPage/img-blog-10.webp new file mode 100644 index 00000000..29438fba Binary files /dev/null and b/src/assets/images/blogPage/img-blog-10.webp differ diff --git a/src/assets/images/header/all-categories.svg b/src/assets/images/header/all-categories.svg new file mode 100644 index 00000000..85776f18 --- /dev/null +++ b/src/assets/images/header/all-categories.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + diff --git a/src/components/ArticleBlock/ArticleBlock.tsx b/src/components/ArticleBlock/ArticleBlock.tsx index 8a13d7fc..515f0c5b 100644 --- a/src/components/ArticleBlock/ArticleBlock.tsx +++ b/src/components/ArticleBlock/ArticleBlock.tsx @@ -1,4 +1,5 @@ import description from '@/assets/images/articleBlock/description.png' +import Arrow from '@/assets/images/articleBlock/arrow.svg' import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' import Paragraph from '@/shared/ui/Paragraph/Paragraph' import ArrowReadNext from '@/assets/icons/ArrowReadNext.svg' @@ -19,7 +20,6 @@ function ArticleBlock() { Необходимость определять схожесть двух фраз возникла при решении одной небольшой практической -

Читать дальше

diff --git a/src/components/BlogMain/BlogMain.tsx b/src/components/BlogMain/BlogMain.tsx index 2dcd9005..76f8bfc4 100644 --- a/src/components/BlogMain/BlogMain.tsx +++ b/src/components/BlogMain/BlogMain.tsx @@ -15,7 +15,7 @@ const BlogMain: FC = props => { const [items, setItems] = useState(cards) const [itemNumber, setItemNumber] = useState(9) const [currentPage, setCurrentPage] = useState(1) - const TOTAL_PAGES: number = Math.round(items.length / itemNumber) + const TOTAL_PAGES: number = Math.ceil(items.length / itemNumber) const filterCategories = (curcat?: string) => { const newItems = cards.filter(newVal => { return newVal.category === curcat @@ -57,7 +57,7 @@ const BlogMain: FC = props => {
    - {items.slice(0, itemNumber).map(item => ( + {items.slice(currentPage == 1 ? 0 : itemNumber * (currentPage - 1), itemNumber * currentPage).map(item => ( ))}
diff --git a/src/components/BlogMainItem/BlogMainItem.tsx b/src/components/BlogMainItem/BlogMainItem.tsx index d5676411..4efddf6b 100644 --- a/src/components/BlogMainItem/BlogMainItem.tsx +++ b/src/components/BlogMainItem/BlogMainItem.tsx @@ -1,5 +1,6 @@ -import { useEffect, useMemo } from 'react' +import styles from './blog-main-item.module.scss' import { blogMainItemData } from '@/mockData/blogMainItemData' +import { useEffect, useMemo } from 'react' import ViewIcon from '@/assets/images/blogMainItem/icon-views.svg' import CommentIcon from '@/assets/images/blogMainItem/icon-comments.svg' import DotIcon from '@/assets/images/blogMainItem/icon-dot.svg' diff --git a/src/components/CardPreviewHeader/CardPreviewHeader.tsx b/src/components/CardPreviewHeader/CardPreviewHeader.tsx index 45b2da94..88e9ead7 100644 --- a/src/components/CardPreviewHeader/CardPreviewHeader.tsx +++ b/src/components/CardPreviewHeader/CardPreviewHeader.tsx @@ -1,6 +1,6 @@ import { FC } from 'react' import classnames from 'classnames' -import IconCompare from '@/assets/icons/IconCompare' +import IconCompare from '@/assets/icons/IconCompare.svg' import IconLike from '@/assets/icons/IconLike' import styles from './CardPreviewHeader.module.scss' import { Button, ButtonSize } from '@/shared/ui/Button/Button' @@ -39,7 +39,7 @@ export const CardPreviewHeader: FC = ({