Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions public/keepsimple_/assets/longevity/basic-stats/age.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/keepsimple_/assets/longevity/basic-stats/gender.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/keepsimple_/assets/longevity/basic-stats/height.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/keepsimple_/assets/longevity/basic-stats/occupation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/keepsimple_/assets/longevity/basic-stats/weight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/keepsimple_/assets/longevity/curtains.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions public/keepsimple_/assets/longevity/curtains.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/keepsimple_/assets/longevity/diet/checkbox-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/keepsimple_/assets/longevity/diet/checkbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/keepsimple_/assets/longevity/diet/damage-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/keepsimple_/assets/longevity/diet/examples-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions public/keepsimple_/assets/longevity/diet/hearts/deceptive-food.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions public/keepsimple_/assets/longevity/diet/hearts/seed-oil.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions public/keepsimple_/assets/longevity/diet/hearts/sugar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions public/keepsimple_/assets/longevity/diet/hearts/sugary-drinks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions public/keepsimple_/assets/longevity/diet/hearts/white-flour.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/keepsimple_/assets/longevity/diet/info-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions public/keepsimple_/assets/longevity/diet/scale/clean-nutritent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions public/keepsimple_/assets/longevity/diet/scale/metabolic-gold.svg

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file added public/keepsimple_/assets/longevity/dna.mp4
Binary file not shown.
11 changes: 11 additions & 0 deletions public/keepsimple_/assets/longevity/habits/marker.svg

Large diffs are not rendered by default.

Binary file added public/keepsimple_/assets/longevity/hero-bg.png
Binary file added public/keepsimple_/assets/longevity/nav-bg.png
38 changes: 38 additions & 0 deletions public/keepsimple_/assets/longevity/nav-bg.svg

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions public/keepsimple_/assets/longevity/red-line.svg

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions public/keepsimple_/assets/longevity/study/line.svg

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions public/keepsimple_/assets/longevity/study/page-switcher.svg

Large diffs are not rendered by default.

Binary file added public/keepsimple_/static/sdc/CareerPaths.pdf
Binary file not shown.
Binary file added public/keepsimple_/static/sdc/HRSpecialist.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/keepsimple_/static/sdc/ProductManager.pdf
Binary file not shown.
Binary file added public/keepsimple_/static/sdc/ProjectManager.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/keepsimple_/static/sdc/SDC_RIO_Model.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions src/api/longevity/diet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export async function getDiet(locale: string) {
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-diet?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
28 changes: 28 additions & 0 deletions src/api/longevity/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export async function getEnvironment(locale: string) {
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-environment?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
30 changes: 30 additions & 0 deletions src/api/longevity/habits-protocol.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export async function getHabitsProtocol(locale: string) {
const base = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-habit-protocol`;

const url = `${base}` + `?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
28 changes: 28 additions & 0 deletions src/api/longevity/results.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export async function getLongevityResults(locale: string) {
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-result?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
28 changes: 28 additions & 0 deletions src/api/longevity/sleep.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export async function getSleep(locale: string) {
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-sleep?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
30 changes: 30 additions & 0 deletions src/api/longevity/study.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export async function getStudy(locale: string) {
const base = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-study`;

const url = `${base}` + `?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
28 changes: 28 additions & 0 deletions src/api/longevity/supplements.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export async function getSupplements(locale: string) {
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-supplement?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
38 changes: 38 additions & 0 deletions src/api/longevity/what-is-this.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
export async function getWhatIsThis(locale: string) {
const base = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-what-is-this`;

const currentLocale = locale === 'ru' ? 'ru' : 'en';

const url =
`${base}` +
`?locale=${currentLocale}` +
`&populate[localizations]=*` +
`&populate[basicStats]=*` +
`&populate[OGTags][populate]=ogImage` +
`&populate[Seo]=*`;

const res = await fetch(url, {
next: { revalidate: 3600, tags: ['contributor'] },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
28 changes: 28 additions & 0 deletions src/api/longevity/workout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export async function getWorkout(locale: string) {
const url = `${process.env.NEXT_PUBLIC_STRAPI}/api/longevity-workout?populate=*`;

const res = await fetch(url, {
next: { revalidate: 3600 },
});

if (!res.ok) throw new Error('Failed to fetch contributor');

const json = await res.json();
const attrs = json?.data?.attributes ?? {};
const locs = attrs?.localizations?.data ?? [];

const byLocale: Record<string, unknown> = {};

if (attrs.locale) {
byLocale[attrs.locale] = attrs;
}

for (const loc of locs) {
const a = loc?.attributes;
if (a?.locale) {
byLocale[a.locale] = a;
}
}

return byLocale;
}
25 changes: 25 additions & 0 deletions src/assets/icons/longevity/DietIcon.tsx

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions src/assets/icons/longevity/LifestyleIcon.tsx

Large diffs are not rendered by default.

166 changes: 166 additions & 0 deletions src/assets/icons/longevity/NavigationBg.tsx

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions src/assets/icons/longevity/SleepIcon.tsx

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/assets/icons/longevity/StudyIcon.tsx

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions src/assets/icons/longevity/SupplementsIcon.tsx

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions src/assets/icons/longevity/TomIcon.tsx

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions src/assets/icons/longevity/WorkoutIcon.tsx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/Header/Header.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
position: sticky;
top: 0;
z-index: 10;
z-index: 65;
height: 48px;
padding-top: unset;
flex-direction: row;
Expand Down
15 changes: 13 additions & 2 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FC, Fragment, useCallback, useContext } from 'react';
import React, { FC, Fragment, useCallback, useContext, useState } from 'react';
import cn from 'classnames';
import { useRouter } from 'next/router';
import Image from 'next/image';
Expand All @@ -7,6 +7,8 @@ import { flushSync } from 'react-dom';
import Navbar from '@components/Navbar';
import Link from '@components/NextLink';
import { GlobalContext } from '@components/Context/GlobalContext';
import UserProfile from '@components/UserProfile';
import LogIn from '@components/LogIn';

import type { TRouter } from '@local-types/global';

Expand All @@ -20,7 +22,8 @@ const Header: FC = () => {
const { locale, locales } = router as TRouter;
const { setShowLoader, videoRef } = useContext(GlobalContext);
const isSmallScreen = useIsWidthLessThan(1141);

const [openLogin, setOpenLogin] = useState(false);
const { accountData, setAccountData } = useContext(GlobalContext);
const [
{ toggleIsDarkTheme, toggleSidebar },
{ isDarkTheme, isOpenedSidebar },
Expand Down Expand Up @@ -154,10 +157,18 @@ const Header: FC = () => {
</Link>
)}
</div>
<UserProfile
showDropdown
setAccountData={setAccountData}
isLoggedIn={!!accountData}
username={accountData?.username}
setOpenLoginModal={setOpenLogin}
/>
</div>
</div>
<div className={styles.closeButton} onClick={handleToggleSidebar} />
</header>
{openLogin && <LogIn setShowLogIn={setOpenLogin} />}
</Fragment>
);
};
Expand Down
14 changes: 13 additions & 1 deletion src/components/Heading/Heading.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,23 @@
font-size: 64px;
}

.bold {
font-weight: 700;
}

.h4 {
font-size: 20px;
font-family: Source-Serif-SemiBold, sans-serif;
line-height: 1.4;
}

.h5 {
font-size: 16px;
font-family: Aboreto-Regular, sans-serif;
line-height: 1;
font-weight: 600;
}

.diamond {
width: 10px;
height: 10px;
Expand All @@ -36,7 +47,8 @@
}
}

.underline {
.underline,
.redUnderline {
width: 100%;
padding: 16px 0 24px 0;
}
Expand Down
14 changes: 14 additions & 0 deletions src/components/Heading/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const Heading: FC<HeadingProps> = ({
Tag = 'h1',
hasUnderline,
isDarkTheme,
hasRedUnderline,
locale,
isBold,
isBig,
}) => {
return (
Expand Down Expand Up @@ -43,7 +45,9 @@ const Heading: FC<HeadingProps> = ({
className={cn(styles.heading, {
[styles.small]: Tag === 'h2' || Tag === 'h3',
[styles.h4]: Tag === 'h4',
[styles.h5]: Tag === 'h5',
[styles.big]: isBig,
[styles.bold]: isBold,
})}
>
{text}
Expand All @@ -65,6 +69,16 @@ const Heading: FC<HeadingProps> = ({
className={styles.underline}
/>
)}
{hasRedUnderline && (
<Image
src={'/keepsimple_/assets/longevity/red-line.svg'}
alt={'line'}
width={868}
height={4}
unoptimized
className={styles.redUnderline}
/>
)}
</div>
);
};
Expand Down
Loading