Skip to content

Commit d4133a8

Browse files
authored
Merge pull request #3579 from topcoder-platform/feature-contentful
Implements #3552
2 parents 103fd7e + 8cf6a22 commit d4133a8

File tree

7 files changed

+65
-52
lines changed

7 files changed

+65
-52
lines changed

.circleci/config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,22 @@ workflows:
175175
branches:
176176
only:
177177
- develop
178-
# This is alternate dev env for parallel testing
178+
- feature-contentful
179+
# This is alternate dev env for parallel testing
179180
- "build-test":
180181
context : org-global
181182
filters:
182183
branches:
183184
only:
184185
- develop
185-
- feature-contentful
186186
# This is beta env for production soft releases
187187
- "build-prod-beta":
188188
context : org-global
189189
filters:
190190
branches:
191191
only:
192192
- develop
193+
- feature-contentful
193194
# Production builds are exectuted only on tagged commits to the
194195
# master branch.
195196
- "build-prod":

src/shared/components/Leaderboard/Podium/index.jsx

+1-11
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function Podium(props) {
4242
} = props;
4343

4444
const renderPodium = (comps) => {
45-
let podiumSpots = comps.map(comp => (
45+
const podiumSpots = comps.map(comp => (
4646
<div key={comp.rank} styleName="podium-column">
4747
<PodiumSpot
4848
competitor={comp}
@@ -55,16 +55,6 @@ export default function Podium(props) {
5555
</div>
5656
));
5757

58-
if (comps.length === 3) {
59-
podiumSpots = [
60-
...podiumSpots.slice(0, 0),
61-
podiumSpots[1],
62-
...podiumSpots.slice(1, 1),
63-
podiumSpots[0],
64-
...podiumSpots.slice(2),
65-
];
66-
}
67-
6858
return (
6959
<div styleName="PodiumWrap">
7060
{podiumSpots}

src/shared/components/Leaderboard/PodiumSpot/index.jsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const PODIUM_ITEM_MODIFIER = {
4242
1: 'first',
4343
2: 'second',
4444
3: 'third',
45+
4: 'fourth',
4546
};
4647

4748
/**
@@ -53,11 +54,13 @@ const CUSTOM_STYLES = {
5354
1: avatarStyles.gold,
5455
2: avatarStyles.silver,
5556
3: avatarStyles.bronze,
57+
4: avatarStyles.iron,
5658
},
5759
TCO20: {
5860
1: avatarStyles['tco20-1'],
5961
2: avatarStyles['tco20-2'],
6062
3: avatarStyles['tco20-3'],
63+
4: avatarStyles['tco20-4'],
6164
},
6265
};
6366

@@ -68,6 +71,7 @@ const DISPLAY_RANKING = {
6871
1: '1',
6972
2: '2',
7073
3: '3',
74+
4: '4',
7175
};
7276

7377
const THEME = {
@@ -158,7 +162,7 @@ export default function PodiumSpot(props) {
158162
isCopilot ? (
159163
<div styleName={`${stylesName}.stats`}>
160164
<span styleName={`${stylesName}.value`}>{competitor.fulfillment}</span>
161-
<span>fulfillment</span>
165+
<span styleName={`${stylesName}.value-title`}>fulfillment</span>
162166
</div>
163167
) : null
164168
}

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

+40-29
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ $podium-border-color: #ededf2;
33

44
.PodiumSpot {
55
border-radius: 6px;
6-
padding: 25px;
6+
padding: 23px 15px;
77
display: flex;
8-
width: 324px;
8+
width: auto;
99

1010
.leaderboard-avatar {
1111
display: inline-block;
12-
overflow: hidden;
1312
position: relative;
1413
margin-bottom: 12px;
1514
margin-right: 20px;
15+
overflow: visible;
1616
}
1717

1818
.ranking {
@@ -23,7 +23,7 @@ $podium-border-color: #ededf2;
2323
display: inline-block;
2424
position: absolute;
2525
right: 0;
26-
bottom: 10px;
26+
bottom: -10px;
2727
font-size: 15px;
2828
}
2929

@@ -35,15 +35,16 @@ $podium-border-color: #ededf2;
3535
color: #56565d;
3636
font-size: 18px;
3737
display: flex;
38-
justify-content: space-around;
38+
justify-content: center;
3939
flex-direction: column;
4040

4141
.stats {
4242
color: #747480;
43-
font-size: 15px;
43+
font-size: 16px;
4444
font-weight: 400;
4545
line-height: 25px;
4646
display: flex;
47+
margin-bottom: 4px;
4748

4849
.value-title {
4950
color: #2a2a2a;
@@ -91,12 +92,12 @@ $podium-border-color: #ededf2;
9192
a.profile-link {
9293
color: #0d61bf;
9394
font-family: Barlow, sans-serif;
94-
font-size: 20px;
95+
font-size: 16px;
9596
font-weight: 600;
96-
line-height: 24px;
97+
line-height: 19px;
9798
text-align: left;
9899
text-decoration: underline;
99-
margin-bottom: 15px;
100+
margin-bottom: 13px;
100101

101102
&:hover {
102103
text-decoration: none;
@@ -135,31 +136,41 @@ $podium-border-color: #ededf2;
135136
}
136137
}
137138

139+
.PodiumSpot--fourth {
140+
background-color: #8dccd4;
141+
142+
.ranking {
143+
background-color: #2a2a2a;
144+
color: #fff;
145+
}
146+
}
147+
138148
.PodiumSpot--first,
139149
.PodiumSpot--second,
140-
.PodiumSpot--third {
150+
.PodiumSpot--third,
151+
.PodiumSpot--fourth {
141152
margin-top: 0;
142153

143154
.leaderboard-avatar {
144-
height: 64px;
145-
width: 64px;
155+
height: 79px;
156+
width: 79px;
146157
}
147158
}
148159

149-
@include md-to-lg {
150-
.PodiumSpot--first .leaderboard-avatar,
151-
.PodiumSpot--second .leaderboard-avatar,
152-
.PodiumSpot--third .leaderboard-avatar {
153-
height: 96px;
154-
width: 96px;
155-
}
156-
}
157-
158-
@include xl {
159-
.PodiumSpot--first .leaderboard-avatar,
160-
.PodiumSpot--second .leaderboard-avatar,
161-
.PodiumSpot--third .leaderboard-avatar {
162-
height: 128px;
163-
width: 128px;
164-
}
165-
}
160+
// @include md-to-lg {
161+
// .PodiumSpot--first .leaderboard-avatar,
162+
// .PodiumSpot--second .leaderboard-avatar,
163+
// .PodiumSpot--third .leaderboard-avatar {
164+
// height: 96px;
165+
// width: 96px;
166+
// }
167+
// }
168+
169+
// @include xl {
170+
// .PodiumSpot--first .leaderboard-avatar,
171+
// .PodiumSpot--second .leaderboard-avatar,
172+
// .PodiumSpot--third .leaderboard-avatar {
173+
// height: 128px;
174+
// width: 128px;
175+
// }
176+
// }

src/shared/components/Leaderboard/avatarStyles.scss

+14-7
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
width: 100%;
77
}
88

9-
.bronze {
10-
@include avatar;
11-
12-
border-color: #d98f64;
13-
}
14-
159
.default {
1610
@include avatar;
1711

@@ -30,9 +24,22 @@
3024
border-color: #d1d0cf;
3125
}
3226

27+
.bronze {
28+
@include avatar;
29+
30+
border-color: #d98f64;
31+
}
32+
33+
.iron {
34+
@include avatar;
35+
36+
border-color: #d98f64;
37+
}
38+
3339
.tco20-1,
3440
.tco20-2,
35-
.tco20-3 {
41+
.tco20-3,
42+
.tco20-4 {
3643
border-radius: 50%;
3744
height: 100%;
3845
width: 100%;

src/shared/containers/tco/Leaderboard/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class LeaderboardPageContainer extends React.Component {
7373
? (<LoadingIndicator />) : (
7474
<div>
7575
<div styleName="Leaderboard">
76-
<h2 styleName="section-title">{title}</h2>
76+
{title ? (<h2 styleName="section-title">{title}</h2>) : null}
7777
<Podium
7878
competitors={ld.slice(0, podiumSpots)}
7979
isCopilot={isCopilot}

src/shared/containers/tco/Leaderboard/themes/styles.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.Leaderboard {
44
padding: 0 15px;
5-
margin: 20px auto;
5+
margin: 50px auto;
66
max-width: $screen-md;
77
}
88

0 commit comments

Comments
 (0)