File tree Expand file tree Collapse file tree
home/components/home-page Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,13 +5,20 @@ import { BoxComponent } from "@/features/common/components/box/box.component";
55import styles from "./hero.module.scss" ;
66import { HomeDictionaryModel } from "@/features/localization/models/home-dictionary.model" ;
77import Link from "next/link" ;
8+ import { clsx } from "clsx" ;
9+ import { getLocalizedSecondaryFont } from "@/libs/theme/fonts" ;
810
911interface HeroComponentProps {
1012 languageCode : string ;
13+ title : string ;
1114 dictionary : HomeDictionaryModel [ "info" ] ;
1215}
1316
14- export const HeroComponent : React . FC < HeroComponentProps > = ( { dictionary } ) => {
17+ export const HeroComponent : React . FC < HeroComponentProps > = ( {
18+ languageCode,
19+ title,
20+ dictionary,
21+ } ) => {
1522 const description = dictionary . description . split (
1623 dictionary . resources . spec . name
1724 ) ;
@@ -23,6 +30,11 @@ export const HeroComponent: React.FC<HeroComponentProps> = ({ dictionary }) => {
2330 wrapperClassName = { styles . wrapper }
2431 >
2532 < div className = { styles . hero } >
33+ < h1
34+ className = { clsx ( styles . title , getLocalizedSecondaryFont ( languageCode ) ) }
35+ >
36+ { title }
37+ </ h1 >
2638 < p className = { styles . modal } >
2739 < span className = { styles . modal__text } >
2840 {
Original file line number Diff line number Diff line change 2222.hero {
2323 z-index : 1 ;
2424 display : flex ;
25+ flex-direction : column ;
2526 justify-content : center ;
27+ align-items : center ;
2628 width : 100% ;
2729 padding : 1.25rem 0 ;
2830 text-align : center ;
3234 }
3335}
3436
37+ .title {
38+ width : 100% ;
39+ max-width : 42rem ;
40+ margin : 0 ;
41+ color : var (--color_fg_bold );
42+ font-size : 2rem ;
43+ line-height : 1.15 ;
44+ font-weight : 500 ;
45+ letter-spacing : -0.8px ;
46+ text-wrap-style : balance ;
47+
48+ @media #{$breakpoint-dimension-xs } {
49+ font-size : 2.5rem ;
50+ }
51+
52+ @media #{$breakpoint-dimension-sm } {
53+ font-size : 3rem ;
54+ }
55+ }
56+
3557.modal {
3658 max-width : 608px ;
3759 padding : 2.5rem 0 ;
Original file line number Diff line number Diff line change 11import React from "react" ;
2- import styles from "./home-page.module.scss"
32import { HeroComponent } from "@/features/common/components/hero/hero.component" ;
43import {
54 getHomeDictionary ,
@@ -126,9 +125,9 @@ export const HomePageComponent: React.FC<HomePageComponentProps> = ({
126125 } ,
127126 ] }
128127 />
129- < h1 className = { styles . visually_hidden } > { homeDictionary . metadata . title } </ h1 >
130128 < HeroComponent
131129 languageCode = { languageCode }
130+ title = { homeDictionary . hero . title }
132131 dictionary = { homeDictionary . info }
133132 />
134133 < DebuggerWidgetComponent
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments