diff --git a/public/keepsimple_/assets/longevity/study/mobile-charts/data-chart.webp b/public/keepsimple_/assets/longevity/study/mobile-charts/data-chart.webp deleted file mode 100644 index cecefdc..0000000 Binary files a/public/keepsimple_/assets/longevity/study/mobile-charts/data-chart.webp and /dev/null differ diff --git a/public/keepsimple_/assets/longevity/study/mobile-charts/data-mobile.webp b/public/keepsimple_/assets/longevity/study/mobile-charts/data-mobile.webp new file mode 100644 index 0000000..eb978d7 Binary files /dev/null and b/public/keepsimple_/assets/longevity/study/mobile-charts/data-mobile.webp differ diff --git a/public/keepsimple_/assets/longevity/study/mobile-charts/research-task-mobile.webp b/public/keepsimple_/assets/longevity/study/mobile-charts/research-task-mobile.webp new file mode 100644 index 0000000..473a575 Binary files /dev/null and b/public/keepsimple_/assets/longevity/study/mobile-charts/research-task-mobile.webp differ diff --git a/public/keepsimple_/assets/longevity/study/mobile-charts/research-task.webp b/public/keepsimple_/assets/longevity/study/mobile-charts/research-task.webp deleted file mode 100644 index cecefdc..0000000 Binary files a/public/keepsimple_/assets/longevity/study/mobile-charts/research-task.webp and /dev/null differ diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index 2f94b4e..3b43720 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -59,6 +59,7 @@ const Navbar: FC = ({ handleToggleSidebar, handleClick }) => { logo: isDarkTheme ? : , target: '', id: 'tools', + activeMatch: '/tools/longevity-protocol', }, { name: articles, @@ -81,31 +82,38 @@ const Navbar: FC = ({ handleToggleSidebar, handleClick }) => { [styles.authorized]: !!accountData, })} > - {routes.map(({ name, path, target, logo, id }, index) => ( - { - if (target === '_blank') return; - e.preventDefault(); - if (isSmallScreen) handleToggleSidebar(); - handleClick(e, path); - }} - className={cn(styles.url, { - [styles.active]: - path === '/' - ? router.asPath === '/' - : router.asPath.startsWith(path), - [styles.uxcoreIcon]: id === 'uxcore', - [styles.companyManagementIcon]: id === 'companyManagement', - [styles.articlesIcon]: id === 'articles', - [styles.ruUrl]: locale === 'ru', - })} - > - {logo} {name} - - ))} + {routes.map(({ name, path, target, logo, id, activeMatch }, index) => { + const match = activeMatch ?? path; + + const isActive = + match === '/' + ? router.asPath === '/' + : router.asPath.startsWith(match); + + return ( + { + if (target === '_blank') return; + e.preventDefault(); + if (isSmallScreen) handleToggleSidebar(); + handleClick(e, path); + }} + className={cn(styles.url, { + [styles.active]: isActive, + [styles.uxcoreIcon]: id === 'uxcore', + [styles.companyManagementIcon]: id === 'companyManagement', + [styles.articlesIcon]: id === 'articles', + [styles.ruUrl]: locale === 'ru', + })} + > + {logo} {name} + + ); + })} + { diff --git a/src/components/longevity/LongevitySubSection/LongevitySubSection.module.scss b/src/components/longevity/LongevitySubSection/LongevitySubSection.module.scss index 44be819..3886413 100644 --- a/src/components/longevity/LongevitySubSection/LongevitySubSection.module.scss +++ b/src/components/longevity/LongevitySubSection/LongevitySubSection.module.scss @@ -58,6 +58,10 @@ } } + .habitTooltip { + animation: pulse-shadow-animation 2s infinite; + } + .dateTxt { cursor: default; @@ -187,3 +191,15 @@ justify-content: space-between; } } + +@keyframes pulse-shadow-animation { + 0% { + filter: drop-shadow(0px 0px 18px rgba(53, 35, 13, 0.2)); + } + 70% { + filter: drop-shadow(0px 0px 18px rgba(255, 0, 0, 0.8)); + } + 100% { + filter: drop-shadow(0px 0px 18px rgba(53, 35, 13, 0.2)); + } +} diff --git a/src/components/longevity/LongevitySubSection/LongevitySubSection.tsx b/src/components/longevity/LongevitySubSection/LongevitySubSection.tsx index 914c253..e1a0a45 100644 --- a/src/components/longevity/LongevitySubSection/LongevitySubSection.tsx +++ b/src/components/longevity/LongevitySubSection/LongevitySubSection.tsx @@ -71,6 +71,7 @@ const LongevitySubSection: FC = ({ id={title} place={'bottom'} className={cn(styles.tooltip, {})} + clickable > { width={1140} height={83} className={cn(styles.curtains, { - [styles.curtainsOpen]: router.pathname.includes('habits'), + [styles.curtainsOpen]: !router.asPath.includes('about-project'), })} />
    diff --git a/src/components/longevity/ShinyStars/ShinyStars.module.scss b/src/components/longevity/ShinyStars/ShinyStars.module.scss index aaeccaa..90790b8 100644 --- a/src/components/longevity/ShinyStars/ShinyStars.module.scss +++ b/src/components/longevity/ShinyStars/ShinyStars.module.scss @@ -7,6 +7,7 @@ .starImg { display: block; + cursor: pointer; } @keyframes fadeInAndOut { diff --git a/src/components/longevity/StrengthAndTimeCompression/StrengthAndTimeCompression.tsx b/src/components/longevity/StrengthAndTimeCompression/StrengthAndTimeCompression.tsx index 2ec9b2c..bd894af 100644 --- a/src/components/longevity/StrengthAndTimeCompression/StrengthAndTimeCompression.tsx +++ b/src/components/longevity/StrengthAndTimeCompression/StrengthAndTimeCompression.tsx @@ -29,7 +29,7 @@ const StrengthAndTimeCompression: FC = () => { />
    = ({ ? '/keepsimple_/assets/longevity/study/hacks.png' : '/keepsimple_/assets/longevity/study-headline-bg.png'; + const mobalBackgroundImage = isHacks + ? '/keepsimple_/assets/longevity/study/hacks-bg.png' + : '/keepsimple_/assets/longevity/study/flipped-card-bg.png'; return ( <>
    @@ -119,16 +122,31 @@ const StudySection: FC = ({ {flippedCardChart && (
    - {'Page { - setSwitchPage(!switchPage); - }} - /> + {!switchPage ? ( + {'Page { + setSwitchPage(!switchPage); + }} + /> + ) : ( + {'Page { + setSwitchPage(!switchPage); + }} + /> + )}
    )}
    @@ -136,11 +154,7 @@ const StudySection: FC = ({ setOpenModal(false)} - backgroundImageUrl={ - backsBackgroundImageUrl - ? backsBackgroundImageUrl - : '/keepsimple_/assets/longevity/study/flipped-card-bg.png' - } + backgroundImageUrl={mobalBackgroundImage} bodyClassName={isHacks ? styles.hacksModalBody : styles.modalBody} className={styles.modal} > diff --git a/src/components/longevity/WhatToEatOrAvoid/WhatToEatOrAvoid.tsx b/src/components/longevity/WhatToEatOrAvoid/WhatToEatOrAvoid.tsx index 79f25aa..7a435ad 100644 --- a/src/components/longevity/WhatToEatOrAvoid/WhatToEatOrAvoid.tsx +++ b/src/components/longevity/WhatToEatOrAvoid/WhatToEatOrAvoid.tsx @@ -129,22 +129,25 @@ const WhatToEatOrAvoid: FC = ({ {tooltipContent && (
    - {!isMobile && } - {title} isMobile && setOpenMobileModal(true)} - /> +
    + {!isMobile && } + {title} isMobile && setOpenMobileModal(true)} + /> +
    + {!isMobile && ( diff --git a/src/layouts/LongevityLayouts/WhatIsThisLayout.tsx b/src/layouts/LongevityLayouts/WhatIsThisLayout.tsx index f673944..52ad49d 100644 --- a/src/layouts/LongevityLayouts/WhatIsThisLayout.tsx +++ b/src/layouts/LongevityLayouts/WhatIsThisLayout.tsx @@ -29,7 +29,7 @@ const WhatIsThisLayout: FC = ({ data, locale }) => { }, { label: weightTxt, - value: `${data['basic stats weight']} kg`, + value: `${data['basic stats weight']}`, icon: `${imgPath}weight.svg`, }, { diff --git a/src/layouts/StudyLayout/StudyLayout.tsx b/src/layouts/StudyLayout/StudyLayout.tsx index e13e6dc..8df8114 100644 --- a/src/layouts/StudyLayout/StudyLayout.tsx +++ b/src/layouts/StudyLayout/StudyLayout.tsx @@ -68,7 +68,7 @@ const StudyLayout: FC = ({ data, locale }) => { flippedCardChart={`${process.env.NEXT_PUBLIC_STRAPI}${data?.['research tasks flipped card image']?.data?.attributes?.url}`} chartWidth={590} flippedCardChartMobile={ - '/keepsimple_/assets/longevity/study/mobile-charts/research-task.webp' + '/keepsimple_/assets/longevity/study/mobile-charts/research-task-mobile.webp' } /> = ({ data, locale }) => { flippedCardChart={`${process.env.NEXT_PUBLIC_STRAPI}${data?.['data flipped card image']?.data?.attributes?.url}`} chartWidth={390} flippedCardChartMobile={ - '/keepsimple_/assets/longevity/study/mobile-charts/data-chart.webp' + '/keepsimple_/assets/longevity/study/mobile-charts/data-mobile.webp' } />