diff --git a/src/app/Layout/Root.styles.scss b/src/app/Layout/Root.styles.scss index b9bfa63..dd32127 100644 --- a/src/app/Layout/Root.styles.scss +++ b/src/app/Layout/Root.styles.scss @@ -58,6 +58,10 @@ flex: 1; margin-top: calc($navbar-height + 5 * $navbar-padding-tb); + @media (max-width: 768px) { + margin-top: calc($navbar-height + 2 * $navbar-padding-tb); + } + .header, .content { margin-left: 10%; @@ -151,6 +155,7 @@ opacity: 0; transform: scale(0); } + 100% { opacity: 1; transform: scale(1); @@ -162,8 +167,9 @@ opacity: 1; transform: scale(1); } + 100% { opacity: 0; transform: scale(0); } -} +} \ No newline at end of file diff --git a/src/pages/Contact/Contact.styles.scss b/src/pages/Contact/Contact.styles.scss index 1634789..d0c2a76 100644 --- a/src/pages/Contact/Contact.styles.scss +++ b/src/pages/Contact/Contact.styles.scss @@ -15,6 +15,10 @@ h1 { margin-top: 0; + font-size: 36px; + @media (max-width: 768px) { + font-size: 24px; + } } div:has(> ymaps) { diff --git a/src/pages/Contact/Contact.tsx b/src/pages/Contact/Contact.tsx index ccba046..66bb1c0 100644 --- a/src/pages/Contact/Contact.tsx +++ b/src/pages/Contact/Contact.tsx @@ -32,7 +32,7 @@ function Contact() {
Email: skb@sfedu.ru
- Адрес: г. Таганрог, пер. Тургеневский, 44, ауд. 208 + Адрес: г. Таганрог, пер. Тургеневский, 44

diff --git a/src/pages/CustomProjects/LabBoard/LabBoard.module.scss b/src/pages/CustomProjects/LabBoard/LabBoard.module.scss index 472b72c..f193614 100644 --- a/src/pages/CustomProjects/LabBoard/LabBoard.module.scss +++ b/src/pages/CustomProjects/LabBoard/LabBoard.module.scss @@ -51,7 +51,7 @@ line-height: 36px; @media (max-width: 768px) { - font-size: 24px; + font-size: 20px; line-height: 28px; } } @@ -546,4 +546,5 @@ width: 72px; height: 48px; } -} \ No newline at end of file +} + diff --git a/src/pages/CustomProjects/LabBoard/LabBoard.tsx b/src/pages/CustomProjects/LabBoard/LabBoard.tsx index ec8c16f..2e717ef 100644 --- a/src/pages/CustomProjects/LabBoard/LabBoard.tsx +++ b/src/pages/CustomProjects/LabBoard/LabBoard.tsx @@ -230,7 +230,7 @@ function LabBoard() { -
+
@@ -243,6 +243,7 @@ function LabBoard() { preventScrollOnSwipe: true, trackMouse: true, })} + ref={sliderRef} >
* { + >* { display: inline-block; width: fit-content; } @@ -29,3 +29,30 @@ } } } + +#news-item-page { + .single-image-container { + height: 600px; + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 20px; + + img { + max-height: 100%; + width: auto; + max-width: 100%; + object-fit: contain; + pointer-events: none; + } + + @media (max-width: 768px) { + height: auto; + img { + width: 100%; + height: auto; + object-fit: contain; + } + } + } +} diff --git a/src/pages/NewsItem/NewsItem.tsx b/src/pages/NewsItem/NewsItem.tsx index 674fe96..544dbf9 100644 --- a/src/pages/NewsItem/NewsItem.tsx +++ b/src/pages/NewsItem/NewsItem.tsx @@ -10,6 +10,18 @@ import { useNewsById } from "@/modules/news/hooks/useNewsById"; import { PageContent, PageHeader } from "@/widgets/WpPost"; import Slider from "@/widgets/Slider/Slider"; export const vkWallUrl = "https://vk.com/skbkit?w=wall-172789021"; +import { useEffect } from "react"; +import { useLocation } from "react-router-dom"; + +export const ScrollToTop = () => { + const { pathname } = useLocation(); + + useEffect(() => { + window.scrollTo({ top: 0, left: 0, behavior: "instant" }); + }, [pathname]); + + return null; +}; function NewsItem() { const params = useParams(); @@ -28,6 +40,7 @@ function NewsItem() { if (isLoading) return (
+ {[...Array(1)].map((_, index) => ( ))} @@ -38,8 +51,8 @@ function NewsItem() { <> - Ошибка загрузки новости | СКБ "Компьютерное инновационное - творчество" + Ошибка загрузки новости | СКБ «Компьютерное инновационное + творчество» @@ -55,8 +68,8 @@ function NewsItem() { <> - {news.heading || "Новость"} | СКБ "Компьютерное инновационное - творчество" + {news.heading || "Новость"} | СКБ «Компьютерное инновационное + творчество» @@ -77,7 +89,15 @@ function NewsItem() {

{news.heading}

- {news.photos.length !== 0 && } + {news.photos.length !== 0 && + (news.photos.length === 1 ? ( +
+ {news.heading} +
+ ) : ( + + )) + } {news.text.map((textRow, index) => (

))} diff --git a/src/shared/Components/Card/Card.module.scss b/src/shared/Components/Card/Card.module.scss index 4ca4b33..9a6bd99 100644 --- a/src/shared/Components/Card/Card.module.scss +++ b/src/shared/Components/Card/Card.module.scss @@ -48,27 +48,29 @@ overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease; } - + .link { opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; } - + &:hover { .description { max-height: 200px; opacity: 1; margin-top: 10px; } - + .link { opacity: 1; transform: translateY(0); } + .image { filter: brightness(0.7); } + .content { bottom: 20px; } @@ -218,3 +220,15 @@ font-size: 18px; } } + +.placeholder { + position: absolute; + width: 100%; + height: 100%; + background-color: #2A3451; + background-image: url("/src/shared/assets/images/kit.svg"); + background-repeat: no-repeat; + background-position: center center; + background-size: 70%; + z-index: 0; +} \ No newline at end of file diff --git a/src/shared/Components/Card/Card.tsx b/src/shared/Components/Card/Card.tsx index 1b74db8..9d10af8 100644 --- a/src/shared/Components/Card/Card.tsx +++ b/src/shared/Components/Card/Card.tsx @@ -16,7 +16,11 @@ export const Card = ({ data }: CardProps) => { className={classNames(styles.card, {}, [styles[`card__${variant}`]])} to={link || `/${id || name}`} > - {name} + {preview ? ( + {name} + ) : ( +

+ )}

{name}

@@ -35,4 +39,4 @@ export const Card = ({ data }: CardProps) => {
); -}; +}; \ No newline at end of file diff --git a/src/shared/Components/SkeletonGallery/SkeletonGallery.module.scss b/src/shared/Components/SkeletonGallery/SkeletonGallery.module.scss index 90d1d2b..8b0c1c8 100644 --- a/src/shared/Components/SkeletonGallery/SkeletonGallery.module.scss +++ b/src/shared/Components/SkeletonGallery/SkeletonGallery.module.scss @@ -3,7 +3,6 @@ margin: 0 10%; text-align: left; display: block; - @media (max-width: $mobile-xs-width) { margin: 0 5%; } @@ -15,6 +14,7 @@ background-color: #e0e0e0; border-radius: 4px; margin-bottom: 16px; + margin-top: 20px; position: relative; overflow: hidden; diff --git a/src/shared/Components/SkeletonSlider/SkeletonSlider.tsx b/src/shared/Components/SkeletonSlider/SkeletonSlider.tsx index ed291ed..79bf32a 100644 --- a/src/shared/Components/SkeletonSlider/SkeletonSlider.tsx +++ b/src/shared/Components/SkeletonSlider/SkeletonSlider.tsx @@ -1,10 +1,12 @@ import styles from "./SkeletonSlider.module.scss"; export const SkeletonSlider = () => { + const skeletonCount = window.innerWidth > 768 ? 2 : 1; + return (
- {[...Array(2)].map((_, index) => ( + {[...Array(skeletonCount)].map((_, index) => (
diff --git a/src/shared/assets/images/footer/iconIctis.png b/src/shared/assets/images/footer/iconIctis.png index 8f010f9..d198517 100644 Binary files a/src/shared/assets/images/footer/iconIctis.png and b/src/shared/assets/images/footer/iconIctis.png differ diff --git a/src/shared/assets/images/footer/iconSfedu.png b/src/shared/assets/images/footer/iconSfedu.png index c477ec6..aec8dd8 100644 Binary files a/src/shared/assets/images/footer/iconSfedu.png and b/src/shared/assets/images/footer/iconSfedu.png differ diff --git a/src/shared/assets/images/footer/iconVK.png b/src/shared/assets/images/footer/iconVK.png new file mode 100644 index 0000000..b6381b4 Binary files /dev/null and b/src/shared/assets/images/footer/iconVK.png differ diff --git a/src/shared/assets/images/footer/iconVK.svg b/src/shared/assets/images/footer/iconVK.svg deleted file mode 100644 index 6e4162c..0000000 --- a/src/shared/assets/images/footer/iconVK.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/shared/assets/images/footer/index.js b/src/shared/assets/images/footer/index.js index e70926c..8fe296c 100644 --- a/src/shared/assets/images/footer/index.js +++ b/src/shared/assets/images/footer/index.js @@ -1,3 +1,3 @@ export { default as iconIctis } from './iconIctis.png'; export { default as iconSfedu } from './iconSfedu.png'; -export { default as iconVK } from './iconVK.svg'; \ No newline at end of file +export { default as iconVK } from './iconVK.png'; \ No newline at end of file diff --git a/src/shared/assets/images/kit.svg b/src/shared/assets/images/kit.svg new file mode 100644 index 0000000..5c1b822 --- /dev/null +++ b/src/shared/assets/images/kit.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/shared/assets/images/numbers/Illustration2.gif b/src/shared/assets/images/numbers/Illustration2.gif new file mode 100644 index 0000000..3f9f4ff Binary files /dev/null and b/src/shared/assets/images/numbers/Illustration2.gif differ diff --git a/src/shared/assets/images/numbers/index.ts b/src/shared/assets/images/numbers/index.ts index 87d9df3..51db61a 100644 --- a/src/shared/assets/images/numbers/index.ts +++ b/src/shared/assets/images/numbers/index.ts @@ -1 +1,2 @@ -export { default as Illustration } from './Illustration.svg'; \ No newline at end of file +export { default as Illustration } from './Illustration.svg'; +export { default as Illustration2 } from './Illustration2.gif'; \ No newline at end of file diff --git a/src/widgets/CardList/CardList.tsx b/src/widgets/CardList/CardList.tsx index 20e0726..199556c 100644 --- a/src/widgets/CardList/CardList.tsx +++ b/src/widgets/CardList/CardList.tsx @@ -11,16 +11,6 @@ import { } from "@/widgets/CardList/CardListFunctions"; import { usePostProjects } from "@/modules/posts/hooks/usePostProjects"; import { Link } from "react-router-dom"; -import { useEffect } from "react"; - -// Компонент для прокрутки вверх при переходе -const ScrollToTopOnMount = () => { - useEffect(() => { - window.scrollTo(0, 0); - }, []); - - return null; -}; interface ListProps { gridConfig?: GridConfig; @@ -34,7 +24,6 @@ const NewsList = ({ return ( <> - window.scrollTo(0, 0)}> + Новости } @@ -68,7 +57,6 @@ const LabsList = ({ return ( <> - window.scrollTo(0, 0)}> + Наши лаборатории } @@ -100,7 +88,6 @@ const ProjectsList = ({ return ( <> - window.scrollTo(0, 0)}> + Наши проекты } diff --git a/src/widgets/Footer/Footer.styles.scss b/src/widgets/Footer/Footer.styles.scss index 8059fed..d6708ae 100644 --- a/src/widgets/Footer/Footer.styles.scss +++ b/src/widgets/Footer/Footer.styles.scss @@ -25,6 +25,10 @@ align-items: flex-start; height: 100%; + @media (max-width: 768px) { + padding-bottom: 20px; + } + .logo { height: auto; width: 256px; @@ -53,6 +57,11 @@ display: flex; gap: 17px; + @media (max-width: 768px) { + padding-top: 20px; + padding-bottom: 20px; + } + .link { display: flex; justify-content: center; @@ -137,13 +146,14 @@ .contacts { text-align: center; - gap: 0.5em; + gap: 0.8em; width: 100%; padding: 10px 0; p { font-size: 16px; } + } .links { @@ -175,18 +185,21 @@ /* Spread out the items */ height: 100%; /* Make sure the container takes up full height */ + @media (max-width: 768px) { + padding-bottom: 20px; + } } .footer-links { display: flex; justify-content: space-between; gap: 30px; - + .footer-column { display: flex; flex-direction: column; gap: 20px; - + a { color: white; text-decoration: none; @@ -194,7 +207,7 @@ position: relative; display: inline-block; width: fit-content; - + &::after { content: ''; position: absolute; @@ -206,7 +219,7 @@ transition: width 0.3s ease, left 0.3s ease; transform: translateX(-50%); } - + &:hover::after { width: 100%; left: 50%; diff --git a/src/widgets/Footer/Footer.tsx b/src/widgets/Footer/Footer.tsx index 3628f74..d55a834 100644 --- a/src/widgets/Footer/Footer.tsx +++ b/src/widgets/Footer/Footer.tsx @@ -6,7 +6,7 @@ import FooterContacts from "./FooterContacts"; import logo from "@/shared/assets/images/scb.svg"; import iconIctis from "@/shared/assets/images/footer/iconIctis.png"; import iconSfedu from "@/shared/assets/images/footer/iconSfedu.png"; -import iconVK from "@/shared/assets/images/footer/iconVK.svg"; +import iconVK from "@/shared/assets/images/footer/iconVK.png"; import "./Footer.styles.scss"; interface LinkType { @@ -82,7 +82,7 @@ function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) {
logo
- +
@@ -109,7 +109,7 @@ function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) { Политика конфиденциальности
- ©СКБ «КИТ» 2015–2025 + ©СКБ «КИТ» 2015 – 2025
); diff --git a/src/widgets/Navbar/Navbar.styles.scss b/src/widgets/Navbar/Navbar.styles.scss index 5b917de..abc5da5 100644 --- a/src/widgets/Navbar/Navbar.styles.scss +++ b/src/widgets/Navbar/Navbar.styles.scss @@ -90,29 +90,41 @@ } .bar { - display: none; + display: flex; flex-direction: column; position: fixed; top: 0; - right: 0; + right: -100%; background-color: white; - width: 50%; - height: 200vh; + width: 100%; + height: 100vh; z-index: 9; - padding: 60px 0px; + padding: 100px 30px 30px; + transition: transform 0.3s ease-in-out; + overflow-y: auto; &.open { - display: flex; + transform: translateX(-100%); } .nav-link { - padding: 10px 5px; + margin-left: 0; + padding: 15px 0; width: 100%; text-align: left; - } + font-size: 16px*1.2; + font-weight: 600; + color: black; + transition: color 0.3s ease; - .nav-link::after { - background: none; + &::after { + display: none; + } + + &:hover, + &:focus { + color: #072ac8; + } } } @@ -121,20 +133,96 @@ display: flex; flex-direction: column; z-index: 10; + cursor: pointer; .line { - width: 25px; + width: 30px; height: 3px; background-color: #072ac8; margin: 4px 0; transition: all 0.3s ease; + + &:nth-child(1).open { + transform: rotate(45deg) translate(5px, 5px); + } + + &:nth-child(2).open { + opacity: 0; + } + + &:nth-child(3).open { + transform: rotate(-45deg) translate(10px, -10px); + } } } + } +} +.overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 8; + opacity: 0; + visibility: hidden; + transition: opacity 0.3s ease, visibility 0.3s ease; + + &.open { + opacity: 1; + visibility: visible; } } #navbar.transparent .bar .nav-link::after { background-color: $text-secondary; +} +.mobile-contacts { + display: none; + + @media (max-width: 1200px) { + display: flex; + flex-direction: column; + margin-top: auto; + text-align: left; + font-weight: 600; + color: black; + align-self: flex-start; + width: 100%; + + a { + display: block; + margin: 4px 0; + } + + .btn { + display: block; + width: 100%; + padding: 16px 24px; + margin: 20px auto 0; + border-radius: 8px; + border: none; + font-size: 20px; + font-weight: 600; + line-height: 24px; + color: white; + background: linear-gradient(93.25deg, #4942e4 0%, #11009e 50%, #4942e4 100%); + background-size: 200%; + background-position: 0%; + transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease; + cursor: pointer; + text-align: center; + text-decoration: none; + + &:hover { + background-position: 100%; + box-shadow: 0 8px 20px rgba(17, 0, 158, 0.25); + color: #ffffff; + } + } + + } } \ No newline at end of file diff --git a/src/widgets/Navbar/Navbar.tsx b/src/widgets/Navbar/Navbar.tsx index bc74791..1a0023d 100644 --- a/src/widgets/Navbar/Navbar.tsx +++ b/src/widgets/Navbar/Navbar.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from "react"; import NavbarLink from "./NavbarLink"; import { useLocation } from "react-router-dom"; - +import { HashLink } from "react-router-hash-link"; import logo from "@/shared/assets/images/sсb_blue.svg"; import "./Navbar.styles.scss"; @@ -46,6 +46,28 @@ const mock: LinkType[] = [ }, ]; +interface ContactsType { + email: JSX.Element; + phone: JSX.Element; +} + +const mockContacts: ContactsType = { + email: ( + + skb@sfedu.ru + + ), + phone: ( + + +7 (978) 009-54-80 + + ), +}; + function Navbar({ links = mock }: NavbarProps) { const [isOpen, setIsOpen] = useState(false); const [navbarHidden, setNavbarHidden] = useState(false); @@ -68,7 +90,7 @@ function Navbar({ links = mock }: NavbarProps) { setIsOpen(false); setNavbarHidden(false); setLastScrollTop(0); - + // Проверяем, нужно ли делать navbar прозрачным const shouldBeTransparent = location.pathname === "/" && window.pageYOffset <= 50; setIsTransparent(shouldBeTransparent); @@ -107,29 +129,39 @@ function Navbar({ links = mock }: NavbarProps) { return ( - - Illustration +
setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + > + СКБ КИТ +
); diff --git a/src/widgets/Partners/Partners.tsx b/src/widgets/Partners/Partners.tsx index 126dcbc..59abc9f 100644 --- a/src/widgets/Partners/Partners.tsx +++ b/src/widgets/Partners/Partners.tsx @@ -1,8 +1,8 @@ import Marquee from "react-fast-marquee"; - import { useMedia } from "@/modules/media/hooks/useMedia"; import PartnersLogo from "./PartnersLogo"; import styles from "./Partners.module.scss"; +import { useEffect, useState } from "react"; interface Partner { src: string; @@ -13,21 +13,28 @@ interface Partner { function Partners() { const { data: mediaData, isLoading, isError } = useMedia(); + const [isMobile, setIsMobile] = useState(false); + + useEffect(() => { + const handleResize = () => { + setIsMobile(window.innerWidth <= 768); + }; + + // Проверяем сразу при загрузке + handleResize(); + + // Добавляем слушатель изменения размера окна + window.addEventListener('resize', handleResize); + + // Убираем слушатель при размонтировании компонента + return () => window.removeEventListener('resize', handleResize); + }, []); - // Отфильтрованные партнёрские медиа const mediaList: Partner[] = mediaData?.filter((item: Partner) => item.category === "partners") || []; - if (isLoading) { - return
Загрузка партнеров...
; - } - - if (isError || mediaList.length === 0) { - return
Не удалось загрузить партнеров
; - } - // Определяем, нужно ли включать автопрокрутку - const shouldAutoScroll = mediaList.length > 5; + const shouldAutoScroll = isMobile ? mediaList.length > 1 : mediaList.length > 5; if (isLoading) { return
Загрузка партнеров...
; @@ -44,20 +51,20 @@ function Partners() {
{shouldAutoScroll ? ( - - {mediaList.map((item, index) => ( -
- -
- ))} -
+ + {mediaList.map((item, index) => ( +
+ +
+ ))} +
) : (
{mediaList.map((item, index) => ( @@ -65,11 +72,11 @@ function Partners() {
))} -
+
)}
); } -export default Partners; +export default Partners; \ No newline at end of file diff --git a/src/widgets/PhotoGallery/PhotoGallery.style.scss b/src/widgets/PhotoGallery/PhotoGallery.style.scss index d5026cd..5467d25 100644 --- a/src/widgets/PhotoGallery/PhotoGallery.style.scss +++ b/src/widgets/PhotoGallery/PhotoGallery.style.scss @@ -16,7 +16,8 @@ margin-bottom: 16px; @include mediaMax($tablet-max-width) { - font-size: 24px; + margin-top: 20px; + font-size: 24px; } } @@ -95,7 +96,6 @@ $tablet-min-width: 768px; display: flex; flex-wrap: wrap; gap: 32px; - margin-bottom: 64px; .creativity-text-top { width: calc(50% - 16px); diff --git a/src/widgets/PhotoGallery/PhotoGallery.tsx b/src/widgets/PhotoGallery/PhotoGallery.tsx index 8db1143..fe9e520 100644 --- a/src/widgets/PhotoGallery/PhotoGallery.tsx +++ b/src/widgets/PhotoGallery/PhotoGallery.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useState, useEffect, useRef, useCallback } from "react"; import { useMedia } from "@/modules/media/hooks/useMedia"; import { SkeletonGallery } from "@/shared/Components/SkeletonGallery/SkeletonGallery"; import "./PhotoGallery.style.scss"; @@ -8,9 +8,38 @@ import HWaC2 from "@/shared/assets/images/hard_work_and_creativity/HWaC2.jpg"; const PhotoGallery = () => { const { data: mediaData, isLoading, isError } = useMedia(); const [visibleCount, setVisibleCount] = useState(10); + const [isLoadingMore, setIsLoadingMore] = useState(false); + const containerRef = useRef(null); + const isMobile = window.innerWidth <= 768; const galleryImages = mediaData?.filter((el) => el.category === "photogallery"); + const loadMore = useCallback(() => { + if (isLoadingMore || !galleryImages || visibleCount >= galleryImages.length) return; + + setIsLoadingMore(true); + setTimeout(() => { + setVisibleCount(prev => prev + 10); + setIsLoadingMore(false); + }, 800); + }, [galleryImages, isLoadingMore, visibleCount]); + + useEffect(() => { + const handleScroll = () => { + if (!containerRef.current) return; + + const { scrollTop, scrollHeight, clientHeight } = document.documentElement; + const threshold = isMobile ? 0.98 : 1; // 50% на мобиле, 98% на десктопе + + if (scrollTop + clientHeight >= scrollHeight * threshold) { + loadMore(); + } + }; + + window.addEventListener('scroll', handleScroll); + return () => window.removeEventListener('scroll', handleScroll); + }, [loadMore, isMobile]); + if (isLoading) { return ; } @@ -20,7 +49,7 @@ const PhotoGallery = () => { } return ( -
+

Трудолюбие и креативность

@@ -55,12 +84,15 @@ const PhotoGallery = () => {
{visibleCount < galleryImages.length && ( -
setVisibleCount(visibleCount + 10)}> - Загрузить ещё +
+ {isLoadingMore ? 'Загрузка...' : 'Загрузить ещё'}
)}
); }; -export default PhotoGallery; +export default PhotoGallery; \ No newline at end of file diff --git a/src/widgets/Slider/Slider.styles.scss b/src/widgets/Slider/Slider.styles.scss index c4c875d..ac64a25 100644 --- a/src/widgets/Slider/Slider.styles.scss +++ b/src/widgets/Slider/Slider.styles.scss @@ -23,13 +23,36 @@ transform: translateZ(0); backface-visibility: hidden; perspective: 1000px; + + .slide-container { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; + border-radius: 8px; + pointer-events: none; + } + + .slide-background { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-size: cover; + background-position: center; + filter: blur(10px); + transform: scale(1.05); + z-index: 1; + } .slide-image { + position: relative; width: 100%; height: 350px; - object-fit: cover; + object-fit: contain; object-position: center; - border-radius: 8px; + z-index: 2; pointer-events: none; transform: translateZ(0); backface-visibility: hidden; @@ -124,6 +147,10 @@ min-height: 300px; transform-origin: center center; + .slide-container { + height: 500px; + } + .slide-image { height: 500px; transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); @@ -135,6 +162,10 @@ height: 48vh; min-height: 250px; + .slide-container { + height: 350px; + } + .slide-image { height: 350px; } diff --git a/src/widgets/Slider/Slider.tsx b/src/widgets/Slider/Slider.tsx index f1a8ed7..d6097de 100644 --- a/src/widgets/Slider/Slider.tsx +++ b/src/widgets/Slider/Slider.tsx @@ -125,7 +125,7 @@ const Slider = ({ : false } onSwiper={(swiper) => (swiperRef.current = swiper)} - onSlideChange={(swiper) => setSlideNumber(swiper.realIndex)} // Обновляем slideNumber при смене слайда + onSlideChange={(swiper) => setSlideNumber(swiper.realIndex)} > {mediaList.map((media, index) => ( - {`slide-${index}`} +
+
+ {`slide-${index}`} +
))} @@ -148,4 +154,4 @@ const Slider = ({ ); }; -export default Slider; +export default Slider; \ No newline at end of file diff --git a/src/widgets/Team/Team.tsx b/src/widgets/Team/Team.tsx index 3e879d2..45168e5 100644 --- a/src/widgets/Team/Team.tsx +++ b/src/widgets/Team/Team.tsx @@ -31,10 +31,6 @@ const Team = () => {
Хочу в команду
-

- -

-

diff --git a/src/widgets/WpPost/Projects.scss b/src/widgets/WpPost/Projects.scss index 260e184..e0ede72 100644 --- a/src/widgets/WpPost/Projects.scss +++ b/src/widgets/WpPost/Projects.scss @@ -31,6 +31,39 @@ $swiper-button-arrow-size: 20px; margin-bottom: 2em; } + .wp-block-video, + .wp-block-embed { + width: 100%; + max-width: 100%; + margin: 1em 0; + + video, + iframe { + width: 100%; + height: auto; + aspect-ratio: 16 / 9; // Стандартное соотношение сторон для видео + border-radius: $border-raduis; + background: $background-tape; + } + } + + // Для случаев, когда нужно фиксированное соотношение сторон + .fixed-aspect-video { + position: relative; + padding-bottom: 56.25%; /* 16:9 соотношение */ + height: 0; + overflow: hidden; + + iframe, + video { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + } + .is-layout-flex { display: flex; justify-content: space-between; @@ -41,6 +74,7 @@ $swiper-button-arrow-size: 20px; max-width: 100%; height: auto; object-fit: contain !important; // Wordpress накидывает styles к элементу, приходится перебивать + pointer-events: none; } } @@ -207,7 +241,7 @@ $swiper-button-arrow-size: 20px; } } -@media (max-width: 768px) { +@media (max-width: 1200px) { .project .is-layout-flex { flex-direction: column !important; align-items: stretch !important;