Skip to content

Commit dbfcf46

Browse files
committed
Merge branch 'dev' into TCA-920
2 parents 280daf3 + 92a0591 commit dbfcf46

File tree

26 files changed

+409
-276
lines changed

26 files changed

+409
-276
lines changed

src-ts/lib/breadcrumb/Breadcrumb.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
padding: 0;
4141
@include ltesm {
4242
flex: 0 1 auto;
43-
&:first-child {
44-
flex: 1 0 auto;
43+
&:first-child:not(:global(.elipsis)) {
44+
flex: 1 0 0;
4545
}
4646
}
4747
a {

src-ts/lib/breadcrumb/breadcrumb-item/BreadcrumbItem.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ const BreadcrumbItem: FC<BreadcrumbItemProps> = (props: BreadcrumbItemProps) =>
1919
return (
2020
<li
2121
key={props.index}
22-
onClick={() => onClick()}
22+
onClick={onClick}
23+
className={props.item.isElipsis ? 'elipsis' : ''}
2324
>
2425
<Link
25-
className={props.item.isElipsis && styles.elipsis}
26+
className={props.item.isElipsis ? styles.elipsis : ''}
2627
to={props.item.url}
2728
>
2829
{props.item.name}

src-ts/tools/learn/certification-details/certification-details-modal/certif-details-content/data/perks.data.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import { ReactNode } from 'react'
2+
3+
import { IconSolid } from '../../../../../../lib'
4+
import { getTCAUserCertificationPreviewUrl } from '../../../../learn.routes'
5+
16
export type PerkIconsType = |
27
'currency-dolary' |
38
'icon-certif' |
@@ -8,6 +13,7 @@ export interface PerkItem {
813
description: string
914
icon: PerkIconsType
1015
title: string
16+
extra?: (certification: string) => ReactNode
1117
}
1218

1319
export const perks: Array<PerkItem> = [
@@ -24,6 +30,16 @@ export const perks: Array<PerkItem> = [
2430
You will receive a digital certificate that can be linked to
2531
your resume/CV, as verified proof of your skills.
2632
`,
33+
extra: (certification: string) => (
34+
<a
35+
href={getTCAUserCertificationPreviewUrl(certification)}
36+
target='_blank'
37+
rel='noreferrer'
38+
>
39+
Preview
40+
<IconSolid.ExternalLinkIcon />
41+
</a>
42+
),
2743
icon: 'icon-certif',
2844
title: 'Proof of my skills',
2945
},

src-ts/tools/learn/certification-details/perks-section/PerksSection.module.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,22 @@
6969
margin-top: $space-sm;
7070
}
7171
}
72+
73+
.perkExtraLink {
74+
margin-top: $space-sm;
75+
76+
> * {
77+
display: flex;
78+
align-items: center;
79+
gap: $space-xs;
80+
color: $turq-160;
81+
@include font-roboto;
82+
font-weight: 700;
83+
font-size: 14px;
84+
line-height: 14px;
85+
text-transform: uppercase;
86+
}
87+
svg {
88+
@include icon-size(14);
89+
}
90+
}
Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import classNames from 'classnames'
21
import { FC } from 'react'
2+
import { Params, useParams } from 'react-router-dom'
3+
import classNames from 'classnames'
34

4-
import { type PerkItem } from '../data/perks.data'
5+
import { type PerkItem } from '../certification-details-modal/certif-details-content/data'
56

67
import { getPerkIcon } from './icons-map'
78
import styles from './PerksSection.module.scss'
@@ -12,38 +13,45 @@ interface PerksSectionProps {
1213
style?: 'clear'
1314
}
1415

15-
const PerksSection: FC<PerksSectionProps> = (props: PerksSectionProps) => (
16-
<div className={classNames(styles.wrap, props.style && styles[props.style])}>
17-
<h2>{props.title ?? 'Why certify with Topcoder?'}</h2>
18-
<svg width='0' height='0'>
19-
<defs>
20-
<linearGradient
21-
id='paint0_linear_1847_10558'
22-
x1='-1.11475e-07'
23-
y1='31.2359'
24-
x2='41.4349'
25-
y2='27.2123'
26-
gradientUnits='userSpaceOnUse'
27-
>
28-
<stop stopColor='#05456D' />
29-
<stop offset='1' stopColor='#0A7AC0' />
30-
</linearGradient>
31-
</defs>
32-
</svg>
33-
<ul className={styles.perksList}>
34-
{props.items.map(perk => (
35-
<li key={perk.title}>
36-
<div className={styles.perkIcon}>
37-
{getPerkIcon(perk)}
38-
</div>
39-
<div className={styles.perkContent}>
40-
<h3 className='details'>{perk.title}</h3>
41-
<p className='body-main'>{perk.description}</p>
42-
</div>
43-
</li>
44-
))}
45-
</ul>
46-
</div>
47-
)
16+
const PerksSection: FC<PerksSectionProps> = (props: PerksSectionProps) => {
17+
const routeParams: Params<string> = useParams()
18+
19+
return (
20+
<div className={classNames(styles.wrap, props.style && styles[props.style])}>
21+
<h2>{props.title ?? 'Why certify with Topcoder?'}</h2>
22+
<svg width='0' height='0'>
23+
<defs>
24+
<linearGradient
25+
id='paint0_linear_1847_10558'
26+
x1='-1.11475e-07'
27+
y1='31.2359'
28+
x2='41.4349'
29+
y2='27.2123'
30+
gradientUnits='userSpaceOnUse'
31+
>
32+
<stop stopColor='#05456D' />
33+
<stop offset='1' stopColor='#0A7AC0' />
34+
</linearGradient>
35+
</defs>
36+
</svg>
37+
<ul className={styles.perksList}>
38+
{props.items.map(perk => (
39+
<li key={perk.title}>
40+
<div className={styles.perkIcon}>
41+
{getPerkIcon(perk)}
42+
</div>
43+
<div className={styles.perkContent}>
44+
<h3 className='details'>{perk.title}</h3>
45+
<p className='body-main'>{perk.description}</p>
46+
<div className={styles.perkExtraLink}>
47+
{perk.extra?.(routeParams.certification as string)}
48+
</div>
49+
</div>
50+
</li>
51+
))}
52+
</ul>
53+
</div>
54+
)
55+
}
4856

4957
export default PerksSection

src-ts/tools/learn/course-completed/tca-certification-view/TCACertificationView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { FC } from 'react'
22

3-
import { EnvironmentConfig } from '../../../../config'
43
import { Button } from '../../../../lib'
54
import { CourseTitle, LearnCourse, TCACertification } from '../../learn-lib'
6-
import { getCertificatePath, getTCACertificationPath, rootRoute } from '../../learn.routes'
5+
import { getTCACertificationPath } from '../../learn.routes'
76
import { ReactComponent as StarsSvg } from '../stars.svg'
87
import { TitleBadgeType } from '../../learn-lib/course-title/CourseTitle'
98
import styles from '../CourseCompletedPage.module.scss'

src-ts/tools/learn/learn-lib/course-title/CourseTitle.module.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
@include ltemd {
6262
:global(.quote-small.xl) {
6363
margin-top: $space-sm;
64+
display: flex;
65+
justify-content: center;
6466
}
6567
}
6668
}

src-ts/tools/learn/learn-lib/data-providers/tca-certifications-provider/tca-certification-enrollment/tca-enrollment-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function useTCACertificationEnrollment(
3131
enrollment: data,
3232
error: !!error,
3333
loading: !data,
34-
ready: !!data,
34+
ready: !!data || !!error,
3535
}
3636
}
3737

src-ts/tools/learn/learn-lib/hiring-manager-view/HiringManagerView.module.scss

Lines changed: 93 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@
3434
background: url('./bg-curve-white.png') no-repeat center bottom / 100vw, $tc-qa-grad;
3535
}
3636

37+
&.asPreview {
38+
position: relative;
39+
z-index: 1;
40+
&:before {
41+
content: "";
42+
display: block;
43+
position: absolute;
44+
top: 0;
45+
left: 0;
46+
width: 100%;
47+
height: 100%;
48+
background: url('./bg-curve-white.png') no-repeat center bottom / 100vw, url('./preview-watermark.png') no-repeat top left / cover;
49+
z-index: -1;
50+
}
51+
}
52+
3753
.heroInner {
3854
display: flex;
3955
gap: $space-mx;
@@ -149,12 +165,7 @@
149165
}
150166

151167
.wrap {
152-
margin-top: $space-mxx;
153168
margin-bottom: 120px;
154-
155-
@include ltelg {
156-
margin-top: $space-mx;
157-
}
158169

159170
@include ltemd {
160171
margin-bottom: $space-lg;
@@ -247,6 +258,11 @@
247258
align-items: center;
248259
gap: $space-xs;
249260

261+
margin-top: $space-mxx;
262+
@include ltelg {
263+
margin-top: $space-mx;
264+
}
265+
250266
&:global(.secondary) {
251267
border: 2px solid;
252268
}
@@ -286,4 +302,76 @@
286302
@include ltemd {
287303
display: none;
288304
}
305+
}
306+
307+
.modalView {
308+
.hero {
309+
padding-top: $space-mx;
310+
min-height: 380px;
311+
312+
@include ltesm {
313+
max-height: none;
314+
}
315+
316+
317+
.heroInner {
318+
margin-bottom: 0;
319+
flex-direction: row;
320+
padding-right: $space-lg;
321+
padding-bottom: $space-mx;
322+
323+
@include ltesm {
324+
flex-direction: column;
325+
padding-right: 0;
326+
}
327+
328+
.heroLeft {
329+
.member {
330+
margin-bottom: $space-xxxxl;
331+
332+
>svg,
333+
>img {
334+
max-width: 88px;
335+
max-height: 88px;
336+
}
337+
}
338+
339+
.certTitle {
340+
font-size: 40px;
341+
line-height: 40px;
342+
}
343+
}
344+
}
345+
}
346+
347+
.wrap {
348+
margin-bottom: 0;
349+
}
350+
351+
.contentOuter {
352+
max-width: none;
353+
354+
>div {
355+
max-width: none !important;
356+
}
357+
358+
}
359+
360+
.courses {
361+
margin-bottom: 0;
362+
}
363+
364+
.colsWrap {
365+
margin-top: 0;
366+
}
367+
368+
.colWrap {
369+
&:last-child {
370+
max-width: 25%;
371+
padding-right: 0;
372+
@include ltemd {
373+
max-width: 100%;
374+
}
375+
}
376+
}
289377
}

0 commit comments

Comments
 (0)