Skip to content

Commit ee41a5f

Browse files
authored
Merge pull request #84 from topcoder-platform/develop
Adding another community
2 parents caf0a5c + c41c956 commit ee41a5f

File tree

24 files changed

+493
-0
lines changed

24 files changed

+493
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ exports[`Matches shallow shapshot 1`] = `
226226
</Link>
227227
.
228228
</li>
229+
<li>
230+
<Link
231+
replace={false}
232+
to="/community/community-2/home"
233+
>
234+
Community 2
235+
</Link>
236+
</li>
229237
</ul>
230238
<h3>
231239
Misc Examples
Loading
234 KB
Loading
Loading
Loading
16.1 KB
Loading
Loading
23.4 KB
Loading
Loading
85.2 KB
Loading
Loading
Loading
Loading
Lines changed: 29 additions & 0 deletions
Loading
80.2 KB
Loading
6.76 KB
Loading
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"authorizedGroupIds": [
3+
"20000002"
4+
],
5+
"challengeGroupId": "20000002",
6+
"challengeFilterTag": "",
7+
"communityId": "community-2",
8+
"communityName": "Community 2",
9+
"communitySelector": [{
10+
"label": "Community 2",
11+
"value": "1"
12+
}, {
13+
"label": "Cognitive Community",
14+
"redirect": "http://cognitive.topcoder.com/",
15+
"value": "2"
16+
}, {
17+
"label": "iOS Community",
18+
"redirect": "https://ios.topcoder.com/",
19+
"value": "3"
20+
}],
21+
"leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/",
22+
"logos": [
23+
"/themes/community-2/wipro-logo.png",
24+
"/themes/community-2/logo_topcoder_with_name.svg"
25+
],
26+
"menuItems": [
27+
{
28+
"title": "Home",
29+
"url": "."
30+
}, {
31+
"title": "Learn",
32+
"url": "learn"
33+
}, {
34+
"title": "Challenges",
35+
"url": "challenges"
36+
}, {
37+
"title": "Leaderboard",
38+
"url": "leaderboard"
39+
}
40+
],
41+
"newsFeed": "http://www.topcoder.com/feed"
42+
}

src/shared/components/examples/Content/index.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ export default function Content() {
102102
There is also an example of <Link to="/community/wipro/404">non-existent community
103103
page</Link>.
104104
</li>
105+
<li>
106+
<Link to="/community/community-2/home">Community 2</Link>
107+
</li>
105108
</ul>
106109
<h3>Misc Examples</h3>
107110
<ul>
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/**
2+
* Static implementation of Home page for a community
3+
*
4+
* It hardcodes data which is passed to dummy components,
5+
* thus we disable max-len eslint rule for this file
6+
*/
7+
/* eslint-disable max-len */
8+
9+
import React from 'react';
10+
import Section from 'components/tc-communities/Section';
11+
import Banner from 'components/tc-communities/Banner';
12+
import ImageText from 'components/tc-communities/ImageText';
13+
import ResourceCard from 'components/tc-communities/ResourceCard';
14+
import NewsletterSignup from 'components/tc-communities/NewsletterSignup';
15+
import NewsSection from 'components/tc-communities/NewsSection';
16+
import PT from 'prop-types';
17+
18+
import GroupStats from 'containers/tc-communities/GroupStats';
19+
import JoinCommunity from 'containers/tc-communities/JoinCommunity';
20+
21+
import IconRocket from '../../../../../../assets/images/tc-communities/rocket.svg';
22+
import IconNetwork from '../../../../../../assets/images/tc-communities/network.svg';
23+
import IconMedal from '../../../../../../assets/images/tc-communities/medal.svg';
24+
25+
import style from './style.scss';
26+
27+
export default function Home(props) {
28+
return (
29+
<main>
30+
<Banner
31+
title="Community 2"
32+
text="BAE's Hybrid Crowd gives our vast ecosystem of customers and partners options to access new range of skills that provide new value services and efficiency options all over the world."
33+
link={{
34+
title: 'Compete Now',
35+
url: 'challenges',
36+
}}
37+
imageSrc="/themes/community-2/home/banner.jpg"
38+
/>
39+
40+
<GroupStats />
41+
42+
<JoinCommunity />
43+
44+
<Section
45+
theme={{
46+
container: style.linksContainer,
47+
}}
48+
>
49+
<div>
50+
<ImageText
51+
title="Improve Your Skills"
52+
text="Our continuously evolving structured learning paths, constantly abreast of the latest, tailored for employees to deepen your knowledge, infuses important software capabilities that are industry specific and help you get the skills you need to succeed."
53+
link={{
54+
title: 'Start Learning',
55+
url: 'learn',
56+
}}
57+
imageSrc="/themes/community-2/home/image-text-learn.jpg"
58+
/>
59+
<ImageText
60+
title="Get Involved"
61+
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."
62+
link={{
63+
title: 'Start Earning',
64+
url: 'challenges',
65+
}}
66+
imageSrc="/themes/community-2/home/image-text-do.jpg"
67+
/>
68+
</div>
69+
</Section>
70+
71+
<Section
72+
theme={{
73+
container: style.resourcesContainer,
74+
}}
75+
>
76+
<ResourceCard
77+
icon={IconNetwork}
78+
title="Up Your iOS and Swift Development Skills"
79+
text="Pellentesque non dignissim neque. Nunc vel rhoncus nibh, ut tincidunt turpis. Integer ac enim pellentesque, adipiscing metus id, pharetra odio."
80+
link={{
81+
title: 'Browse resources',
82+
url: 'learn',
83+
}}
84+
/>
85+
<ResourceCard
86+
icon={IconMedal}
87+
title="Take the First Steps to Stand Out in the Community"
88+
text="Donec bibendum nunc sit amet tortor scelerisque luctus et sit amet mauris. Suspendisse felis sem, condimentum ullamcorper est sit amet, molestie"
89+
link={{
90+
title: 'Learn about badges',
91+
url: 'leaderboard',
92+
}}
93+
/>
94+
<ResourceCard
95+
icon={IconRocket}
96+
title="Compete in Challenges and Win Cash"
97+
text="Suspendisse felis sem, condimentum ullamcorper est sit amet, molestie mollis nulla. Etiam lorem orci, consequat ac magna quis, facilisis"
98+
link={{
99+
title: 'Browse challenges',
100+
url: 'challenges',
101+
}}
102+
/>
103+
</Section>
104+
105+
<NewsSection news={props.news} />
106+
107+
<NewsletterSignup
108+
title="Sign up for our newsletter"
109+
text="Don’t miss out on the latest Topcoder IOS challenges and information!"
110+
imageSrc="/themes/community-2/subscribe-bg.jpg"
111+
/>
112+
113+
</main>
114+
);
115+
}
116+
117+
Home.defaultProps = {
118+
news: [],
119+
};
120+
121+
Home.propTypes = {
122+
news: PT.arrayOf(PT.shape()),
123+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@import '~styles/tc-styles';
2+
3+
.statsContainer {
4+
padding: 0;
5+
}
6+
7+
.statsContent {
8+
border-bottom: 1px solid #ddd;
9+
padding: 43px 38px 50px;
10+
11+
@include xxs-to-sm {
12+
display: flex;
13+
justify-content: space-around;
14+
padding: 30px 12px 32px;
15+
}
16+
}
17+
18+
.resourcesContainer {
19+
background-color: #fafafa;
20+
padding: 70px 0;
21+
22+
@include xxs-to-sm {
23+
padding: 40px 0;
24+
}
25+
}
26+
27+
.linksContainer {
28+
padding: 24px 0 60px;
29+
30+
@include xxs-to-sm {
31+
padding: 0;
32+
}
33+
}

0 commit comments

Comments
 (0)