Skip to content

Commit 12d3203

Browse files
authored
Merge pull request #4579 from topcoder-platform/develop
TCO21 new site
2 parents b1f1d08 + 446aa56 commit 12d3203

File tree

17 files changed

+254
-63
lines changed

17 files changed

+254
-63
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,21 @@ workflows:
231231
branches:
232232
only:
233233
- develop
234+
- tco21
234235
# This is alternate dev env for parallel testing
235236
- "build-test":
236237
context : org-global
237238
filters:
238239
branches:
239-
only:
240-
- develop
240+
only:
241241
- feature-contentful
242242
# This is alternate dev env for parallel testing
243243
- "build-qa":
244244
context : org-global
245245
filters:
246246
branches:
247247
only:
248-
- develop-on-qa-env
248+
- develop
249249
# This is beta env for production soft releases
250250
- "build-prod-beta":
251251
context : org-global
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"challengeFilter": {
3+
"tags": ["TCO", "TCO21"]
4+
},
5+
"communityId": "tco21",
6+
"communityName": "TCO21",
7+
"groupIds": [],
8+
"hideSearch": true,
9+
"logos": [{
10+
"img": "/community-app-assets/themes/tco/TCO21.svg",
11+
"url": "https://tco21.topcoder.com"
12+
}],
13+
"menuItems": [{
14+
"navigationMenu": "3UBKZJ0qMHAkqrobue73NB"
15+
}],
16+
"newsFeed": "http://www.topcoder.com/feed",
17+
"subdomains": ["tco21"],
18+
"description": "2021 Topcoder Open. The Ultimate Programming & Design Tournament",
19+
"image": "tco21.jpg"
20+
}

src/shared/actions/contentful.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,13 @@ async function getMenuDone(menuProps) {
181181
cR2.fields.childRoutes,
182182
cR3 => service.getEntry(cR3.sys.id).then(
183183
async (c3) => {
184-
const sI3 = menuItemBuilder(url2, c3);
184+
const url3 = urlTarget(url2, cR2);
185+
const sI3 = menuItemBuilder(url3, c3);
185186
if (c3.fields.childRoutes) {
186187
sI3.subMenu = await Promise.all(_.map(
187188
c3.fields.childRoutes,
188189
cR4 => service.getEntry(cR4.sys.id).then(
189-
c4 => menuItemBuilder(urlTarget(url2, c3), c4),
190+
c4 => menuItemBuilder(url3, c4),
190191
),
191192
));
192193
}
@@ -239,9 +240,10 @@ async function getMenuDone(menuProps) {
239240
} else {
240241
menu = menuData;
241242
}
242-
// add the preconfigured secondary menus
243-
menu[0].secondaryMenuForLoggedInUser = config.SECONDARY_MENU_FOR_LOGGED_USER;
244-
menu[0].secondaryMenuForGuest = config.SECONDARY_MENU_FOR_GUEST;
243+
// add the preconfigured secondary menus?
244+
if (fields.showSecondaryNaviMenu) {
245+
menu[0].secondaryMenu = config.HEADER_MENU[1].secondaryMenu;
246+
}
245247

246248
return {
247249
id: menuProps.id,

src/shared/components/Contentful/ContentBlock/themes/TCO19.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ strong a {
7878
th {
7979
@include roboto-regular;
8080

81-
color: #808080;
81+
color: #2a2a2a;
8282
font-size: 15px;
8383
font-weight: bold;
84-
line-height: 25px;
84+
line-height: 18px;
8585
text-align: left;
8686
text-transform: uppercase;
87-
padding: 7px 10px 7px 0;
87+
padding: 18px 10px 14px 0;
8888

8989
@include md-to-xl {
9090
white-space: nowrap;
@@ -102,8 +102,8 @@ strong a {
102102
line-height: 25px;
103103
text-align: left;
104104
color: $tc-gray-80;
105-
border-top: 1px solid #ededf2;
106-
border-bottom: 1px solid #ededf2;
105+
border-top: 1px solid #d4d4d4;
106+
border-bottom: 1px solid #d4d4d4;
107107
padding: 20px 50px 20px 0;
108108
min-height: 51px;
109109

src/shared/components/Contentful/ContentBlock/themes/TCO20.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ strong a {
9494
th {
9595
@include roboto-regular;
9696

97-
color: #808080;
97+
color: #2a2a2a;
9898
font-size: 15px;
9999
font-weight: bold;
100-
line-height: 25px;
100+
line-height: 18px;
101101
text-align: left;
102102
text-transform: uppercase;
103-
padding: 7px 10px 7px 0;
103+
padding: 18px 10px 14px 0;
104104

105105
@include md-to-xl {
106106
white-space: nowrap;
@@ -118,8 +118,8 @@ strong a {
118118
line-height: 25px;
119119
text-align: left;
120120
color: $tc-gray-80;
121-
border-top: 1px solid #ededf2;
122-
border-bottom: 1px solid #ededf2;
121+
border-top: 1px solid #d4d4d4;
122+
border-bottom: 1px solid #d4d4d4;
123123
padding: 20px 50px 20px 0;
124124
min-height: 51px;
125125

src/shared/components/Contentful/ContentBlock/themes/general.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ strong a {
122122
th {
123123
@include roboto-regular;
124124

125-
color: #808080;
125+
color: #2a2a2a;
126126
font-size: 15px;
127127
font-weight: bold;
128-
line-height: 25px;
128+
line-height: 18px;
129129
text-align: left;
130130
text-transform: uppercase;
131-
padding: 7px 10px 7px 0;
131+
padding: 18px 10px 14px 0;
132132

133133
@include md-to-xl {
134134
white-space: nowrap;
@@ -146,8 +146,8 @@ strong a {
146146
line-height: 25px;
147147
text-align: left;
148148
color: $tc-gray-80;
149-
border-top: 1px solid #ededf2;
150-
border-bottom: 1px solid #ededf2;
149+
border-top: 1px solid #d4d4d4;
150+
border-bottom: 1px solid #d4d4d4;
151151
padding: 20px 50px 20px 0;
152152
min-height: 51px;
153153

src/shared/components/Contentful/Countdown/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default function CountdownLoader(props) {
2525
title={data.entries.items[id].fields.title}
2626
end={new Date(data.entries.items[id].fields.endDate)}
2727
extraStylesForContainer={data.entries.items[id].fields.extraStylesForContainer}
28+
themeName={data.entries.items[id].fields.theme}
2829
/>
2930
)}
3031
renderPlaceholder={LoadingIndicator}

src/shared/components/Countdown/index.jsx

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ import PT from 'prop-types';
88
import React from 'react';
99
import { fixStyle } from 'utils/contentful';
1010

11-
import './style.scss';
11+
import defaultTheme from './themes/style.scss';
12+
import TCO21 from './themes/TCO21.scss';
13+
14+
const THEMES = {
15+
Default: defaultTheme,
16+
TCO21,
17+
};
1218

1319
/* We have to use state component, as we need to manipulate with DOM nodes to
1420
* access nuka-carousel state. */
@@ -34,6 +40,8 @@ export default class Countdown extends React.Component {
3440
}
3541

3642
render() {
43+
const { themeName } = this.props;
44+
const theme = THEMES[themeName];
3745
let { elapsed } = this.state;
3846
const oneDay = 24 * 60 * 60;
3947
const oneHour = 60 * 60;
@@ -54,27 +62,26 @@ export default class Countdown extends React.Component {
5462
);
5563
return (
5664
<div
57-
styleName="container"
65+
className={theme.container}
5866
style={styles}
5967
>
60-
<div styleName="title"> {title} </div>
61-
<div styleName="title colon"> : </div>
62-
<div styleName="time-container">
68+
<div className={theme.title}> {title} </div>
69+
<div className={theme['time-container']}>
6370
<div>
64-
<div styleName="time-value"> {day} </div>
65-
<div styleName="time-label"> days </div>
71+
<div className={theme['time-value']}> {day} </div>
72+
<div className={theme['time-label']}> days </div>
6673
</div>
6774
<div>
68-
<div styleName="time-value"> {hour} </div>
69-
<div styleName="time-label"> hours </div>
75+
<div className={theme['time-value']}> {hour} </div>
76+
<div className={theme['time-label']}> hours </div>
7077
</div>
7178
<div>
72-
<div styleName="time-value"> {minute} </div>
73-
<div styleName="time-label"> minutes </div>
79+
<div className={theme['time-value']}> {minute} </div>
80+
<div className={theme['time-label']}> minutes </div>
7481
</div>
75-
<div styleName="time-second">
76-
<div styleName="time-value"> {second} </div>
77-
<div styleName="time-label"> seconds </div>
82+
<div className={theme['time-second']}>
83+
<div className={theme['time-value']}> {second} </div>
84+
<div className={theme['time-label']}> seconds </div>
7885
</div>
7986
</div>
8087
</div>
@@ -85,10 +92,12 @@ export default class Countdown extends React.Component {
8592
Countdown.defaultProps = {
8693
title: 'Countdown to TCO19 Final',
8794
extraStylesForContainer: {},
95+
themeName: 'Default',
8896
};
8997

9098
Countdown.propTypes = {
9199
title: PT.string,
92100
end: PT.instanceOf(Date).isRequired,
93101
extraStylesForContainer: PT.shape(),
102+
themeName: PT.string,
94103
};
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
@import "~styles/mixins";
2+
3+
$text-color-gray: #37373b;
4+
$container-background-yello: #fce217;
5+
6+
.container {
7+
@include roboto-regular;
8+
9+
display: -webkit-flex; /* Safari */
10+
display: flex;
11+
-webkit-flex-direction: row; /* Safari */
12+
flex-direction: row;
13+
-webkit-justify-content: center; /* Safari */
14+
justify-content: center;
15+
padding: 40px;
16+
background: $container-background-yello;
17+
18+
@media only screen and (max-width: 767px) {
19+
-webkit-flex-direction: column; /* Safari */
20+
flex-direction: column;
21+
}
22+
23+
.title {
24+
@include barlow-condensed-medium;
25+
26+
color: #2a2a2a;
27+
font-size: 48px;
28+
line-height: 50px;
29+
text-align: center;
30+
margin: auto 41px auto 0;
31+
text-transform: uppercase;
32+
33+
@media only screen and (max-width: 767px) {
34+
margin-bottom: 20px;
35+
}
36+
}
37+
38+
.time-container {
39+
display: -webkit-flex; /* Safari */
40+
display: flex;
41+
-webkit-flex-direction: row; /* Safari */
42+
flex-direction: row;
43+
-webkit-justify-content: center; /* Safari */
44+
justify-content: center;
45+
}
46+
47+
.time-value {
48+
@include barlow-condensed;
49+
50+
color: #9d41c9;
51+
font-size: 80px;
52+
line-height: 74px;
53+
text-align: center;
54+
}
55+
56+
.time-label {
57+
color: #2a2a2a;
58+
font-size: 14px;
59+
letter-spacing: 0.5px;
60+
line-height: 18px;
61+
text-align: center;
62+
width: 100px;
63+
text-transform: uppercase;
64+
margin-top: 4px;
65+
66+
@media only screen and (max-width: 767px) {
67+
width: auto;
68+
margin-left: 10px;
69+
margin-right: 10px;
70+
font-size: 18px;
71+
}
72+
}
73+
74+
.time-second {
75+
display: block;
76+
}
77+
}

src/shared/components/Countdown/style.scss renamed to src/shared/components/Countdown/themes/style.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,8 @@ $container-background-yello: #fce217;
3131
margin-bottom: auto;
3232
text-transform: uppercase;
3333

34-
&.colon {
35-
margin-right: 30px;
36-
}
37-
3834
@media only screen and (max-width: 767px) {
3935
margin-bottom: 20px;
40-
41-
&.colon {
42-
display: none;
43-
}
4436
}
4537
}
4638

src/shared/components/Leaderboard/LeaderboardTable/themes/tco20.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ $table-bg-hover: #f5f5f5;
191191
.col-fulfillment,
192192
.col-challenges,
193193
.col-points {
194-
color: #7f7f7f;
194+
color: #2a2a2a;
195195
font-family: Roboto, sans-serif;
196196
font-size: 14px;
197197
font-weight: 500;

src/shared/components/buttons/themed/tc.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
font-weight: 700 !important;
77
text-decoration: none !important;
88
text-transform: uppercase !important;
9+
margin: 0 !important;
910
}
1011

1112
@mixin primary-green {
@@ -105,6 +106,7 @@
105106
font-weight: 700 !important;
106107
text-decoration: none !important;
107108
text-transform: uppercase !important;
109+
margin: 0 !important;
108110
}
109111

110112
@mixin secondary-gray {
@@ -130,6 +132,7 @@
130132

131133
font-weight: 700 !important;
132134
text-transform: uppercase !important;
135+
margin: 0 !important;
133136
}
134137

135138
@mixin warn-red {

0 commit comments

Comments
 (0)