Skip to content

Commit 9a8b7bb

Browse files
committed
Contentful banners are wired to TopGear pages
1 parent a95bcd1 commit 9a8b7bb

File tree

15 files changed

+69
-276
lines changed

15 files changed

+69
-276
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":1526241600,"base":"USD","rates":{"AED":3.672956,"AFN":70.6075,"ALL":106.120845,"AMD":484.582419,"ANG":1.792089,"AOA":230.9215,"ARS":23.0045,"AUD":1.324651,"AWG":1.792496,"AZN":1.7025,"BAM":1.635248,"BBD":2,"BDT":84.57175,"BGN":1.637485,"BHD":0.376492,"BIF":1758.95,"BMD":1,"BND":1.330798,"BOB":6.898532,"BRL":3.604331,"BSD":1,"BTC":0.0001158352,"BTN":67.170104,"BWP":9.787973,"BYN":1.997751,"BZD":2.006694,"CAD":1.278221,"CDF":1616,"CHF":0.999845,"CLF":0.02263,"CLP":621.975,"CNH":6.33423,"CNY":6.335,"COP":2821.45,"CRC":565.352717,"CUC":1,"CUP":25.5,"CVE":92.65,"CZK":21.335267,"DJF":177.875,"DKK":6.235672,"DOP":49.502935,"DZD":115.523,"EGP":17.6925,"ERN":14.999067,"ETB":27.473827,"EUR":0.836995,"FJD":2.063653,"FKP":0.73828,"GBP":0.73828,"GEL":2.44445,"GGP":0.73828,"GHS":4.538467,"GIP":0.73828,"GMD":47.17,"GNF":9011.65,"GTQ":7.415301,"GYD":208.883026,"HKD":7.84968,"HNL":23.70619,"HRK":6.1836,"HTG":65.114603,"HUF":263.915,"IDR":13956.3575,"ILS":3.56775,"IMP":0.73828,"INR":67.3605,"IQD":1191.25,"IRR":42019.086667,"ISK":102.30123,"JEP":0.73828,"JMD":124.96726,"JOD":0.709503,"JPY":109.32868566,"KES":100.306647,"KGS":68.657499,"KHR":4049.3,"KMF":413.45,"KPW":900,"KRW":1067.55,"KWD":0.30114,"KYD":0.831981,"KZT":327.327082,"LAK":8314.8,"LBP":1507.537443,"LKR":157.648101,"LRD":132.194575,"LSL":12.254913,"LYD":1.352701,"MAD":9.346284,"MDL":16.5125,"MGA":3234.7,"MKD":51.57,"MMK":1343.8,"MNT":2397.583333,"MOP":8.072177,"MRO":355.5,"MRU":35.7,"MUR":34.42325,"MVR":15.509851,"MWK":724.760367,"MXN":19.41937,"MYR":3.95052,"MZN":60.319248,"NAD":12.254913,"NGN":359.41,"NIO":31.284492,"NOK":8.000005,"NPR":107.47925,"NZD":1.4349,"OMR":0.384405,"PAB":1,"PEN":3.262254,"PGK":3.281553,"PHP":52.424643,"PKR":115.606195,"PLN":3.568061,"PYG":5594.7,"QAR":3.63505,"RON":3.880422,"RSD":98.926426,"RUB":61.97895,"RWF":866.733459,"SAR":3.75035,"SBD":7.83867,"SCR":13.435,"SDG":18.037059,"SEK":8.59263,"SGD":1.335131,"SHP":0.73828,"SLL":7787.5,"SOS":576.933119,"SRD":7.468,"SSP":130.2634,"STD":20516.09961,"STN":20.55,"SVC":8.735315,"SYP":514.94499,"SZL":12.25647,"THB":31.9055,"TJS":8.958193,"TMT":3.50998,"TND":2.488902,"TOP":2.218713,"TRY":4.310572,"TTD":6.728889,"TWD":29.684,"TZS":2278.25,"UAH":26.159709,"UGX":3708.9,"USD":1,"UYU":29.988815,"UZS":8046,"VEF":69915,"VND":22768.6525,"VUV":107.760001,"WST":2.554433,"XAF":549.032729,"XAG":0.05999529,"XAU":0.0007586,"XCD":2.70255,"XDR":0.698904,"XOF":549.032729,"XPD":0.0010057,"XPF":99.880072,"XPT":0.00108225,"YER":250.25,"ZAR":12.269035,"ZMW":9.878736,"ZWL":322.355011}}
1+
{"disclaimer":"Usage subject to terms: https://openexchangerates.org/terms","license":"https://openexchangerates.org/license","timestamp":1526288400,"base":"USD","rates":{"AED":3.673097,"AFN":70.6555,"ALL":106.155845,"AMD":485.278394,"ANG":1.793103,"AOA":230.9215,"ARS":23.01,"AUD":1.32506,"AWG":1.792496,"AZN":1.7025,"BAM":1.636346,"BBD":2,"BDT":84.636041,"BGN":1.6362,"BHD":0.377163,"BIF":1757.538054,"BMD":1,"BND":1.3317,"BOB":6.903239,"BRL":3.59915,"BSD":1,"BTC":0.000118447452,"BTN":67.192106,"BWP":9.793725,"BYN":1.999105,"BZD":2.008054,"CAD":1.277461,"CDF":1613.322925,"CHF":0.999014,"CLF":0.02263,"CLP":622.4,"CNH":6.330216,"CNY":6.3335,"COP":2823.35,"CRC":566.285059,"CUC":1,"CUP":25.5,"CVE":92.65,"CZK":21.2624,"DJF":177.875,"DKK":6.215882,"DOP":49.537915,"DZD":115.371545,"EGP":17.8213,"ERN":15.0003,"ETB":27.489379,"EUR":0.834407,"FJD":2.092548,"FKP":0.735958,"GBP":0.735958,"GEL":2.442467,"GGP":0.735958,"GHS":4.541563,"GIP":0.735958,"GMD":47.17,"GNF":9017.8,"GTQ":7.420059,"GYD":209.056129,"HKD":7.849881,"HNL":23.718815,"HRK":6.157399,"HTG":65.158071,"HUF":262.989333,"IDR":13971.903325,"ILS":3.57397,"IMP":0.735958,"INR":67.455,"IQD":1191.625723,"IRR":42022.25451,"ISK":101.97,"JEP":0.735958,"JMD":125.080418,"JOD":0.709302,"JPY":109.54628125,"KES":100.3505,"KGS":68.657499,"KHR":4067.716667,"KMF":413.340098,"KPW":900,"KRW":1068.03,"KWD":0.301561,"KYD":0.832538,"KZT":327.437082,"LAK":8320.45,"LBP":1508.062443,"LKR":157.767616,"LRD":132.194575,"LSL":12.262429,"LYD":1.353613,"MAD":9.343639,"MDL":16.519464,"MGA":3258.234946,"MKD":51.325,"MMK":1348.149087,"MNT":2398.25,"MOP":8.077536,"MRO":355.5,"MRU":35.7,"MUR":34.4025,"MVR":15.509851,"MWK":724.975367,"MXN":19.33384,"MYR":3.94353,"MZN":60.190699,"NAD":12.262429,"NGN":359.703899,"NIO":31.304787,"NOK":7.987363,"NPR":107.537394,"NZD":1.438528,"OMR":0.38501,"PAB":1,"PEN":3.264445,"PGK":3.28381,"PHP":52.39,"PKR":115.646195,"PLN":3.556005,"PYG":5598.45,"QAR":3.6376,"RON":3.863314,"RSD":98.607808,"RUB":61.804,"RWF":867.028459,"SAR":3.750245,"SBD":7.83904,"SCR":13.4555,"SDG":18.047192,"SEK":8.582513,"SGD":1.332148,"SHP":0.735958,"SLL":7702.650584,"SOS":577.046453,"SRD":7.468,"SSP":130.2634,"STD":20487.974004,"STN":20.55,"SVC":8.741296,"SYP":515.00499,"SZL":12.264844,"THB":31.803,"TJS":8.96425,"TMT":3.50998,"TND":2.485597,"TOP":2.268754,"TRY":4.323958,"TTD":6.733564,"TWD":29.758,"TZS":2276.750904,"UAH":26.175987,"UGX":3711.35,"USD":1,"UYU":30.033862,"UZS":8051.45,"VEF":69915,"VND":22767.59281,"VUV":107.760201,"WST":2.557217,"XAF":547.334811,"XAG":0.05987853,"XAU":0.000757,"XCD":2.70255,"XDR":0.698904,"XOF":547.334811,"XPD":0.00100506,"XPF":99.571186,"XPT":0.00107936,"YER":250.281642,"ZAR":12.258449,"ZMW":9.885504,"ZWL":322.355011}}

__tests__/shared/components/__snapshots__/Content.jsx.snap

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,21 @@ exports[`Matches shallow shapshot 1`] = `
403403
</Link>
404404
</li>
405405
</ul>
406+
<h3>
407+
Previews of Contentful Components
408+
</h3>
409+
<ul>
410+
<li>
411+
<Link
412+
replace={false}
413+
to="/examples/contentful/banner/5il6oFtWp2Ua6WGs60M2mK"
414+
>
415+
<code>
416+
Banner
417+
</code>
418+
</Link>
419+
</li>
420+
</ul>
406421
<h3>
407422
Sandbox
408423
</h3>
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/shared/components/Contentful/Banner/themes/top_gear.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
.content {
22
font-family: "Akkurat mono", monospace;
3+
line-height: 150%;
34

45
h1 {
56
font: bold 20px/150% "Akkurat mono", monospace;
67
text-decoration: underline;
78
}
9+
10+
p { margin: 10px 0; }
811
}
912

1013
.contentWrapper {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Banner from 'components/Contentful/Banner';
2+
import ContentfulLoader from 'containers/ContentfulLoader';
3+
import LoadingIndicator from 'components/LoadingIndicator';
4+
import React from 'react';
5+
6+
export default function ChallengeListingBanner() {
7+
return (
8+
<ContentfulLoader
9+
entryQueries={{
10+
content_type: 'banner',
11+
'fields.name': 'TopGear - Challenge Listing - Banner',
12+
}}
13+
render={d => d.entries.matches[0].items.map(id => <Banner id={id} />)}
14+
renderPlaceholder={LoadingIndicator}
15+
/>
16+
);
17+
}

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

Lines changed: 0 additions & 21 deletions
This file was deleted.

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

Lines changed: 0 additions & 69 deletions
This file was deleted.

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

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
* thus we disable max-len eslint rule for this file
66
*/
77

8+
import Banner from 'components/Contentful/Banner';
9+
import ContentfulLoader from 'containers/ContentfulLoader';
810
import React from 'react';
911
import Section from 'components/tc-communities/Section';
10-
import Banner from 'components/tc-communities/Banner';
1112
import ImageText from 'components/tc-communities/ImageText';
13+
import LoadingIndicator from 'components/LoadingIndicator';
1214
/*
1315
import ResourceCard from 'components/tc-communities/ResourceCard';
1416
import NewsletterSignup from 'components/tc-communities/NewsletterSignup';
@@ -25,16 +27,13 @@ import PT from 'prop-types';
2527
import JoinCommunity from 'containers/tc-communities/JoinCommunity';
2628
import CommunityStats from 'containers/tc-communities/CommunityStats';
2729

28-
import bannerImage from 'assets/images/communities/wipro/home/banner.jpg';
29-
3030
/*
3131
import IconRocket from '../../../../../../assets/images/tc-communities/rocket.svg';
3232
import IconNetwork from '../../../../../../assets/images/tc-communities/network.svg';
3333
import IconMedal from '../../../../../../assets/images/tc-communities/medal.svg';
3434
*/
3535

3636
import style from './style.scss';
37-
import bannerStyle from './themes/banner.scss';
3837
import IconStatStyles from './themes/IconStatStyles.scss';
3938
// import NewsletterSignupStyle from './themes/newsletter_signup.scss';
4039
import ImageTextStyles from './themes/imageTextStyle.scss';
@@ -118,20 +117,14 @@ export default function Home(props) {
118117

119118
return (
120119
<main>
121-
<Banner
122-
title="Deliver your project&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;requirements faster&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;through crowdsourcing&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"
123-
imageSrc={bannerImage}
124-
theme={bannerStyle}
125-
>
126-
<p>
127-
Tap into the Wipro global/account expert pool for your project
128-
requirements.
129-
</p>
130-
<p>
131-
Engage TopGear for bringing in velocity, additional bandwidth and
132-
capability to meet your project requirements.
133-
</p>
134-
</Banner>
120+
<ContentfulLoader
121+
entryQueries={{
122+
content_type: 'banner',
123+
'fields.name': 'TopGear - Home - Banner',
124+
}}
125+
render={d => d.entries.matches[0].items.map(id => <Banner id={id} />)}
126+
renderPlaceholder={LoadingIndicator}
127+
/>
135128

136129
<CommunityStats theme={IconStatStyles} icons={COMMUNITY_STATS_ICONS} />
137130

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

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import Banner from 'components/Contentful/Banner';
2+
import ContentfulLoader from 'containers/ContentfulLoader';
3+
import LoadingIndicator from 'components/LoadingIndicator';
4+
import React from 'react';
5+
6+
export default function ChallengeListingBanner() {
7+
return (
8+
<ContentfulLoader
9+
entryQueries={{
10+
content_type: 'banner',
11+
'fields.name': 'TopGear - Leaderboard - Banner',
12+
}}
13+
render={d => d.entries.matches[0].items.map(id => <Banner id={id} />)}
14+
renderPlaceholder={LoadingIndicator}
15+
/>
16+
);
17+
}

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

Lines changed: 0 additions & 22 deletions
This file was deleted.

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

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)