Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 411fe82

Browse files
author
vikasrohit
committed
SUP-2839, Profile: # of wins in summary does not match winning challenges shown on Profile
SUP-3012, [Profile] Implement "private challenge" card -- Implemented new design (background, text and font) for both invite-only and private challenge cards in tile and list views
1 parent eec4ba8 commit 411fe82

File tree

4 files changed

+99
-26
lines changed

4 files changed

+99
-26
lines changed

app/directives/challenge-tile/challenge-tile.jade

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@
5757
.challenge-details(ng-switch-when="DEVELOP")
5858
dev-challenge-user-place(challenge="challenge", view="view", ng-hide="challenge.isPrivate")
5959
.invite-only-banner(ng-show="challenge.isPrivate")
60+
.title INVITE-ONLY CHALLENGE
6061
img(ng-src=require("../../../assets/images/ico-invite-only-prj.svg"))
61-
span INVITE-ONLY CHALLENGE
62+
span CHALLENGE INFORMATION IS CONFIDENTIAL#[br]RESULTS ARE NOT INCLUDED IN STATISTICS
6263

6364
.challenge-details(ng-switch-when="DESIGN")
6465
design-challenge-user-place(challenge="challenge", view="view", ng-hide="challenge.isPrivate")
6566
.invite-only-banner(ng-show="challenge.isPrivate")
67+
.title INVITE-ONLY CHALLENGE
6668
img(ng-src=require("../../../assets/images/ico-invite-only-prj.svg"))
67-
span INVITE-ONLY CHALLENGE
69+
span CHALLENGE INFORMATION IS CONFIDENTIAL#[br]RESULTS ARE NOT INCLUDED IN STATISTICS
6870

6971
// Only show if not data science track
7072
p.roles
@@ -121,9 +123,15 @@
121123
.challenge-details(ng-switch-when="DEVELOP")
122124
dev-challenge-user-place(challenge="challenge", view="view", ng-hide="challenge.isPrivate")
123125
.invite-only-banner(ng-show="challenge.isPrivate")
126+
.invite-only-banner__description
127+
.title INVITE-ONLY CHALLENGE
128+
span CHALLENGE INFORMATION IS CONFIDENTIAL#[br]RESULTS ARE NOT INCLUDED IN STATISTICS
124129
img(src=require("../../../assets/images/ico-invite-only-prj.svg"))
125130

126131
.challenge-details(ng-switch-when="DESIGN")
127132
design-challenge-user-place(challenge="challenge", view="view", ng-hide="challenge.isPrivate")
128133
.invite-only-banner(ng-show="challenge.isPrivate")
134+
.invite-only-banner__description
135+
.title INVITE-ONLY CHALLENGE
136+
span CHALLENGE INFORMATION IS CONFIDENTIAL#[br]RESULTS ARE NOT INCLUDED IN STATISTICS
129137
img(src=require("../../../assets/images/ico-invite-only-prj.svg"))

app/directives/challenge-user-place/design-challenge-user-place.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.thumbnail(ng-click="!challenge.isPrivate && imageURL && openLightbox()", ng-class="{hidden: challenge.userStatus !== 'PASSED_REVIEW'}")
99
img(ng-show="challenge.submissionViewable && imageURL", ng-src="{{imageURL}}")
1010
img(ng-show="challenge.submissionViewable && !imageURL", ng-src=require("../../../assets/images/card-bg-no-image.svg"))
11-
.private-challenge-banner(ng-show="!challenge.submissionViewable")
11+
.private-challenge-banner(ng-show="!challenge.submissionViewable", title="Submissions for this challenge are confidential")
1212
img(ng-src=require("../../../assets/images/ico-private-prj.svg"))
1313
span PRIVATE CHALLENGE
1414

@@ -34,7 +34,7 @@
3434
.thumbnail(ng-click="!challenge.isPrivate && imageURL && openLightbox()", ng-class="{hidden: challenge.userStatus !== 'PASSED_REVIEW'}")
3535
img(ng-show="challenge.submissionViewable && imageURL", ng-src="{{imageURL}}")
3636
img(ng-show="challenge.submissionViewable && !imageURL", ng-src=require("../../../assets/images/card-bg-no-image.svg"))
37-
.private-challenge-banner(ng-show="!challenge.submissionViewable")
37+
.private-challenge-banner(ng-show="!challenge.submissionViewable", title="Submissions for this challenge are confidential")
3838
img(ng-src=require("../../../assets/images/ico-private-prj.svg"))
3939

4040
.thumbnail-gallery(ng-show="numImages", ng-click="!challenge.isPrivate && imageURL && openLightbox()")

assets/css/directives/challenge-tile.scss

Lines changed: 85 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
11
@import 'topcoder/tc-includes';
22

3+
// Common styles between tile and list view
4+
5+
6+
challenge-tile .challenge {
7+
8+
.private-challenge-banner {
9+
width: 100%;
10+
flex: 1;
11+
display: flex;
12+
13+
.title {
14+
@include sofia-pro-light;
15+
font-size: 18px;
16+
line-height: 23px;
17+
color: $gray-darkest;
18+
text-transform: uppercase;
19+
}
20+
21+
img {
22+
width: auto;
23+
}
24+
25+
span {
26+
@include font-with-weight('Sofia Pro', 400);
27+
font-size: 11px;
28+
line-height: 15px;
29+
text-transform: uppercase;
30+
color: $gray-dark;
31+
text-align: center;
32+
}
33+
}
34+
35+
.invite-only-banner {
36+
width: 100%;
37+
flex: 1;
38+
display: flex;
39+
40+
.title {
41+
@include sofia-pro-light;
42+
font-size: 18px;
43+
line-height: 23px;
44+
color: $gray-darkest;
45+
text-transform: uppercase;
46+
}
47+
48+
img {
49+
width: auto;
50+
}
51+
52+
span {
53+
@include font-with-weight('Sofia Pro', 400);
54+
font-size: 11px;
55+
line-height: 15px;
56+
text-transform: uppercase;
57+
color: $gray-dark;
58+
text-align: center;
59+
}
60+
}
61+
}
62+
363
// Default Challenge Tile Stylings
464
challenge-tile .challenge.tile-view {
565

@@ -54,47 +114,29 @@ challenge-tile .challenge.tile-view {
54114
}
55115

56116
.private-challenge-banner {
57-
width: 100%;
58-
background-color: $gray-darkest;
59-
flex: 1;
60-
display: flex;
61117
flex-direction: column;
62118
justify-content: center;
63119
align-items: center;
64120

65-
img {
66-
width: auto;
121+
.title {
122+
margin-bottom: 60px;
67123
}
68124

69125
span {
70-
@include font-with-weight('Sofia Pro', 300);
71-
font-size: 12px;
72-
line-height: 16px;
73-
text-transform: uppercase;
74-
color: $gray-dark;
75126
margin-top: 20px;
76127
}
77128
}
78129

79130
.invite-only-banner {
80-
width: 100%;
81-
background-color: $gray-darkest;
82-
flex: 1;
83-
display: flex;
84131
flex-direction: column;
85132
justify-content: center;
86133
align-items: center;
87134

88-
img {
89-
width: auto;
135+
.title {
136+
margin-bottom: 60px;
90137
}
91138

92139
span {
93-
@include font-with-weight('Sofia Pro', 300);
94-
font-size: 12px;
95-
line-height: 16px;
96-
text-transform: uppercase;
97-
color: $gray-dark;
98140
margin-top: 20px;
99141
}
100142
}
@@ -473,6 +515,27 @@ challenge-tile .challenge.list-view {
473515
}
474516
}
475517

518+
.private-challenge-banner {
519+
flex-direction: column;
520+
justify-content: center;
521+
}
522+
523+
.invite-only-banner {
524+
flex-direction: row;
525+
justify-content: space-between;
526+
527+
.invite-only-banner__description {
528+
529+
.title {
530+
margin-bottom: 10px;
531+
}
532+
533+
span {
534+
}
535+
536+
}
537+
}
538+
476539
// specific styles for active challenges in list view
477540
.active-challenge {
478541
width: 100%;

assets/css/directives/design-challenge-user-place.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ design-challenge-user-place {
125125
width: 84px;
126126
height: 84px;
127127
overflow: hidden;
128+
display: flex;
129+
flex-direction: column;
128130

129131
img {
130132
width: 100%;

0 commit comments

Comments
 (0)