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

Commit c488222

Browse files
author
Parth Shah
committed
💥 a lot of sytle and refactoring
1 parent d8c6509 commit c488222

File tree

21 files changed

+1020
-656
lines changed

21 files changed

+1020
-656
lines changed

app/directives/profile-widget/profile-widget.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
h3.tenure(ng-if="profile.startMonth")
1414
| Member Since {{profile.startMonth}}
1515

16-
a.tc-btn.tc-btn-s.edit(ng-show="editProfileLink", ui-sref="settings.profile") Edit Profile
16+
a.tc-btn.tc-btn-m.edit(ng-show="editProfileLink", ui-sref="settings.profile") Edit Profile
1717

1818
.tracks-links
1919
.tracks
2020
.track(ng-repeat="track in (profile.tracks)", ng-click="profileVm.scrollTo(track)")
21-
div(class="{{profileVm.imgMap[track]}}-icon")
21+
div(class="track-icon {{profileVm.imgMap[track]}}-icon")
2222
div
2323
.text {{track | role}}
2424

app/directives/responsive-carousel/responsive-carousel.directive.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
activate();
1818

1919
function activate() {
20+
21+
$scope.$watchCollection('data', function(newValue, oldValue) {
22+
init();
23+
});
2024
init();
2125

2226
var window = angular.element($window);
@@ -72,8 +76,8 @@
7276
$scope.slideCounts[slidesCollection.length - 1] = slide.length;
7377
$scope.slidesCollection = slidesCollection;
7478
}
75-
79+
7680
}]
7781
};
7882
});
79-
})();
83+
})();

app/filters/rating-color.filter.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
function ratingColor() {
77
return function(rating) {
88
function ratingToColor(colors, rating) {
9+
// in case rating is a number formatted string
10+
if (typeof rating === 'string')
11+
rating = parseInt(rating.replace(",", ""));
912
colors = colors.filter(function(color) {
1013
return rating >= color.start && rating <= color.end;
1114
});

app/index.jade

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ html
259259
script(src="services/tags.service.js")
260260
script(src="services/tcAuth.service.js")
261261
script(src="services/user.service.js")
262+
script(src="services/userStats.service.js")
262263
script(src="settings/settings.module.js")
263264
script(src="settings/account-info/account-info.controller.js")
264265
script(src="settings/edit-profile/edit-profile.controller.js")

app/profile/about/about.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
profileVm.skillsPromise.then(function() {
6868
// show section if user is viewing his/her own profile OR if we have data
6969
vm.fullSkills = profileVm.skills;
70-
vm.someSkills = profileVm.skills.slice(0, 6);
70+
vm.someSkills = profileVm.skills.slice(0, 10);
7171
vm.skills = vm.someSkills;
7272
vm.displaySection.skills = profileVm.showEditProfileLink || !!vm.skills.length;
7373
});

app/profile/about/about.jade

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
.skill(ng-repeat="skill in vm.skills")
1616
skill-tile(skill="skill")
1717

18-
button.tc-btn.tc-btn-l.more(ng-if="vm.skills.length < vm.fullSkills.length", ng-click="vm.skills = vm.fullSkills") VIEW ALL
19-
button.tc-btn.tc-btn-l.more(ng-if="vm.skills.length > 6", ng-click="vm.skills = vm.someSkills") VIEW LESS
18+
button.tc-btn.tc-btn-m.more(ng-if="vm.skills.length < vm.fullSkills.length", ng-click="vm.skills = vm.fullSkills") VIEW ALL
19+
button.tc-btn.tc-btn-m.more(ng-if="vm.skills.length > 10", ng-click="vm.skills = vm.someSkills") VIEW LESS
2020

2121
.empty-state(ng-show="!profileVm.skills || (profileVm.skills && profileVm.skills.length == 0)")
2222
.action-text Tell everyone what you know
@@ -34,15 +34,13 @@
3434

3535
.categories
3636

37-
h3.activity Activity on Topcoder
38-
3937
.empty-state(ng-if="!profileVm.numProjects")
4038
.action-text Start competing within the community
4139
.tracks
4240
.track.noclick(ng-repeat="track in ['DEVELOP', 'DESIGN', 'DATA_SCIENCE']")
4341
div(class="{{profileVm.imgMap[track]}}-icon")
4442
div
45-
.text {{track | track}}
43+
.text {{track | track}}
4644
.description Compete in challenges to win money, test yourself against the world's best, and learn new skills. Your performance rating will show up here.
4745
a.tc-btn.tc-btn-l.link-button(href="/challenges") FIND CHALLENGES
4846

@@ -57,7 +55,7 @@
5755
img(ng-if="track == 'DEVELOP'", src="/images/ico-track-develop-outline.svg")
5856
img(ng-if="track == 'DESIGN'", src="/images/ico-track-design-outline.svg")
5957
img(ng-if="track == 'COPILOT'", src="/images/ico-track-co_pilot-outline.svg")
60-
span {{track | track | uppercase}}
58+
span {{track | track | uppercase}} ACTIVITY
6159

6260
a.subtrack(
6361
ng-repeat="subtrack in profileVm.categories[track] | orderBy:'mostRecentEventDate':true",
@@ -69,7 +67,6 @@
6967
.ranking(ng-if="subtrack.rating")
7068
.number.rating(style="color: {{subtrack.rating | ratingColor}}")
7169
| {{subtrack.rating}}
72-
span.square(style="background-color: {{subtrack.rating | ratingColor}}")
7370

7471
.tag Rating
7572

@@ -93,7 +90,7 @@
9390
#externalLinks
9491
tc-section(ng-show="vm.displaySection.externalLinks", state="profileVm.status.externalLinks")
9592
.external-links
96-
h3.activity Activity across the web
93+
h3.activity on the web
9794
external-links-data(ng-show="vm.hasLinks", external-links="vm.linkedExternalAccounts", linked-accounts-data="vm.linkedExternalAccountsData")
9895

9996
.empty-state(ng-hide="vm.hasLinks")

0 commit comments

Comments
 (0)