Skip to content

Commit b45076e

Browse files
committed
Merge branch 'dev' of github.com:topcoder-platform/platform-ui into TCA-441_implement-sort-filter-on-learn-landing
2 parents 186fe43 + 99d3260 commit b45076e

File tree

14 files changed

+235
-71
lines changed

14 files changed

+235
-71
lines changed

src-ts/tools/learn/course-details/CourseDetailsPage.module.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@
4747
@extend .body-main;
4848
margin-top: $space-xxl;
4949
}
50-
50+
5151
p {
5252
margin: $space-sm 0;
5353
}
54+
55+
:global(.details.mtop) {
56+
margin-top: $space-xxl;
57+
}
5458
}
5559

5660
.coming-soon {

src-ts/tools/learn/course-details/CourseDetailsPage.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,27 @@ const CourseDetailsPage: FC<{}> = () => {
9999
)
100100
}
101101

102+
function getCompletionSuggestion(): ReactNode {
103+
if (!course) {
104+
return
105+
}
106+
107+
return progress?.status === UserCertificationProgressStatus.completed ? (
108+
<></>
109+
) : (
110+
!!course.completionSuggestions?.length && (
111+
<>
112+
<h3 className='details mtop'>Suggestions for completing this course</h3>
113+
114+
<div
115+
className={styles['text']}
116+
dangerouslySetInnerHTML={{ __html: (course.completionSuggestions ?? []).join('<br /><br />') }}
117+
></div>
118+
</>
119+
)
120+
)
121+
}
122+
102123
function getFooter(): ReactNode {
103124
if (!resourceProvider) {
104125
return
@@ -141,6 +162,7 @@ const CourseDetailsPage: FC<{}> = () => {
141162

142163
<div className={styles['description']}>
143164
{getDescription()}
165+
{getCompletionSuggestion()}
144166
<div className={styles['coming-soon']}>
145167
<PromoCourse />
146168
</div>

src-ts/tools/learn/learn-lib/courses-provider/courses-functions/learn-course.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { LearnModule } from '../../lesson-provider'
44
export interface LearnCourse extends LearnModelBase {
55
certification: string
66
certificationId: string
7+
completionSuggestions: Array<string>
78
estimatedCompletionTime: {
89
units: string
910
value: number

src-ts/tools/learn/learn-lib/my-course-card/in-progress/InProgress.module.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88

99
display: flex;
1010

11-
&.large {
12-
padding: $space-xxxxl;
13-
}
14-
1511
@include ltelg {
1612
&, &.large {
1713
padding: $space-lg;
@@ -119,8 +115,8 @@
119115

120116
.started-date {
121117
font-weight: bold;
122-
118+
123119
@include ltemd {
124120
order: -1;
125121
}
126-
}
122+
}

src-ts/tools/learn/learn-lib/wave-hero/WaveHero.module.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020
}
2121
}
22-
22+
2323
&-inner {
2424
padding: calc($space-xxxxl + $space-sm) 0 $space-lg;
2525
@include contentWidth;
@@ -47,13 +47,13 @@
4747
flex-direction: column;
4848
}
4949
}
50-
50+
5151
&-card-col {
5252
flex: 0 0 auto;
5353
}
54-
54+
5555
&-text {
5656
@extend .body-medium-normal;
57-
margin-top: $space-xxl;
57+
margin-top: $space-sm;
5858
}
5959
}

src-ts/tools/learn/learn-lib/wave-hero/WaveHero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface WaveHeroProps {
77
children?: ReactNode
88
text: string
99
theme?: 'light'
10-
title: string
10+
title: ReactNode
1111
}
1212

1313
const WaveHero: FC<WaveHeroProps> = (props: WaveHeroProps) => {

src-ts/tools/learn/welcome/WelcomePage.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
@import '../../../lib/styles/includes';
22

33
.hero-wrap {
4+
svg:global(.tca-logo) {
5+
margin-bottom: $space-xxl;
6+
max-width: calc(100% - 70px);
7+
}
8+
49
:global(.hero-card-col) {
510
width: 43.5%;
611
max-width: 600px;

src-ts/tools/learn/welcome/WelcomePage.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515

1616
import { CoursesCard } from './courses-card'
1717
import { ProgressBlock } from './progress-block'
18+
import { ReactComponent as TcAcademyFullLogoSvg } from './tca-full-logo.svg'
1819
import styles from './WelcomePage.module.scss'
1920

2021
type SORT_FIELD_TYPE = keyof LearnCertification
@@ -71,7 +72,12 @@ const WelcomePage: FC<{}> = () => {
7172
<Portal portalId='page-subheader-portal-el'>
7273
<div className={styles['hero-wrap']}>
7374
<WaveHero
74-
title='Welcome to Topcoder ACADEMY'
75+
title={(
76+
<>
77+
<TcAcademyFullLogoSvg className='tca-logo' />
78+
Welcome!
79+
</>
80+
)}
7581
text={`
7682
The Topcoder Academy will provide you with learning opportunities
7783
in the form of guided learning paths.

src-ts/tools/learn/welcome/progress-block/ProgressBlock.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
.wrap {
55
background: $black-5;
66
border-radius: $space-sm;
7-
padding: $space-xxl;
7+
padding: $space-xxl $space-xxl $space-lg;
88
color: $black-100;
99

1010
display: flex;
1111
flex-direction: column;
12-
gap: $space-lg;
12+
gap: $space-xxl;
1313
width: 100%;
14-
14+
1515
@include ltemd {
1616
padding: $space-lg;
1717
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
@import '../../../../../lib/styles/includes';
2+
3+
.slides-wrap {
4+
display: block;
5+
position: relative;
6+
z-index: 1;
7+
overflow: hidden;
8+
}
9+
10+
.slide {
11+
position: absolute;
12+
top: 0;
13+
left: 0;
14+
width: 100%;
15+
16+
opacity: 0;
17+
visibility: hidden;
18+
transition: 0.2s ease;
19+
&:global(:not(.active)) {
20+
pointer-events: none;
21+
}
22+
23+
24+
&:global(.is-prev) {
25+
transform: translateX(-100%);
26+
}
27+
28+
&:global(.is-next) {
29+
transform: translateX(100%);
30+
}
31+
32+
&:global(.active) {
33+
position: relative;
34+
opacity: 1;
35+
transform: translateX(0);
36+
visibility: visible;
37+
}
38+
}
39+
40+
.nav-wrap {
41+
display: flex;
42+
align-items: center;
43+
justify-content: center;
44+
margin-top: $space-xxl;
45+
46+
gap: calc($space-xs + $border-xs);
47+
}
48+
49+
.nav-dot {
50+
display: block;
51+
width: $space-md;
52+
height: $space-md;
53+
background: $black-40;
54+
border-radius: 50%;
55+
cursor: pointer;
56+
57+
&:global(.active) {
58+
width: calc($space-lg + $border);
59+
height: calc($space-lg + $border);
60+
border: $border solid $turq-100;
61+
background: $tc-white;
62+
}
63+
}

0 commit comments

Comments
 (0)