Skip to content

Commit a12f7f0

Browse files
committed
Merge branch 'safe-develop' into develop
src/shared/components/challenge-listing/Sidebar/Footer/index.jsx
2 parents a04aef0 + ff78194 commit a12f7f0

File tree

13 files changed

+153
-30
lines changed

13 files changed

+153
-30
lines changed

.exchange-rates.cache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1526050800,"base":"USD","rates":{"AED":3.673281,"AFN":70.710962,"ALL":106.38,"AMD":485.695,"ANG":1.795715,"AOA":231.4755,"ARS":23.1748,"AUD":1.325261,"AWG":1.791244,"AZN":1.7025,"BAM":1.638591,"BBD":2,"BDT":84.75795,"BGN":1.637434,"BHD":0.376964,"BIF":1781,"BMD":1,"BND":1.3209,"BOB":6.912769,"BRL":3.58416,"BSD":1,"BTC":0.000115593037,"BTN":67.304626,"BWP":9.895515,"BYN":2.007408,"BZD":2.010791,"CAD":1.278478,"CDF":1615,"CHF":0.999819,"CLF":0.02261,"CLP":618.14,"CNH":6.328126,"CNY":6.33218,"COP":2801.425,"CRC":566.695059,"CUC":1,"CUP":25.5,"CVE":92.3795,"CZK":21.342439,"DJF":177.75,"DKK":6.237574,"DOP":49.455,"DZD":115.516125,"EGP":17.7,"ERN":14.998767,"ETB":27.5,"EUR":0.837252,"FJD":2.091148,"FKP":0.737843,"GBP":0.737843,"GEL":2.443508,"GGP":0.737843,"GHS":4.53,"GIP":0.737843,"GMD":47.18,"GNF":9030,"GTQ":7.43045,"GYD":209.314534,"HKD":7.849701,"HNL":23.660322,"HRK":6.1871,"HTG":65.244838,"HUF":263.737692,"IDR":13971.725015,"ILS":3.566515,"IMP":0.737843,"INR":67.345,"IQD":1187.5,"IRR":37453.047379,"ISK":102.495,"JEP":0.737843,"JMD":125.24995,"JOD":0.709506,"JPY":109.37981667,"KES":100.395,"KGS":68.700944,"KHR":4061,"KMF":414.725,"KPW":900,"KRW":1068.315,"KWD":0.3015,"KYD":0.833677,"KZT":327.47765,"LAK":8340,"LBP":1513.65,"LKR":157.905232,"LRD":132.18915,"LSL":12.595,"LYD":1.355,"MAD":9.361773,"MDL":16.539963,"MGA":3240,"MKD":51.56,"MMK":1346.55,"MNT":2397.6995,"MOP":8.088592,"MRO":355.5,"MRU":35.7,"MUR":34.446516,"MVR":15.509851,"MWK":721.045,"MXN":19.312336,"MYR":3.99805,"MZN":60.189545,"NAD":12.585,"NGN":360.5,"NIO":31.285,"NOK":7.993116,"NPR":107.702558,"NZD":1.436022,"OMR":0.384975,"PAB":1,"PEN":3.266209,"PGK":3.28825,"PHP":52.45,"PKR":115.568,"PLN":3.568029,"PYG":5606.1,"QAR":3.640999,"RON":3.879955,"RSD":99,"RUB":61.701,"RWF":865,"SAR":3.75035,"SBD":7.80896,"SCR":13.45505,"SDG":18,"SEK":8.590022,"SGD":1.335489,"SHP":0.737843,"SLL":7786.788251,"SOS":575,"SRD":7.468,"SSP":130.2634,"STD":20574.369681,"STN":20.7,"SVC":8.75317,"SYP":514.92499,"SZL":12.401761,"THB":31.90625,"TJS":8.976386,"TMT":3.50998,"TND":2.490696,"TOP":2.218713,"TRY":4.304889,"TTD":6.74255,"TWD":29.7585,"TZS":2283.15,"UAH":26.2125,"UGX":3716.5,"USD":1,"UYU":28.99,"UZS":8055,"VEF":69900,"VND":22771.156217,"VUV":107.747276,"WST":2.544003,"XAF":549.200993,"XAG":0.05965172,"XAU":0.00075625,"XCD":2.70255,"XDR":0.698904,"XOF":549.200993,"XPD":0.00100104,"XPF":99.910682,"XPT":0.00108109,"YER":250.306642,"ZAR":12.25322,"ZMW":9.899,"ZWL":322.355011}}
1+
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1526050800,"base":"USD","rates":{"AED":3.673281,"AFN":70.710962,"ALL":106.38,"AMD":485.695,"ANG":1.795715,"AOA":231.4755,"ARS":23.1748,"AUD":1.325261,"AWG":1.791244,"AZN":1.7025,"BAM":1.638591,"BBD":2,"BDT":84.75795,"BGN":1.637434,"BHD":0.376964,"BIF":1781,"BMD":1,"BND":1.3209,"BOB":6.912769,"BRL":3.58416,"BSD":1,"BTC":0.000115593037,"BTN":67.304626,"BWP":9.895515,"BYN":2.007408,"BZD":2.010791,"CAD":1.278478,"CDF":1615,"CHF":0.999819,"CLF":0.02261,"CLP":618.14,"CNH":6.328126,"CNY":6.33218,"COP":2801.425,"CRC":566.695059,"CUC":1,"CUP":25.5,"CVE":92.3795,"CZK":21.342439,"DJF":177.75,"DKK":6.237574,"DOP":49.455,"DZD":115.516125,"EGP":17.7,"ERN":14.998767,"ETB":27.5,"EUR":0.837252,"FJD":2.091148,"FKP":0.737843,"GBP":0.737843,"GEL":2.443508,"GGP":0.737843,"GHS":4.53,"GIP":0.737843,"GMD":47.18,"GNF":9030,"GTQ":7.43045,"GYD":209.314534,"HKD":7.849701,"HNL":23.660322,"HRK":6.1871,"HTG":65.244838,"HUF":263.737692,"IDR":13971.725015,"ILS":3.566515,"IMP":0.737843,"INR":67.345,"IQD":1187.5,"IRR":37453.047379,"ISK":102.495,"JEP":0.737843,"JMD":125.24995,"JOD":0.709506,"JPY":109.37981667,"KES":100.395,"KGS":68.700944,"KHR":4061,"KMF":414.725,"KPW":900,"KRW":1068.315,"KWD":0.3015,"KYD":0.833677,"KZT":327.47765,"LAK":8340,"LBP":1513.65,"LKR":157.905232,"LRD":132.18915,"LSL":12.595,"LYD":1.355,"MAD":9.361773,"MDL":16.539963,"MGA":3240,"MKD":51.56,"MMK":1346.55,"MNT":2397.6995,"MOP":8.088592,"MRO":355.5,"MRU":35.7,"MUR":34.446516,"MVR":15.509851,"MWK":721.045,"MXN":19.312336,"MYR":3.99805,"MZN":60.189545,"NAD":12.585,"NGN":360.5,"NIO":31.285,"NOK":7.993116,"NPR":107.702558,"NZD":1.436022,"OMR":0.384975,"PAB":1,"PEN":3.266209,"PGK":3.28825,"PHP":52.45,"PKR":115.568,"PLN":3.568029,"PYG":5606.1,"QAR":3.640999,"RON":3.879955,"RSD":99,"RUB":61.701,"RWF":865,"SAR":3.75035,"SBD":7.80896,"SCR":13.45505,"SDG":18,"SEK":8.590022,"SGD":1.335489,"SHP":0.737843,"SLL":7786.788251,"SOS":575,"SRD":7.468,"SSP":130.2634,"STD":20574.369681,"STN":20.7,"SVC":8.75317,"SYP":514.92499,"SZL":12.401761,"THB":31.90625,"TJS":8.976386,"TMT":3.50998,"TND":2.490696,"TOP":2.218713,"TRY":4.304889,"TTD":6.74255,"TWD":29.7585,"TZS":2283.15,"UAH":26.2125,"UGX":3716.5,"USD":1,"UYU":28.99,"UZS":8055,"VEF":69900,"VND":22771.156217,"VUV":107.747276,"WST":2.544003,"XAF":549.200993,"XAG":0.05965172,"XAU":0.00075625,"XCD":2.70255,"XDR":0.698904,"XOF":549.200993,"XPD":0.00100104,"XPF":99.910682,"XPT":0.00108109,"YER":250.306642,"ZAR":12.25322,"ZMW":9.899,"ZWL":322.355011}}

__tests__/shared/components/challenge-listing/Sidebar/__snapshots__/Footer.jsx.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ exports[`Matches shallow shapshot 1`] = `
4848
<p
4949
className="src-shared-components-challenge-listing-Sidebar-Footer-___style__copyright___ghkHg"
5050
>
51-
Topcoder © 2017
51+
Topcoder ©
52+
2018
5253
</p>
5354
</div>
5455
`;

__tests__/shared/containers/__snapshots__/Leaderboard.jsx.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
exports[`Matches shapshot 1`] = `
44
<LeaderboardPageContainer
5+
HeadBanner={null}
56
apiUrl="http://www.mocky.io/v2/59098e60100000b60747c10b"
67
auth={null}
78
isLoadingLeaderboard={false}
Loading

src/shared/components/Dashboard/Announcement/index.jsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,7 @@ export default function Announcement({
8383
}}
8484
>
8585
{ preview ? <h1 styleName="previewLabel">Preview</h1> : null }
86-
<div
87-
style={{
88-
maxWidth: maxTextWidth,
89-
}}
90-
styleName="details"
91-
>
86+
<div styleName="details">
9287
<div
9388
onClick={() => switchShow(false)}
9489
onKeyPress={() => switchShow(false)}
@@ -100,14 +95,21 @@ export default function Announcement({
10095
{ type ? <div styleName="type">{type}</div> : null }
10196
<h1
10297
styleName="title"
103-
style={{ color: fontColor }}
98+
style={{
99+
color: fontColor,
100+
maxWidth: maxTextWidth,
101+
}}
104102
>
105103
{publicTitle || title}
106104
</h1>
107105
<div
108106
styleName="text"
109-
style={{ color: fontColor }}
110-
>{text}
107+
style={{
108+
color: fontColor,
109+
maxWidth: maxTextWidth,
110+
}}
111+
>
112+
{text}
111113
</div>
112114
{
113115
readMore ? (

src/shared/components/challenge-listing/Sidebar/Footer/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* and Topcoder copyright.
44
*/
55

6+
import moment from 'moment';
67
import PT from 'prop-types';
78
import React from 'react';
89
import { config } from 'topcoder-react-utils';
@@ -24,7 +25,7 @@ export default function Footer({
2425
</ul>
2526
)
2627
}
27-
<p styleName="copyright">Topcoder © 2017</p>
28+
<p styleName="copyright">Topcoder © {moment().year()}</p>
2829
</div>
2930
);
3031
}

src/shared/components/tc-communities/communities/wipro/ChallengeListingBanner/style.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import '~styles/mixins';
22

33
.container {
4-
background-position: 60% 0 !important;
4+
background-position: 0 0 !important;
55
height: 300px !important;
66
}
77

@@ -10,7 +10,7 @@
1010
bottom: -370px !important;
1111
min-height: 550px !important;
1212
height: 550px !important;
13-
left: -100px !important;
13+
left: -200px !important;
1414
overflow: visible !important;
1515
position: absolute !important;
1616
transform: none !important;
@@ -28,7 +28,7 @@
2828

2929
.contentInner {
3030
color: #fff !important;
31-
padding: 30px 0 0 100px !important;
31+
padding: 30px 0 0 200px !important;
3232
position: relative !important;
3333
width: 600px !important;
3434
z-index: 1 !important;
@@ -42,6 +42,7 @@ h2.title {
4242
display: block !important;
4343
font-family: 'Akkurat mono', monospace !important;
4444
font-size: 20px !important;
45+
font-weight: bold !important;
4546
line-height: 150% !important;
4647
padding-top: 5px !important;
4748
text-decoration: underline !important;

src/shared/components/tc-communities/communities/wipro/Home/themes/banner.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ h2.title {
3737
display: block !important;
3838
font-family: 'Akkurat mono', monospace !important;
3939
font-size: 20px !important;
40+
font-weight: bold !important;
4041
line-height: 150% !important;
4142
padding-top: 5px !important;
4243
text-decoration: underline !important;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import Banner from 'components/tc-communities/Banner';
2+
import React from 'react';
3+
4+
import bannerImage from
5+
'assets/images/communities/wipro/leaderboard/banner.jpg';
6+
7+
import bannerStyle from './style.scss';
8+
9+
export default function ChallengeListingBanner() {
10+
return (
11+
<Banner
12+
title="&nbsp;&nbsp;Rewards program"
13+
imageSrc={bannerImage}
14+
theme={bannerStyle}
15+
>
16+
<p>
17+
Rewards program is intended<br />to celebrate and recognize<br />your
18+
contribution.
19+
</p>
20+
</Banner>
21+
);
22+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
@import '~styles/mixins';
2+
3+
.container {
4+
background-position: 50% 0 !important;
5+
height: 300px !important;
6+
}
7+
8+
.content {
9+
border-radius: 100% !important;
10+
bottom: -150px !important;
11+
min-height: 550px !important;
12+
height: 550px !important;
13+
left: -250px !important;
14+
overflow: visible !important;
15+
position: absolute !important;
16+
transform: none !important;
17+
width: 550px !important;
18+
}
19+
20+
.contentBg {
21+
background: #ef3341 !important;
22+
position: absolute !important;
23+
border-radius: 100% !important;
24+
width: 550px !important;
25+
height: 550px !important;
26+
transform: none !important;
27+
}
28+
29+
.contentInner {
30+
color: #fff !important;
31+
padding: 150px 0 0 250px !important;
32+
position: relative !important;
33+
width: 600px !important;
34+
z-index: 1 !important;
35+
36+
@include xs-to-sm {
37+
text-align: left;
38+
}
39+
}
40+
41+
h2.title {
42+
color: yellow !important;
43+
display: block !important;
44+
font-family: 'Akkurat mono', monospace !important;
45+
font-size: 20px !important;
46+
font-weight: bold !important;
47+
line-height: 150% !important;
48+
padding-top: 5px !important;
49+
text-decoration: underline !important;
50+
text-transform: none !important;
51+
width: 300px !important;
52+
}
53+
54+
.contentInner p,
55+
.text {
56+
font-family: 'Akkurat regular', monospace !important;
57+
line-height: 20px !important;
58+
margin: 15px 60px 15px 25px !important;
59+
}
60+
61+
.linkWrap {
62+
display: none !important;
63+
position: absolute !important;
64+
left: 50% !important;
65+
top: 50px !important;
66+
67+
.link {
68+
background-color: $tc-dark-blue !important;
69+
}
70+
}

src/shared/containers/Leaderboard/index.jsx

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,25 @@ class LeaderboardPageContainer extends React.Component {
2323
}
2424

2525
render() {
26+
const { HeadBanner } = this.props;
2627
return (
2728
<div>
2829
{/* For demo we hardcode banner properties so we can disable max-len linting */}
2930
{/* eslint-disable max-len */}
30-
<Banner
31-
title="Leaderboard"
32-
text="Rewards program is intended to celebrate and recognize your contribution. Rewards for project contributions are given using ‘Reward Points’. Points earned translate into badges. Quarterly rewards are given away to the toppers of all categories."
33-
theme={{
34-
container: style.bannerContainer,
35-
content: style.bannerContent,
36-
contentInner: style.bannerContentInner,
37-
}}
38-
imageSrc="/community-app-assets/themes/wipro/leaderboard/banner.jpg"
39-
/>
31+
{
32+
HeadBanner ? <HeadBanner /> : (
33+
<Banner
34+
title="Leaderboard"
35+
text="Rewards program is intended to celebrate and recognize your contribution. Rewards for project contributions are given using ‘Reward Points’. Points earned translate into badges. Quarterly rewards are given away to the toppers of all categories."
36+
theme={{
37+
container: style.bannerContainer,
38+
content: style.bannerContent,
39+
contentInner: style.bannerContentInner,
40+
}}
41+
imageSrc="/community-app-assets/themes/wipro/leaderboard/banner.jpg"
42+
/>
43+
)
44+
}
4045
{/* eslint-enable max-len */}
4146
<div styleName="Leaderboard">
4247
<h2 styleName="section-title">Leaderboard</h2>
@@ -54,6 +59,7 @@ class LeaderboardPageContainer extends React.Component {
5459
}
5560

5661
LeaderboardPageContainer.defaultProps = {
62+
HeadBanner: null,
5763
leaderboardData: [],
5864
isLoadingLeaderboard: false,
5965
loadedApiUrl: null,
@@ -64,6 +70,7 @@ LeaderboardPageContainer.defaultProps = {
6470
};
6571

6672
LeaderboardPageContainer.propTypes = {
73+
HeadBanner: PT.func,
6774
leaderboardData: PT.arrayOf(PT.shape()),
6875
isLoadingLeaderboard: PT.bool,
6976
loadLeaderboard: PT.func.isRequired,

src/shared/routes/Communities/Leaderboard.jsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,33 @@ import PT from 'prop-types';
77
import React from 'react';
88
import { AppChunk } from 'topcoder-react-utils';
99

10-
export default function LeaderboardRoute({ meta }) {
10+
export default function LeaderboardRoute({
11+
HeadBanner,
12+
meta,
13+
}) {
1114
return (
1215
<AppChunk
1316
chunkName="leaderboard/chunk"
1417
renderClientAsync={() =>
1518
import(/* webpackChunkName: "leaderboard/chunk" */ 'containers/Leaderboard')
16-
.then(({ default: Leaderboard }) => (
17-
<Leaderboard apiUrl={meta.leaderboardApiUrl} />
18-
))
19+
.then(({ default: Leaderboard }) => (
20+
<Leaderboard
21+
apiUrl={meta.leaderboardApiUrl}
22+
HeadBanner={HeadBanner}
23+
/>
24+
))
1925
}
2026
renderPlaceholder={() => <LoadingIndicator />}
2127
/>
2228
);
2329
}
2430

31+
LeaderboardRoute.defaultProps = {
32+
HeadBanner: null,
33+
};
34+
2535
LeaderboardRoute.propTypes = {
36+
HeadBanner: PT.func,
2637
meta: PT.shape({
2738
leaderboardApiUrl: PT.string.isRequired,
2839
}).isRequired,

src/shared/routes/Communities/Wipro/Routes.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import FAQ from 'components/tc-communities/communities/wipro/FAQ';
1010
import Footer from 'components/tc-communities/communities/wipro/Footer';
1111
import Header from 'containers/tc-communities/Header';
1212
import Home from 'containers/tc-communities/wipro/Home';
13+
import LeaderboardBanner from 'components/tc-communities/communities/wipro/LeaderboardBanner';
1314
import Learn from 'components/tc-communities/communities/wipro/Learn';
1415
import PT from 'prop-types';
1516
import React from 'react';
@@ -79,7 +80,12 @@ export default function Wipro({ base, meta }) {
7980
path={`${base}/faq`}
8081
/>
8182
<Route
82-
component={() => <Leaderboard meta={meta} />}
83+
component={() => (
84+
<Leaderboard
85+
HeadBanner={LeaderboardBanner}
86+
meta={meta}
87+
/>
88+
)}
8389
exact
8490
path={`${base}/leaderboard`}
8591
/>

0 commit comments

Comments
 (0)