Skip to content

Commit 9b23b99

Browse files
authored
Merge pull request #35 from keepsimpleio/dev
Chore: Add Russian content to Hero component
2 parents c0793b6 + ce4b735 commit 9b23b99

6 files changed

Lines changed: 30 additions & 6 deletions

File tree

src/components/longevity/Hero/Hero.module.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
padding: 40px 0;
1010
}
1111

12-
@media (max-width: 1160px) {
12+
.heroRu {
13+
h1 {
14+
font-family: Cormorant_Garamond-Regular, sans-serif !important;
15+
font-weight: 200 !important;
16+
}
17+
}
18+
19+
@media (max-width: 1350px) {
1320
.hero {
1421
text-align: center;
1522

src/components/longevity/Hero/Hero.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
import { FC } from 'react';
2-
import styles from './Hero.module.scss';
2+
import { useRouter } from 'next/router';
3+
34
import Heading from '@components/Heading';
45

6+
import type { TRouter } from '@local-types/global';
7+
8+
import longevityData from '@data/longevity';
9+
10+
import styles from './Hero.module.scss';
11+
import cn from 'classnames';
12+
513
const Hero: FC = ({}) => {
14+
const router = useRouter();
15+
const { locale } = router as TRouter;
16+
const { mainTitle } = longevityData[locale];
17+
618
return (
7-
<section className={styles.hero}>
8-
<Heading text={'practical longevity protocol'} />
19+
<section
20+
className={cn(styles.hero, {
21+
[styles.heroRu]: locale === 'ru',
22+
})}
23+
>
24+
<Heading text={mainTitle} />
925
<Heading
1026
text={'BY WOLF ALEXANYAN'}
1127
Tag={'h2'}

src/data/longevity/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const en = {
2+
mainTitle: 'Practical longevity protocol',
23
habitTooltipTitle: 'Why do this?',
34
foodScienceFactsTitle: 'Food-science facts that most influenced my choices',
45
whatNotToEatTitle: 'What not to eat',

src/data/longevity/hy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const hy = {
2+
mainTitle: 'Practical longevity protocol',
23
habitTooltipTitle: 'Why do this?',
34
foodScienceFactsTitle: 'Food-science facts that most influenced my choices',
45
whatNotToEatTitle: 'What not to eat',

src/data/longevity/ru.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const ru = {
2+
mainTitle: 'ПРАКТИЧЕСКИЙ ПРОТОКОЛ ДОЛГОЛЕТИЯ',
23
habitTooltipTitle: 'Зачем это делать?',
34
foodScienceFactsTitle: 'Научные факты повлиявшие на меня больше всего',
45
whatNotToEatTitle: 'Что не есть',

src/data/longevity/words.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)