-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6601 from topcoder-platform/develop
Release v1.17.13
- Loading branch information
Showing
25 changed files
with
478 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from 'react'; | ||
import PT from 'prop-types'; | ||
import { noop } from 'lodash/noop'; | ||
import { Modal } from 'topcoder-react-ui-kit'; | ||
import cn from 'classnames'; | ||
|
||
import IconClose from 'assets/images/icon-close-green.svg'; | ||
import styles from './styles.scss'; | ||
|
||
const ProfileModal = ({ | ||
children, | ||
title, | ||
onCancel, | ||
containerClassName, | ||
}) => ( | ||
<Modal | ||
theme={{ | ||
container: cn(styles['modal-container'], containerClassName), | ||
overlay: styles['modal-overlay'], | ||
}} | ||
onCancel={onCancel} | ||
> | ||
<React.Fragment> | ||
<div styleName="header"> | ||
<h2 styleName="title"> | ||
{title} | ||
</h2> | ||
<div styleName="icon" role="presentation" onClick={onCancel}> | ||
<IconClose /> | ||
</div> | ||
</div> | ||
{children} | ||
</React.Fragment> | ||
</Modal> | ||
); | ||
|
||
ProfileModal.defaultProps = { | ||
title: null, | ||
onCancel: noop, | ||
containerClassName: '', | ||
}; | ||
|
||
ProfileModal.propTypes = { | ||
children: PT.node.isRequired, | ||
title: PT.node, | ||
onCancel: PT.func, | ||
containerClassName: PT.string, | ||
}; | ||
|
||
export default ProfileModal; |
47 changes: 47 additions & 0 deletions
47
src/shared/components/ProfilePage/ProfileModal/styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@import "~styles/mixins"; | ||
|
||
.modal-overlay { | ||
background: #000; | ||
} | ||
|
||
.modal-container-copilot, | ||
.modal-container { | ||
width: 1232px; | ||
min-height: 700px; | ||
max-width: 1232px; | ||
border-radius: 8px; | ||
padding: 32px 32px 0 32px; | ||
gap: 24px; | ||
|
||
&.modal-container-copilot { | ||
height: auto; | ||
} | ||
|
||
@include xs-to-sm { | ||
width: 100%; | ||
max-width: 100%; | ||
height: 100% !important; | ||
max-height: 100% !important; | ||
padding: 24px 16px 48px 16px; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding-bottom: 24px; | ||
|
||
.title { | ||
@include barlow-medium; | ||
|
||
font-weight: 600; | ||
font-size: 22px; | ||
line-height: 26px; | ||
text-transform: uppercase; | ||
} | ||
|
||
.icon { | ||
cursor: pointer; | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/shared/components/ProfilePage/TcaCertificates/CourseBadge/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
import PT from 'prop-types'; | ||
|
||
import DataScienceBadgeImg from 'assets/images/profile/tca-certificates/datascience-badge.png'; | ||
import DesignBadgeImg from 'assets/images/profile/tca-certificates/design-badge.png'; | ||
import DevelopBadgeImg from 'assets/images/profile/tca-certificates/develop-badge.png'; | ||
import QaBadgeImg from 'assets/images/profile/tca-certificates/qa-badge.png'; | ||
|
||
import './styles.scss'; | ||
|
||
const badgesMap = { | ||
DATASCIENCE: DataScienceBadgeImg, | ||
DESIGN: DesignBadgeImg, | ||
DEV: DevelopBadgeImg, | ||
QA: QaBadgeImg, | ||
}; | ||
|
||
const CourseBadge = ({ type: badgeType, size }) => { | ||
const badgeImg = badgesMap[badgeType]; | ||
|
||
return ( | ||
<div styleName={`tca-badge-wrap size-${size}`}> | ||
<img src={badgeImg} alt={badgeType} /> | ||
</div> | ||
); | ||
}; | ||
|
||
CourseBadge.defaultProps = { | ||
size: 'md', | ||
}; | ||
|
||
CourseBadge.propTypes = { | ||
size: PT.oneOf(['md']), | ||
type: PT.oneOf(['DATASCIENCE', 'DESIGN', 'DEV', 'QA']).isRequired, | ||
}; | ||
|
||
|
||
export default CourseBadge; |
13 changes: 13 additions & 0 deletions
13
src/shared/components/ProfilePage/TcaCertificates/CourseBadge/styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.tca-badge-wrap { | ||
&.size-md { | ||
width: 48px; | ||
height: 48px; | ||
} | ||
|
||
img { | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: contain; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/shared/components/ProfilePage/TcaCertificates/List/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react'; | ||
import PT from 'prop-types'; | ||
|
||
import './styles.scss'; | ||
import CourseBadge from '../CourseBadge'; | ||
|
||
const preventDefault = ev => ev.stopPropagation(); | ||
|
||
const List = ({ | ||
certificates, | ||
onClick, | ||
}) => ( | ||
<div styleName="list"> | ||
{certificates.map(certificate => ( | ||
<div | ||
styleName="list-item" | ||
key={certificate.id} | ||
onClick={() => onClick(certificate)} | ||
onKeyPress={() => onClick(certificate)} | ||
role="button" | ||
tabIndex={-1} | ||
> | ||
<div styleName="list-item_badge"> | ||
<CourseBadge type={certificate.certificationTrackType || 'DEV'} /> | ||
</div> | ||
<div> | ||
<div styleName="list-item_title"> | ||
{certificate.certificationTitle} | ||
</div> | ||
<div styleName="list-item_sub"> | ||
<a href={`//${certificate.providerUrl}`} target="blank" rel="noopener" onClick={preventDefault}> | ||
by {certificate.provider} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
|
||
List.propTypes = { | ||
certificates: PT.arrayOf(PT.shape()).isRequired, | ||
onClick: PT.func.isRequired, | ||
}; | ||
|
||
export default List; |
63 changes: 63 additions & 0 deletions
63
src/shared/components/ProfilePage/TcaCertificates/List/styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@import "~styles/mixins"; | ||
|
||
.list { | ||
display: flex; | ||
gap: 16px; | ||
margin-top: 24px; | ||
flex-wrap: wrap; | ||
|
||
@include xs-to-sm { | ||
flex-direction: column; | ||
flex-wrap: nowrap; | ||
margin-top: 16px; | ||
} | ||
} | ||
|
||
.list-item { | ||
background: $listing-white; | ||
border-radius: 8px; | ||
padding: 16px; | ||
display: flex; | ||
align-items: center; | ||
gap: 16px; | ||
width: 316px; | ||
transition: 0.25s ease-in-out; | ||
box-shadow: 0 0 0 rgba(0, 0, 0, 0); | ||
cursor: pointer; | ||
|
||
&:hover { | ||
box-shadow: 0 0 16px rgba(22, 103, 154, 0.5); | ||
} | ||
|
||
@include xs-to-sm { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.list-item_badge { | ||
width: 48px; | ||
height: 48px; | ||
|
||
svg { | ||
display: block; | ||
width: 48px; | ||
height: 48px; | ||
} | ||
} | ||
|
||
.list-item_title { | ||
@include roboto-sans-regular; | ||
|
||
font-size: 16px; | ||
line-height: 24px; | ||
font-weight: bold; | ||
} | ||
|
||
.list-item_sub { | ||
@include roboto-sans-regular; | ||
|
||
font-style: italic; | ||
font-size: 14px; | ||
line-height: 22px; | ||
color: $listing-placeholder-gray; | ||
} |
Oops, something went wrong.