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

Commit e9e35cd

Browse files
committed
Merge pull request #211 from appirio-tech/misc-dashboard-tweaks
Fix many small dashboard styles
2 parents 5db74fb + 32345cd commit e9e35cd

23 files changed

+113
-76
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
.challenge-calendar
17-
p.starts-in Starts In
17+
p.starts-in Ends In
1818
p.time-remaining 3
1919
p.unit-of-time days
2020

@@ -37,7 +37,7 @@
3737
a.forum(ng-href="http://apps.{{DOMAIN}}/forums//?module=Category&categoryID={{challenge.forumId}}")
3838
.forum-icon
3939

40-
p Posts
40+
p Forum
4141

4242
.challenge.list-view(ng-show="view=='list'")
4343
.challenge-icons

app/directives/challenge-tile/challenge-tile.directive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
activate();
1818

1919
function activate() {
20-
processChallenge($scope.challenge);
20+
console.log($scope.challenge.plain());
21+
// processChallenge($scope.challenge);
2122
}
2223

2324
function processChallenge(challenge) {

app/directives/ios-card/ios-card.directive.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
header
55
a(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}") {{challenge.name}}
66

7-
p #[span iOS] {{challenge.track}}
7+
p {{challenge.subTrack | underscoreStrip}}
88

99
.challenge-details
1010
p.prize-money(ng-show="challenge.reviewType === 'PEER'") Peer Review Challenge
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(function() {
2+
'use strict';
3+
4+
angular.module('topcoder').filter('underscoreStrip', underscoreStrip);
5+
6+
function underscoreStrip() {
7+
return function(string) {
8+
if (!string) {
9+
return '';
10+
}
11+
return string.replace(/_/g, ' ');
12+
};
13+
}
14+
15+
})();

app/index.jade

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ html
9393
script(src='../bower_components/angucomplete-alt/angucomplete-alt.js')
9494
script(src='../bower_components/angular-cookies/angular-cookies.js')
9595
script(src='../bower_components/angular-dropdowns/dist/angular-dropdowns.js')
96-
script(src='../bower_components/angular-filter/dist/angular-filter.js')
96+
script(src='../bower_components/angular-filter/dist/angular-filter.min.js')
9797
script(src='../bower_components/angular-img-fallback/angular.dcb-img-fallback.js')
9898
script(src='../bower_components/angular-jwt/dist/angular-jwt.js')
9999
script(src='../bower_components/angular-sanitize/angular-sanitize.js')
@@ -163,6 +163,7 @@ html
163163
script(src="filters/role.filter.js")
164164
script(src="filters/time-diff.filter.js")
165165
script(src="filters/track.filter.js")
166+
script(src="filters/underscore-strip.filter.js")
166167
script(src="layout/layout.module.js")
167168
script(src="layout/header/header.controller.js")
168169
script(src="my-challenges/my-challenges.module.js")

app/my-challenges/my-challenges.controller.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,25 +75,16 @@
7575
}
7676
};
7777
vm.loading = true;
78-
return $q.all([
79-
ChallengeService.getUserChallenges(handle, params),
80-
ChallengeService.getSpotlightChallenges()
81-
])
82-
.then(function(data){
83-
var challenges = data[0];
84-
var spotlightChallenges = data[1];
85-
78+
return ChallengeService.getUserChallenges(handle, params)
79+
.then(function(challenges){
8680
if (challenges.length > 0) {
8781
// FIXME until we figure out the correct sort order param
8882

8983
vm.myChallenges = challenges;
90-
vm.spotlightChallenge = spotlightChallenges[0];
91-
9284
vm.userHasChallenges = true;
9385
vm.loading = false;
9486
} else {
9587
vm.userHasChallenges = false;
96-
vm.spotlightChallenges = spotlightChallenges.slice(0, 2);
9788
vm.loading = false;
9889
}
9990
})

app/my-dashboard/community-updates/community-updates.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
header
2-
h1.section-title Community Updates
2+
h1.section-title From the Community Blog
33

44
.section-loading(ng-show="vm.loading")
55

app/my-dashboard/header-dashboard/header-dashboard.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
header
2-
h1 Dashboard
2+
h1 My Dashboard
33

44
.user-stats
55
.copilot-challenges(ng-show="dashboard.isCopilot")
@@ -12,5 +12,5 @@ header
1212
.money-earned
1313
p.number(ng-bind='vm.moneyEarned || 0 | currency:undefined:0')
1414

15-
p Won in prizes
15+
p Won
1616

app/my-dashboard/my-challenges/my-challenges.controller.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,17 @@
3636
}
3737
};
3838

39-
$q.all([
40-
ChallengeService.getUserChallenges(handle, params),
41-
ChallengeService.getSpotlightChallenges()
42-
])
43-
.then(function(data){
44-
var challenges = data[0];
45-
var spotlightChallenges = data[1];
46-
39+
ChallengeService.getUserChallenges(handle, params)
40+
.then(function(challenges){
41+
console.log(challenges);
4742
if (challenges.length > 0) {
4843
// FIXME until we figure out the correct sort order param
4944

5045
vm.myChallenges = challenges;
51-
vm.spotlightChallenge = spotlightChallenges[0];
52-
5346
vm.userHasChallenges = true;
5447
vm.loading = false;
5548
} else {
5649
vm.userHasChallenges = false;
57-
vm.spotlightChallenges = spotlightChallenges.slice(0, 2);
5850
vm.loading = false;
5951
}
6052
})

app/my-dashboard/my-challenges/my-challenges.jade

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
header(ng-hide="vm.loading")
2-
h1.section-title(ng-bind="vm.userHasChallenges ? 'Active Challenges' : 'Challenges'")
2+
h1.section-title(ng-bind="vm.userHasChallenges ? 'My Challenges' : 'Challenges'")
33

44
.section-loading(ng-show="vm.loading")
55

66
section.noChallenges(ng-if="!vm.userHasChallenges && !vm.loading")
7-
h3 Prove your skills!
7+
h3 Win prize money and expand your knowledge
88

99
.tracks
1010
.track
@@ -23,15 +23,17 @@ section.noChallenges(ng-if="!vm.userHasChallenges && !vm.loading")
2323
.copilot-icon-outline
2424
p Co-Pilot
2525

26-
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!
26+
p.info Compete in challenges to win money, test yourself against the world's best, and learn new skills
2727

28-
a(ng-href="https://www.{{DOMAIN}}/challenges/") View Challenges
28+
a(ng-href="https://www.{{DOMAIN}}/challenges/") Find Challenges
29+
30+
a(href="") Learn More
2931

3032
section.hasChallenges(ng-if="vm.userHasChallenges && !vm.loading")
3133
.challenges
3234
challenge-tile(ng-repeat="challenge in vm.myChallenges | orderBy:registrationEndDate:true", challenge="challenge", view="'tile'", ng-class="'tile-view'")
3335

3436
.my-challenges-links(ng-if="vm.userHasChallenges && !vm.loading")
35-
a(ui-sref="my-challenges") View All
37+
a(ui-sref="my-challenges") View All Active Challenges
3638

37-
a(ui-sref="my-challenges") Past Challenges
39+
a(ui-sref="my-challenges") View All Past Challenges

app/my-dashboard/srms/srms.jade

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
header
2-
h1.section-title Single Round Matches
2+
h1.section-title Competitive Programming
33

4-
//- a.viewSRMs(ui-sref="my-srms") View All Past SRMs
54

65
.section-loading(ng-show="vm.loading")
76

@@ -11,11 +10,13 @@ section(ng-hide="vm.loading")
1110

1211
.srm-links-card
1312
.flex-wrapper
14-
h2 Show us you can #[span code!]
13+
h2 Practice on past problems
1514

1615
a(href="https://community.{{DOMAIN}}/tc?module=ProblemArchive") Problem Archives
1716

1817
a(href="https://community.{{DOMAIN}}/wiki/display/tc/Algorithm+Problem+Set+Analysis") Match Editorials
1918

19+
a(ui-sref="my-srms") View Past SRMs
20+
2021
.srms-links(ng-hide="vm.loading")
2122
p Want to compete right now? Try your skills in the #[a(ng-href="https://arena.{{DOMAIN}}/") Topcoder ARENA]!

app/my-dashboard/subtrack-stats/subtrack-stats.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.ratings(ng-if="vm.hasRanks && !vm.loading")
55
.tracks
66
.track(ng-repeat="subtrack in vm.subtrackRanks | orderBy: ['track', 'rank']", ui-sref="profile.develop({userHandle: vm.profile.handle, track: subtrack.track, subTrack: subtrack.subTrack})")
7-
p.subtrack {{subtrack.subTrack}}
7+
p.subtrack {{subtrack.subTrack | underscoreStrip}}
88

99
p.rating {{subtrack.rating | number}}
1010
span

assets/css/directives/challenge-tile.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44
.challenge.tile-view {
55
position: relative;
66
width: 270px;
7-
border: 1px solid #DCDCDC;
7+
border: 1px solid #E0E0E0;
88
border-radius: 4px;
9+
box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
910
background-color: $white;
1011

12+
&:hover {
13+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4)
14+
}
15+
1116
.challenge-track {
1217
width: 5px;
1318
height: 52px;
@@ -26,7 +31,7 @@
2631
display: block;
2732
width: 210px;
2833
padding-top: 8px;
29-
padding-bottom: 5px;
34+
padding-bottom: 2px;
3035
@include sofia-pro-medium;
3136
font-size: 14px;
3237
line-height: 18px;
@@ -137,8 +142,8 @@
137142
}
138143

139144
p {
140-
@include sofia-pro-bold;
141-
font-size: 11px;
145+
@include sofia-pro-medium;
146+
font-size: 12px;
142147
color: $primary-text;
143148
}
144149

assets/css/directives/ios-card.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
font-size: 11px;
4141
line-height: 13px;
4242
text-transform: uppercase;
43-
44-
span {
45-
text-transform: none;
46-
}
4743
}
4844
}
4945

assets/css/directives/srm-tile.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
width: 270px;
66
border: 1px solid #DCDCDC;
77
border-radius: 4px;
8+
box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
89
background-color: $white;
910

11+
&:hover {
12+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4)
13+
}
14+
1015
.challenge-track {
1116
width: 5px;
1217
height: 52px;
@@ -46,7 +51,6 @@
4651
@include sofia-pro-light;
4752
font-size: 20px;
4853
line-height: 24px;
49-
text-transform: uppercase;
5054

5155
span {
5256
@include sofia-pro-bold;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
display: flex;
55
flex-direction: column;
66
color: $primary-text;
7+
@media only screen and (min-width: 1132px) {
8+
padding-bottom: 60px;
9+
}
710

811
header {
912
margin-top: 6px;

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

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.header-dashboard {
44
@include module-full-width;
55
background-color: $white;
6+
box-shadow: 0 0 3px 0 rgba(0, 0, 0, .3);
67

78
header {
89
display: flex;
@@ -45,30 +46,27 @@
4546
}
4647

4748
.slash {
48-
width: 20px;
49-
height: 35px;
50-
margin-right: 15px;
49+
@include forward-slash(1px, 40px, 0, 2px, 30deg);
50+
margin-right: 8px;
5151
background-color: #D1D3D4;
52+
@media only screen and (min-width: 600px) {
53+
@include forward-slash(1px, 45px, 0, 2px, 30deg);
54+
margin-right: 10px;
55+
}
5256
}
5357

5458
.money-earned, .copilot-challenges {
5559
display: flex;
5660
flex-direction: column;
57-
justify-content: space-between;
58-
text-align: center;
59-
60-
p {
61-
text-transform: uppercase;
62-
}
61+
text-align: right;
6362

6463
.number {
64+
margin-bottom: 4px;
6565
@include sofia-pro-bold;
6666
font-size: 18px;
6767
line-height: 23px;
6868
color: $primary-text;
69-
text-align: right;
7069
@media only screen and (min-width: 600px) {
71-
text-align: center;
7270
font-size: 22px;
7371
line-height: 28px;
7472
}
@@ -78,6 +76,7 @@
7876
@include sofia-pro-regular;
7977
font-size: 10px;
8078
line-height: 13px;
79+
text-transform: uppercase;
8180
color: #A3A3AE;
8281
@media only screen and (min-width: 600px) {
8382
font-size: 12px;
@@ -87,16 +86,16 @@
8786
}
8887

8988
.money-earned {
89+
padding-left: 15px;
9090
@media only screen and (min-width: 600px) {
9191
padding-left: 10px;
92-
padding-right: 10px;
9392
}
9493
}
9594

9695
.copilot-challenges {
97-
margin-right: 15px;
96+
margin-right: 10px;
97+
padding-right: 15px;
9898
@media only screen and (min-width: 600px) {
99-
padding-left: 10px;
10099
padding-right: 10px;
101100
}
102101
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
.section-title {
55
margin-bottom: 27px;
66
@media only screen and (min-width: 900px) {
7-
font-size: 28px;
87
margin-bottom: 30px;
98
}
109
}
@@ -106,6 +105,8 @@
106105
display: flex;
107106
justify-content: center;
108107
padding-top: 20px;
108+
border-top: 1px solid #F0F0F0;
109+
border-bottom: 1px solid #F0F0F0;
109110
background-color: #FCFCFC;
110111

111112
.challenges {

0 commit comments

Comments
 (0)