Skip to content

Commit 048c9d0

Browse files
committed
Update of heading banners at TopGear's Home and Challenges pages
Related to #828, but does make these banners Contenful yet.
1 parent 75fe164 commit 048c9d0

File tree

11 files changed

+146
-56
lines changed

11 files changed

+146
-56
lines changed

.exchange-rates.cache

+1-1
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":1523394000,"base":"USD","rates":{"AED":3.673014,"AFN":69.841474,"ALL":104.75,"AMD":480.835755,"ANG":1.78455,"AOA":217.689,"ARS":20.1498,"AUD":1.288598,"AWG":1.784998,"AZN":1.7025,"BAM":1.586412,"BBD":2,"BDT":82.949445,"BGN":1.583075,"BHD":0.376926,"BIF":1781,"BMD":1,"BND":1.30961,"BOB":6.910011,"BRL":3.409706,"BSD":1,"BTC":0.000146310823,"BTN":64.987163,"BWP":9.636446,"BYN":1.980564,"BZD":2.009463,"CAD":1.260319,"CDF":1615,"CHF":0.956855,"CLF":0.02201,"CLP":600.4,"CNH":6.277035,"CNY":6.283404,"COP":2771.5,"CRC":567.465,"CUC":1,"CUP":25.5,"CVE":89.875,"CZK":20.4789,"DJF":176.525,"DKK":6.026823,"DOP":49.42,"DZD":113.880333,"EGP":17.681,"ERN":14.996667,"ETB":27.55,"EUR":0.809323,"FJD":2.029692,"FKP":0.7055,"GBP":0.7055,"GEL":2.426152,"GGP":0.7055,"GHS":4.435,"GIP":0.7055,"GMD":47.26,"GNF":9025.5,"GTQ":7.415666,"GYD":207.14,"HKD":7.84958,"HNL":23.660322,"HRK":6.011264,"HTG":64.706641,"HUF":251.93,"IDR":13761.147095,"ILS":3.501903,"IMP":0.7055,"INR":64.935,"IQD":1187.5,"IRR":37639.02369,"ISK":98.34,"JEP":0.7055,"JMD":124.781797,"JOD":0.709503,"JPY":107.19263007,"KES":101.101,"KGS":68.275351,"KHR":4005,"KMF":398.6,"KPW":900,"KRW":1064.7,"KWD":0.29987,"KYD":0.833134,"KZT":321.06,"LAK":8310,"LBP":1515.55,"LKR":155.55,"LRD":131.715,"LSL":12.055,"LYD":1.330156,"MAD":9.1718,"MDL":16.451521,"MGA":3205,"MKD":49.83175,"MMK":1324.65,"MNT":2389.832694,"MOP":8.083019,"MRO":355.5,"MRU":35.47,"MUR":33.598,"MVR":15.404937,"MWK":722.08,"MXN":18.2659,"MYR":3.871619,"MZN":60.99,"NAD":12.0525,"NGN":360,"NIO":31.19,"NOK":7.79538,"NPR":103.969545,"NZD":1.35846,"OMR":0.384996,"PAB":1,"PEN":3.238763,"PGK":3.234,"PHP":51.815,"PKR":115.78,"PLN":3.389,"PYG":5534.25,"QAR":3.640999,"RON":3.76902,"RSD":95.68,"RUB":63.1649,"RWF":860,"SAR":3.7587,"SBD":7.806884,"SCR":13.455839,"SDG":18.156826,"SEK":8.30604,"SGD":1.309245,"SHP":0.7055,"SLL":7729.007735,"SOS":577,"SRD":7.468,"SSP":130.2634,"STD":19869.909179,"STN":19.97,"SVC":8.747525,"SYP":514.98999,"SZL":12.06,"THB":31.195,"TJS":8.796594,"TMT":3.504988,"TND":2.390312,"TOP":2.225182,"TRY":4.112305,"TTD":6.728287,"TWD":29.192046,"TZS":2262.95,"UAH":25.926,"UGX":3691.5,"USD":1,"UYU":28.293384,"UZS":8115,"VEF":40241.5117,"VND":22788.26534,"VUV":106.192164,"WST":2.516171,"XAF":530.881357,"XAG":0.06034587,"XAU":0.00074582,"XCD":2.70255,"XDR":0.687937,"XOF":530.881357,"XPD":0.00105153,"XPF":96.577973,"XPT":0.00107644,"YER":250.3,"ZAR":12.0381,"ZMW":9.394379,"ZWL":322.355011}}
1+
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1524848400,"base":"USD","rates":{"AED":3.673018,"AFN":70.25,"ALL":106.46,"AMD":481.102877,"ANG":1.785163,"AOA":224.946,"ARS":20.5807,"AUD":1.32129,"AWG":1.7875,"AZN":1.7025,"BAM":1.5941,"BBD":2,"BDT":84.618291,"BGN":1.616084,"BHD":0.3771,"BIF":1780,"BMD":1,"BND":1.324775,"BOB":6.910011,"BRL":3.467323,"BSD":1,"BTC":0.000107776093,"BTN":66.743573,"BWP":9.828901,"BYN":2.005657,"BZD":2.010232,"CAD":1.285461,"CDF":1615,"CHF":0.988129,"CLF":0.02225,"CLP":607.5,"CNH":6.320693,"CNY":6.3375,"COP":2811.095,"CRC":565.395217,"CUC":1,"CUP":25.5,"CVE":91.4,"CZK":21.03673,"DJF":176.875,"DKK":6.15164,"DOP":49.585,"DZD":114.9585,"EGP":17.6994,"ERN":14.996667,"ETB":27.52,"EUR":0.825648,"FJD":2.055151,"FKP":0.725855,"GBP":0.725855,"GEL":2.457052,"GGP":0.725855,"GHS":4.465,"GIP":0.725855,"GMD":47.1,"GNF":9020,"GTQ":7.41557,"GYD":207.601477,"HKD":7.84795,"HNL":23.649727,"HRK":6.122656,"HTG":64.69844,"HUF":258.298745,"IDR":13853.313762,"ILS":3.58549,"IMP":0.725855,"INR":66.6398,"IQD":1188,"IRR":37453.047379,"ISK":101.23,"JEP":0.725855,"JMD":124.51745,"JOD":0.709506,"JPY":109.08621429,"KES":100.4,"KGS":68.47735,"KHR":4032,"KMF":406.85,"KPW":900,"KRW":1067.87,"KWD":0.300967,"KYD":0.833387,"KZT":327.53,"LAK":8330,"LBP":1513.5,"LKR":157.656203,"LRD":131.05625,"LSL":12.345,"LYD":1.33,"MAD":9.279812,"MDL":16.570111,"MGA":3230,"MKD":50.83,"MMK":1344.1,"MNT":2393.666027,"MOP":8.084589,"MRO":356,"MRU":35.55,"MUR":34.106,"MVR":15.450233,"MWK":725.125,"MXN":18.705725,"MYR":3.919495,"MZN":59.68419,"NAD":12.37125,"NGN":360.5,"NIO":31.25,"NOK":7.973709,"NPR":106.789797,"NZD":1.413747,"OMR":0.384986,"PAB":1,"PEN":3.241547,"PGK":3.26,"PHP":51.631,"PKR":115.6,"PLN":3.48306,"PYG":5551.05,"QAR":3.641539,"RON":3.8513,"RSD":97.561,"RUB":62.0917,"RWF":863.5,"SAR":3.7502,"SBD":7.780934,"SCR":13.45743,"SDG":18.01,"SEK":8.682833,"SGD":1.32438,"SHP":0.725855,"SLL":7749.007735,"SOS":577.5,"SRD":7.468,"SSP":130.2634,"STD":20067.208984,"STN":20.33,"SVC":8.750818,"SYP":514.98999,"SZL":12.365,"THB":31.532,"TJS":8.891285,"TMT":3.50998,"TND":2.429904,"TOP":2.210732,"TRY":4.052298,"TTD":6.782017,"TWD":29.5525,"TZS":2283.4,"UAH":26.2325,"UGX":3711.85,"USD":1,"UYU":28.434073,"UZS":8075,"VEF":66870,"VND":22766.76534,"VUV":106.018831,"WST":2.553638,"XAF":541.589359,"XAG":0.06077374,"XAU":0.0007565,"XCD":2.70255,"XDR":0.695509,"XOF":541.589359,"XPD":0.00102937,"XPF":98.525973,"XPT":0.0010947,"YER":250.275,"ZAR":12.370468,"ZMW":9.780409,"ZWL":322.355011}}
Loading
Loading

src/shared/components/tc-communities/ChallengesBlock/Card/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default function Card({
7373
<div
7474
styleName="prizes"
7575
>
76-
Prizes: {challenge.prizes.map(x => `$${x}`).join('\u00a0/ ')}
76+
Prizes: {(challenge.prizes || []).map(x => `$${x}`).join('\u00a0/ ')}
7777
</div>
7878
</div>
7979
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import Banner from 'components/tc-communities/Banner';
2+
import React from 'react';
3+
4+
import bannerImage from
5+
'assets/images/communities/wipro/challenges/banner.jpg';
6+
7+
import bannerStyle from './style.scss';
8+
9+
export default function ChallengeListingBanner() {
10+
return (
11+
<Banner
12+
title="&nbsp;&nbsp;Amazing platform &nbsp;&nbsp;of&nbsp;design, development &nbsp;&nbsp;and&nbsp;test challenges"
13+
imageSrc={bannerImage}
14+
theme={bannerStyle}
15+
>
16+
<p>
17+
Compete and walk away with cash prizes!
18+
</p>
19+
</Banner>
20+
);
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
@import '~styles/mixins';
2+
3+
.container {
4+
background-position: 60% 0 !important;
5+
height: 300px !important;
6+
}
7+
8+
.content {
9+
border-radius: 100% !important;
10+
bottom: -370px !important;
11+
min-height: 550px !important;
12+
height: 550px !important;
13+
left: -100px !important;
14+
overflow: visible !important;
15+
position: absolute !important;
16+
transform: none !important;
17+
width: 550px !important;
18+
}
19+
20+
.contentBg {
21+
background: rgba(0, 10, 50, 0.8) !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: 30px 0 0 100px !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+
display: block !important;
43+
font-family: 'Akkurat mono', monospace !important;
44+
font-size: 20px !important;
45+
line-height: 150% !important;
46+
padding-top: 5px !important;
47+
text-decoration: underline !important;
48+
text-transform: none !important;
49+
width: 300px !important;
50+
}
51+
52+
.contentInner p,
53+
.text {
54+
font-family: 'Akkurat regular', monospace !important;
55+
line-height: 20px !important;
56+
margin: 15px 60px 15px 25px !important;
57+
}
58+
59+
.linkWrap {
60+
display: none !important;
61+
position: absolute !important;
62+
left: 50% !important;
63+
top: 50px !important;
64+
65+
.link {
66+
background-color: $tc-dark-blue !important;
67+
}
68+
}

src/shared/components/tc-communities/communities/wipro/Home/index.jsx

+6-9
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,17 @@ export default function Home(props) {
120120
return (
121121
<main>
122122
<Banner
123-
title="Wipro crowd"
124-
link={{
125-
title: 'Compete Now',
126-
url: 'challenges',
127-
}}
123+
title="Deliver your project&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;requirements faster&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;through crowdsourcing&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"
128124
imageSrc={bannerImage}
129125
theme={bannerStyle}
130126
>
131127
<p>
132-
Compete & win in fun and exciting challenges and join the community
133-
of winners!
128+
Tap into the Wipro global/account expert pool for your project
129+
requirements.
134130
</p>
135-
<p styleName="style.banner-highlighted-text">
136-
Nova Challenge Series on <span styleName="style.banner-highlighted-text-2">topgear.topcoder.com</span>
131+
<p>
132+
Engage TopGear for bringing in velocity, additional bandwidth and
133+
capability to meet your project requirements.
137134
</p>
138135
</Banner>
139136

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

+21-31
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,60 @@
22

33
.container {
44
background-position: 60% 0 !important;
5-
6-
@include xs-to-sm {
7-
background-position: 30% 0 !important;
8-
height: 470px !important;
9-
}
5+
height: 300px !important;
106
}
117

128
.content {
139
border-radius: 100% !important;
14-
bottom: 0 !important;
15-
height: 450px !important;
16-
left: 0 !important;
10+
top: -180px !important;
11+
height: 600px !important;
12+
right: -140px !important;
1713
overflow: visible !important;
1814
position: absolute !important;
19-
top: 55% !important;
2015
transform: none !important;
21-
width: 450px !important;
16+
width: 600px !important;
2217
}
2318

2419
.contentBg {
25-
background: #eb3747 !important;
20+
background: #70c052 !important;
2621
position: absolute !important;
27-
bottom: -135px !important;
28-
left: -30px !important;
2922
border-radius: 100% !important;
30-
width: 450px !important;
31-
height: 450px !important;
23+
width: 600px !important;
24+
height: 600px !important;
3225
transform: none !important;
33-
34-
@include xs-to-sm {
35-
left: -30px !important;
36-
transform: none !important;
37-
}
3826
}
3927

4028
.contentInner {
4129
color: #fff !important;
42-
padding: 76px 0 !important;
30+
padding: 200px 0 0 50px !important;
4331
position: relative !important;
32+
width: 500px !important;
4433
z-index: 1 !important;
45-
46-
@include xs-to-sm {
47-
padding: 76px 0 !important;
48-
text-align: left !important;
49-
}
5034
}
5135

5236
h2.title {
53-
border-bottom: 2px solid white !important;
5437
display: block !important;
5538
font-family: 'Akkurat mono', monospace !important;
5639
font-size: 20px !important;
57-
line-height: 100% !important;
58-
padding-left: 30px !important;
40+
line-height: 150% !important;
5941
padding-top: 5px !important;
42+
text-decoration: underline !important;
6043
text-transform: none !important;
61-
width: 167px !important;
44+
45+
@include xs-to-sm {
46+
text-align: left !important;
47+
}
6248
}
6349

6450
.contentInner p,
6551
.text {
6652
font-family: 'Akkurat regular', monospace !important;
6753
line-height: 20px !important;
68-
margin: 12px 60px 12px 30px !important;
54+
margin: 15px 60px 15px 0 !important;
55+
56+
@include xs-to-sm {
57+
text-align: left !important;
58+
}
6959
}
7060

7161
.linkWrap {

src/shared/containers/challenge-listing/Listing/index.jsx

+22-14
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export class ListingContainer extends React.Component {
137137
allPastChallengesLoaded,
138138
allReviewOpportunitiesLoaded,
139139
activeBucket,
140+
ChallengeListingBanner,
140141
challenges,
141142
challengesUrl,
142143
challengeSubtracks,
@@ -200,6 +201,24 @@ export class ListingContainer extends React.Component {
200201

201202
const description = 'Join Topcoder and compete in these challenges, to learn and earn!';
202203

204+
let banner;
205+
if (!listingOnly) {
206+
banner = ChallengeListingBanner ? (
207+
<ChallengeListingBanner />
208+
) : (
209+
<Banner
210+
title="Challenges"
211+
text="Browse our available challenges and compete."
212+
theme={{
213+
container: style.bannerContainer,
214+
content: style.bannerContent,
215+
contentInner: style.bannerContentInner,
216+
}}
217+
imageSrc="/community-app-assets/themes/wipro/challenges/banner.jpg"
218+
/>
219+
);
220+
}
221+
203222
return (
204223
<div styleName="container">
205224
<MetaTags
@@ -208,20 +227,7 @@ export class ListingContainer extends React.Component {
208227
siteName="Topcoder"
209228
title={this.props.communityId ? `${this.props.communityName} Challenges` : SEO_PAGE_TITLE}
210229
/>
211-
{ /* TODO: This banner should be moved out of here! */ }
212-
{ !listingOnly ? (
213-
<Banner
214-
title="Challenges"
215-
text="Browse our available challenges and compete."
216-
theme={{
217-
container: style.bannerContainer,
218-
content: style.bannerContent,
219-
contentInner: style.bannerContentInner,
220-
}}
221-
imageSrc="/community-app-assets/themes/wipro/challenges/banner.jpg"
222-
/>
223-
) : null
224-
}
230+
{banner}
225231
<ChallengeListing
226232
activeBucket={activeBucket}
227233
challenges={challenges}
@@ -281,6 +287,7 @@ export class ListingContainer extends React.Component {
281287
}
282288

283289
ListingContainer.defaultProps = {
290+
ChallengeListingBanner: null,
284291
defaultCommunityId: '',
285292
extraBucket: null,
286293
hideSrm: false,
@@ -307,6 +314,7 @@ ListingContainer.propTypes = {
307314
allDraftChallengesLoaded: PT.bool.isRequired,
308315
allPastChallengesLoaded: PT.bool.isRequired,
309316
allReviewOpportunitiesLoaded: PT.bool.isRequired,
317+
ChallengeListingBanner: PT.node,
310318
challenges: PT.arrayOf(PT.shape({})).isRequired,
311319
challengesUrl: PT.string,
312320
challengeSubtracks: PT.arrayOf(PT.shape()).isRequired,

src/shared/routes/Communities/ChallengeListing.jsx

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import React from 'react';
1010
import { SplitRoute } from 'utils/router';
1111

1212
export default function ChallengeListingRoute({
13+
ChallengeListingBanner,
1314
challengesUrl,
1415
extraBucket,
1516
hideSrm,
@@ -41,6 +42,7 @@ export default function ChallengeListingRoute({
4142
return (
4243
<ChallengeListing
4344
{...routeProps}
45+
ChallengeListingBanner={ChallengeListingBanner}
4446
challengesUrl={challengesUrl}
4547
communityId={communityId}
4648
communityName={meta.communityName}
@@ -70,6 +72,7 @@ export default function ChallengeListingRoute({
7072
}
7173

7274
ChallengeListingRoute.defaultProps = {
75+
ChallengeListingBanner: null,
7376
challengesUrl: '/challenges',
7477
extraBucket: null,
7578
hideSrm: false,
@@ -79,6 +82,7 @@ ChallengeListingRoute.defaultProps = {
7982
};
8083

8184
ChallengeListingRoute.propTypes = {
85+
ChallengeListingBanner: PT.node,
8286
challengesUrl: PT.string,
8387
extraBucket: PT.string,
8488
hideSrm: PT.bool,

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

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import ChallengeDetails from 'routes/ChallengeDetails';
66
import ChallengeListing from 'routes/Communities/ChallengeListing';
7+
import ChallengeListingBanner from 'components/tc-communities/communities/wipro/ChallengeListingBanner';
78
import Error404 from 'components/Error404';
89
import FAQ from 'components/tc-communities/communities/wipro/FAQ';
910
import Footer from 'components/tc-communities/communities/wipro/Footer';
@@ -35,6 +36,7 @@ export default function Wipro({ base, meta }) {
3536
<Route
3637
component={() => ChallengeListing({
3738
challengesUrl: `${base}/challenges`,
39+
ChallengeListingBanner,
3840
meta,
3941
newChallengeDetails: true,
4042
})}

0 commit comments

Comments
 (0)