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

Commit 152310c

Browse files
author
Nick Litwin
committed
Finish mobile empty state for my-challenges on dashboard
1 parent e240b62 commit 152310c

File tree

15 files changed

+122
-69
lines changed

15 files changed

+122
-69
lines changed
Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
1-
header
2-
h1.section-title Active Challenges
3-
4-
p.noChallenges(ng-hide="vm.userHasChallenges") You have not participated in any challenges yet.
1+
header(ng-hide="vm.loading")
2+
h1.section-title(ng-bind="vm.userHasChallenges ? 'Active Challenges' : 'Challenges'")
53

64
.section-loading(ng-show="vm.loading")
75

8-
section(ng-if="vm.userHasChallenges && !vm.loading")
6+
section.noChallenges(ng-if="!vm.userHasChallenges && !vm.loading")
7+
h3 Prove your skills
8+
9+
.tracks
10+
.track
11+
.develop-icon-outline
12+
p Development
13+
14+
.track
15+
.design-icon-outline
16+
p Design
17+
18+
.track
19+
.data-science-icon-outline
20+
p Data Science
21+
22+
p.info Hey, whatever your like might be—Design, Development, or Data Science—we have it! Explore the Challenges section and show us what you’re made of!
23+
24+
a(ng-href="https://www.{{DOMAIN}}/challenges/") View Challenges
25+
26+
section.hasChallenges(ng-if="vm.userHasChallenges && !vm.loading")
927
.challenges
1028
challenge-tile(ng-repeat="challenge in vm.myChallenges | orderBy:registrationEndDate:true", challenge="challenge", view="'tile'", ng-class="'tile-view'")
1129

12-
.section-links
30+
.section-links(ng-if="vm.userHasChallenges && !vm.loading")
1331
.link
1432
a(ui-sref="my-challenges") View All
1533

16-
.link(ng-show="dashboard.isCopilot")
17-
a(href="https://www.{{vm.domain}}/direct") Launch Topcoder Direct
18-
19-
.link(ng-hide="vm.userHasChallenges")
20-
a(href="https://community.{{vm.domain}}/", target="_blank") View Help Library
34+
.link
35+
a(ui-sref="my-challenges") Past Challenges

assets/css/directives/challenge-tiles.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
width: 75px;
7474
height: 63px;
7575
margin-bottom: 20px;
76-
background-image: url(/images/svgs/ico-calendar.svg);
76+
background-image: url(/images/ico-calendar.svg);
7777

7878
> p {
7979
@include sofia-pro-bold;
@@ -164,20 +164,20 @@
164164
.registrants-icon {
165165
width: 15px;
166166
height: 16px;
167-
background-image: url(/images/svgs/ico-users.svg);
167+
background-image: url(/images/ico-users.svg);
168168
background-size: 15px 16px;
169169
}
170170

171171
.submissions-icon {
172172
width: 22px;
173173
height: 14px;
174-
background-image: url(/images/svgs/ico-submissions.svg);
174+
background-image: url(/images/ico-submissions.svg);
175175
}
176176

177177
.forum-icon {
178178
width: 20px;
179179
height: 17px;
180-
background-image: url(/images/svgs/ico-posts.svg);
180+
background-image: url(/images/ico-posts.svg);
181181
}
182182
}
183183

assets/css/directives/srm-tile.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
align-items: center;
6060
width: 76px;
6161
height: 91px;
62-
background-image: url(/images/svgs/ico-calendar-detailed.svg);
62+
background-image: url(/images/ico-calendar-detailed.svg);
6363

6464
span {
6565
display: block;

assets/css/my-challenges/my-challenges.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,5 @@
137137
}
138138
}
139139
}
140-
141-
.spotlightChallenges {
142-
display: flex;
143-
flex-direction: row;
144-
justify-content: space-between;
145-
margin-top: 20px;
146-
margin-bottom: 10px;
147-
}
148140
}
149141
}
Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,74 @@
11
@import '../partials/combined';
22

33
.my-challenges {
4-
min-height: 50px;
5-
display: flex;
6-
flex-direction: column;
4+
.section-title {
5+
margin-bottom: 27px;
6+
}
77

8-
> header {
9-
position: relative;
10-
margin-bottom: 35px;
8+
.section-loading {
9+
min-height: 500px;
10+
}
1111

12-
p.noChallenges {
13-
text-align: center;
14-
margin-top: 10px;
12+
.noChallenges {
13+
display: flex;
14+
flex-direction: column;
15+
align-items: center;
16+
color: #3D3D3D;
17+
18+
h3 {
19+
margin-bottom: 20px;
20+
@include sofia-pro-extra-light;
1521
font-size: 18px;
22+
text-transform: uppercase;
1623
}
1724

18-
p.viewChallenges {
19-
position: absolute;
20-
top: 3px;
21-
right: 10px;
25+
.tracks {
26+
display: flex;
27+
flex-direction: row;
28+
justify-content: space-between;
29+
width: 260px;
2230

23-
a {
24-
text-decoration: underline;
25-
}
26-
}
27-
28-
p.viewDashboard {
29-
position: absolute;
30-
top: 3px;
31-
left: 10px;
31+
.track {
32+
div:first-child {
33+
margin: 0 auto 10px;
34+
@include background-image-size(44px, 43px);
35+
}
3236

33-
a {
34-
text-decoration: underline;
37+
p {
38+
@include sofia-pro-medium;
39+
font-size: 12px;
40+
text-transform: uppercase;
41+
}
42+
}
43+
.develop-icon-outline {
44+
@include develop-icon-outline;
45+
}
46+
.design-icon-outline {
47+
@include design-icon-outline;
48+
}
49+
.data-science-icon-outline {
50+
@include data-icon-outline;
3551
}
3652
}
3753

38-
p.filters {
39-
position: absolute;
40-
top: 3px;
41-
right: 10px;
42-
43-
a {
44-
text-decoration: underline;
45-
}
54+
.info {
55+
width: 260px;
56+
margin-top: 50px;
57+
@include sofia-pro-light;
58+
font-size: 15.4px;
59+
line-height: 22.4px;
60+
text-align: center;
4661
}
47-
}
4862

49-
.section-loading {
50-
min-height: 500px;
63+
a {
64+
margin-top: 20px;
65+
margin-bottom: 40px;
66+
@include button-l;
67+
text-decoration: none;
68+
}
5169
}
5270

53-
section {
71+
.hasChallenges {
5472
display: flex;
5573
justify-content: center;
5674
padding: 20px 0;
@@ -94,12 +112,4 @@
94112
}
95113
}
96114
}
97-
98-
.spotlightChallenges {
99-
display: flex;
100-
flex-direction: row;
101-
justify-content: space-between;
102-
margin-top: 20px;
103-
margin-bottom: 10px;
104-
}
105115
}

assets/css/my-dashboard/my-dashboard.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
display: flex;
55
flex-direction: column;
66
align-items: center;
7+
padding-left: 10px;
8+
padding-right: 10px;
9+
@media only screen and (min-width: 1262px) {
10+
padding-left: 0;
11+
padding-right: 0;
12+
}
713

814
.subtrack-stats, .my-challenges, .srms, .programs, .community-updates {
915
@include module-l;
@@ -12,10 +18,13 @@
1218

1319
.section-title {
1420
@include sofia-pro-bold;
15-
font-size: 28px;
21+
font-size: 22px;
1622
color: #3D3D3D;
1723
text-align: center;
1824
text-transform: uppercase;
25+
@media only screen and (min-width: 450) {
26+
font-size: 28px;
27+
}
1928
}
2029

2130
.section-links {

assets/css/partials/_mixins.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@
6565
font-weight: 700;
6666
}
6767

68+
@mixin sofia-pro-extra-light {
69+
font-family: 'Sofia Pro', Arial;
70+
font-weight: 200;
71+
}
72+
6873
@mixin sofia-pro-light {
6974
font-family: 'Sofia Pro', Arial;
7075
font-weight: 300;
@@ -172,6 +177,8 @@
172177
@mixin module-l {
173178
@include module-s;
174179
max-width: 1242px;
180+
margin-left: 10px;
181+
margin-right: 10px;
175182
padding-top: 30px;
176183
@media only screen and (min-width: 900px) {
177184
padding: 90px 0 30px;
@@ -189,6 +196,26 @@
189196
-webkit-overflow-scrolling: touch;
190197
}
191198

199+
@mixin background-image-size($width, $height) {
200+
width: $width;
201+
height: $height;
202+
background-size: $width, $height;
203+
}
204+
205+
@mixin develop-icon-outline {
206+
background-image: url(/images/ico-track-develop-outline.svg);
207+
}
208+
209+
@mixin design-icon-outline {
210+
background-image: url(/images/ico-track-design-outline.svg);
211+
}
212+
213+
@mixin data-icon-outline {
214+
background-image: url(/images/ico-track-data-outline.svg);
215+
}
216+
217+
218+
192219
// UI REFRESH STYLES
193220
@mixin ui-submit-button {
194221
width: 300px;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)