Skip to content

Commit 3eb2f16

Browse files
update article component layout and add title and ebook-ad styles
1 parent 9671527 commit 3eb2f16

File tree

10 files changed

+82
-82
lines changed

10 files changed

+82
-82
lines changed

src/features/common/components/article/article.module.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,6 @@
77

88
.content {
99
@include InnerContentGrid;
10-
11-
padding: 3rem 0 3rem 0;
12-
gap: 2rem;
13-
14-
@media #{$breakpoint-dimension-sm} {
15-
padding: 3rem 0 4rem 0;
16-
}
17-
18-
@media #{$breakpoint-dimension-md} {
19-
gap: 3rem;
20-
padding: 4rem 0 4rem 0;
21-
}
2210
}
2311

2412
.article {

src/features/introduction/components/ebook-ad/ebook-ad.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type EbookAdComponentProps = {
88

99
export const EbookAdComponent: React.FC<EbookAdComponentProps> = ({ copy }) => {
1010
return (
11-
<BoxComponent contentClassName={styles.content}>
11+
<BoxComponent contentClassName={styles.content} containerClassName={styles.container}>
1212
<p className={styles.copy}>{copy}</p>
1313
</BoxComponent>
1414
);

src/features/introduction/components/ebook-ad/ebook-ad.module.scss

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
@use "@/libs/theme/styles/variables" as *;
22
@use "@/libs/theme/styles/mixins" as *;
33

4+
.container {
5+
margin-bottom: 1.5rem;
6+
}
7+
48
.content {
59
@include InnerContentFlex;
610
position: relative;
711
max-width: $article-max-width;
8-
9-
background: linear-gradient(290deg, #f4d -18.75%, #3f59e4 98.79%);
10-
11-
border-radius: 0.5rem;
1212
padding: 1rem;
13-
margin: 1rem auto 2rem auto;
14-
color: $Neutral0;
15-
font-size: 1rem;
16-
line-height: 1.25rem;
13+
border-radius: 1rem;
14+
border: 1px solid var(--color_border_default);
15+
box-shadow:
16+
0 0 0 0.5px rgba(0, 0, 0, 0.12),
17+
0 2px 2px -1px rgba(0, 0, 0, 0.04),
18+
0 4px 4px -2px rgba(0, 0, 0, 0.04),
19+
0 6px 6px -3px rgba(0, 0, 0, 0.04);
1720
}
1821

1922
.copy {
2023
font-weight: 400;
24+
line-height: 1.25rem;
25+
font-size: 1rem;
26+
color: var(--color_fg_default);
2127

2228
& strong {
2329
font-weight: 500;

src/features/introduction/components/introduction-article/introduction-article.component.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,32 @@ import { getIntroductionContent } from "@/features/localization/services/ui-lang
55
import { ArticleComponent } from "@/features/common/components/article/article.component";
66
import styles from "./introduction-article.module.scss";
77
import { SidebarNavComponent } from "../sidebar-nav/sidebar-nav.component";
8+
import { EbookAdComponent } from "../ebook-ad/ebook-ad.component";
9+
import { getComponentDictionary } from "@/features/localization/services/component-dictionary.service";
10+
import { IntroductionDictionaryModel } from "@/features/localization/models/introduction-dictionary.model";
11+
import clsx from "clsx";
12+
import { getLocalizedSecondaryFont } from "@/libs/theme/fonts";
13+
import { IntroductionHeroComponent } from "../introduction-hero/introduction-hero.component";
814

915
interface IntroductionArticleComponentProps {
1016
languageCode: string;
17+
introductionDictionary: IntroductionDictionaryModel;
1118
}
1219

1320
export const IntroductionArticleComponent: React.FC<
1421
IntroductionArticleComponentProps
15-
> = ({ languageCode }) => {
22+
> = ({ languageCode, introductionDictionary }) => {
1623
const Introduction = getIntroductionContent({ languageCode });
24+
const componentDictionary = getComponentDictionary(languageCode);
1725

1826
return (
1927
<div className={styles.container}>
20-
<SidebarNavComponent languageCode={languageCode} />
21-
<ArticleComponent>{Introduction}</ArticleComponent>
28+
<SidebarNavComponent introductionDictionary={introductionDictionary} />
29+
<div className={styles.content}>
30+
<IntroductionHeroComponent languageCode={languageCode} dictionary={introductionDictionary.hero} />
31+
<EbookAdComponent copy={componentDictionary.ebookAd} />
32+
<ArticleComponent>{Introduction}</ArticleComponent>
33+
</div>
2234
</div>
2335
);
2436
};
Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
@use "@/libs/theme/styles/variables" as *;
22

33
.container {
4-
min-height: 100vh;
5-
display: flex;
6-
flex-direction: column;
7-
8-
@media #{$breakpoint-dimension-sm} {
9-
flex-direction: row;
10-
}
4+
display: flex;
115
}
6+
7+
.title {
8+
color: var(--color_fg_bold);
9+
font-size: 2rem;
10+
line-height: 2.5rem;
11+
font-weight: 400;
12+
letter-spacing: -0.96px;
13+
14+
@media #{$breakpoint-dimension-xs} {
15+
font-size: 2.5rem;
16+
}
17+
18+
@media #{$breakpoint-dimension-sm} {
19+
font-size: 3rem;
20+
}
21+
}

src/features/introduction/components/introduction-hero/introduction-hero.module.scss

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,23 @@
33

44
.container {
55
@include Container;
6-
7-
background: var(--color_bg_page);
8-
border-bottom: 1px solid var(--color_border_bold);
6+
margin-bottom: 1.5rem;
97
}
108

119
.content {
1210
@include InnerContentFlex;
13-
flex-direction: column;
14-
align-items: center;
15-
16-
padding-top: 2.5rem;
17-
padding-bottom: 2.5rem;
18-
19-
@media #{$breakpoint-dimension-xs} {
20-
padding-top: 4.5rem;
21-
padding-bottom: 4.5rem;
22-
}
2311
}
2412

2513
.title {
14+
width: 100%;
2615
color: var(--color_fg_bold);
27-
text-align: center;
16+
text-align: left;
2817
font-size: 2rem;
29-
line-height: 2.5rem;
30-
font-weight: 400;
31-
letter-spacing: -0.96px;
18+
line-height: 1.15;
19+
font-weight: 500;
20+
letter-spacing: -.96px;
21+
max-width: 42rem;
22+
text-wrap-style: balance;
3223

3324
@media #{$breakpoint-dimension-xs} {
3425
font-size: 2.5rem;

src/features/introduction/components/introduction-page/introduction-page.component.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import { generateArticleStructuredData } from "@/features/seo/services/structure
44
import { Auth0CtaComponent } from "@/features/common/components/auth0-cta/auth0-cta.component";
55
import { getIntroductionDictionary } from "@/features/localization/services/language-dictionary.service";
66
import { IntroductionArticleComponent } from "@/features/introduction/components/introduction-article/introduction-article.component";
7-
import { IntroductionHeroComponent } from "@/features/introduction/components/introduction-hero/introduction-hero.component";
8-
import { EbookAdComponent } from "@/features/introduction/components/ebook-ad/ebook-ad.component";
97
import { getAuth0Dictionary } from "@/features/localization/services/ui-language-dictionary.service";
10-
import { getComponentDictionary } from "@/features/localization/services/component-dictionary.service";
118

129
interface IntroductionPageComponentProps {
1310
languageCode: string;
@@ -18,7 +15,6 @@ export const IntroductionPageComponent: React.FC<
1815
> = ({ languageCode }) => {
1916
const introductionDictionary = getIntroductionDictionary(languageCode);
2017
const auth0Dictionary = getAuth0Dictionary(languageCode);
21-
const componentDictionary = getComponentDictionary(languageCode);
2218

2319
return (
2420
<>
@@ -121,12 +117,10 @@ export const IntroductionPageComponent: React.FC<
121117
}),
122118
]}
123119
/>
124-
<IntroductionHeroComponent
120+
<IntroductionArticleComponent
121+
introductionDictionary={introductionDictionary}
125122
languageCode={languageCode}
126-
dictionary={introductionDictionary.hero}
127123
/>
128-
<EbookAdComponent copy={componentDictionary.ebookAd} />
129-
<IntroductionArticleComponent languageCode={languageCode} />
130124
<Auth0CtaComponent
131125
languageCode={languageCode}
132126
dictionary={auth0Dictionary.banner}

src/features/introduction/components/sidebar-nav/sidebar-nav.component.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
"use client";
22

33
import React, { useEffect, useState } from "react";
4-
import { getIntroductionDictionary } from "@/features/localization/services/language-dictionary.service";
54
import styles from "./sidebar-nav.module.scss";
65
import clsx from "clsx";
6+
import { IntroductionDictionaryModel } from "@/features/localization/models/introduction-dictionary.model";
77

88
interface SidebarNavComponentProps {
9-
languageCode: string;
9+
introductionDictionary: IntroductionDictionaryModel;
1010
}
1111

1212
const scrollToElementWithOffset = (id: string, offset = 0) => {
@@ -18,9 +18,8 @@ const scrollToElementWithOffset = (id: string, offset = 0) => {
1818
};
1919

2020
export const SidebarNavComponent: React.FC<SidebarNavComponentProps> = ({
21-
languageCode,
21+
introductionDictionary,
2222
}) => {
23-
const introductionDictionary = getIntroductionDictionary(languageCode);
2423
const headings = introductionDictionary.content.headings;
2524
const [activeId, setActiveId] = useState<string | null>(null);
2625

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
@use "@/libs/theme/styles/variables" as *;
22

33
.container {
4-
display:none;
5-
@media #{$breakpoint-dimension-sm} {
6-
display: inline-block;
7-
height: 100vh;
8-
position: sticky;
9-
color: var(--color_fg_link);
10-
flex-shrink: 0;
11-
top: 0;
12-
padding: 160px 30px 0px;
13-
margin-bottom: 100px;
14-
border-right: 1px solid var(--color_border_bold);
15-
max-width: 250px;
16-
overflow-y: auto;
17-
}
4+
display: none;
5+
@media #{$breakpoint-dimension-sm} {
6+
display: inline-block;
7+
height: 100vh;
8+
position: sticky;
9+
color: var(--color_fg_link);
10+
flex-shrink: 0;
11+
top: 0;
12+
padding: 160px 30px 0px;
13+
margin-bottom: 100px;
14+
border-right: 1px solid var(--color_border_bold);
15+
max-width: 250px;
16+
overflow-y: auto;
17+
}
1818
}
1919

2020
.title {
21-
margin-bottom: 36px;
22-
padding-right: 8px;
23-
cursor: pointer;
21+
margin-bottom: 36px;
22+
padding-right: 8px;
23+
cursor: pointer;
2424
}
2525

2626
.title__active {
27-
color: var(--color_fg_selected);
28-
border-bottom: 1px solid var(--color_border_selected);
27+
color: var(--color_fg_selected);
28+
border-bottom: 1px solid var(--color_border_selected);
2929
}
3030

3131
.list {
32-
list-style-type: none;
32+
list-style-type: none;
3333
}

src/libs/theme/styles/_variables.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ $gradient-app-card---resting: linear-gradient(
148148
#3f59e4 67.69%
149149
);
150150

151-
$ribbon-height: 1rem;
152-
$ribbon-height-mobile: 0rem;
151+
$ribbon-height: 2rem;
152+
$ribbon-height-mobile: 2rem;
153153
$navbar-height: 5rem;
154154
$navbar-height-mobile: 3rem;
155155
$main-nav-height: calc($ribbon-height + $navbar-height);

0 commit comments

Comments
 (0)