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

Commit cdc78a7

Browse files
author
Nick Litwin
committed
Fix formatting
1 parent 471a74e commit cdc78a7

File tree

4 files changed

+69
-73
lines changed

4 files changed

+69
-73
lines changed

app/directives/header/header-menu-item.directive.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
var href = $scope.item.href;
1414

1515
// I believe I have to hack this because of https://github.com/angular-ui/ui-router/issues/395, I tried ui-state
16-
if ($scope.item.srefParams)
16+
if ($scope.item.srefParams) {
1717
$scope.wtfhref = $state.href($scope.item.sref, $scope.item.srefParams);
18+
}
1819

1920
$scope.isActive = function() {
2021
if (window.location.pathname == href || $state.is(sref)) {
@@ -23,6 +24,7 @@
2324

2425
return true;
2526
}
27+
2628
return false;
2729
}
2830
}]

app/layout/header/header.jade

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.header-wrapper(ng-class="{'autocomplete': main.searchTerm.length > 0}")
22
header.top-header
33
a.logo-link(href="/")
4+
45
// Header content visible on small screens
56
.show-small.mobile-heading
67
span.tc-text-logo(ng-if="main.menuVisible") [ topcoder ]
@@ -11,8 +12,8 @@
1112

1213
// User link (profile or join)
1314
a(ui-sref="profile.about({userHandle: vm.userHandle})", ng-switch="vm.isAuth" class="user-link" data-ng-if="!main.menuVisible")
14-
//- img(ng-switch-when="true", class="user-avatar", ng-src="{{vm.profile.photoURL}}")
1515
img(ng-switch-when="true", ng-if="vm.profile.photoURL && vm.profile.photoURL.length", class="user-avatar", ng-src="{{vm.profile.photoURL}}")
16+
1617
img(ng-switch-when="true", ng-if="!vm.profile.photoURL || !vm.profile.photoURL.length", class="user-avatar", ng-src="/images/ico-user-default.svg")
1718

1819
span(ng-switch-when="false" class="tc-btn tc-btn-s") JOIN
@@ -29,7 +30,7 @@
2930
// a(href="javascript:;" class="menu-link") {{suggestion}}
3031
3132
li.menu-item.link-group.user-menu(ng-switch="vm.isAuth", ng-class="{'anonymous-menu': !vm.isAuth}")
32-
// links for logged in user
33+
// Links for logged in user
3334
div(ng-switch-when="true")
3435
.menu-item-header(
3536
ng-class="{'hide': vm.selectedGroup() == 'user'}"
@@ -52,20 +53,16 @@
5253
//- a.menu-link(ng-click="vm.logout(); main.menuVisible = vm.isAuth = false")
5354
a.menu-link(ui-sref="logout")
5455
img.menu-icon(ng-src="/images/nav/exit.svg")
56+
5557
.menu-text LOG OUT
5658

57-
// links for anonymous user
59+
// Links for anonymous user
5860
.menu-item-header(ng-switch-when="false")
5961
a.tc-btn.tc-btn-s.btn-link(ui-sref="register") JOIN
6062

6163
a.tc-btn.tc-btn-s.tc-btn-ghost.btn-link(ui-sref="login") LOG IN
6264

63-
//- a(ng-click="launchIntro();", ng-show="!!vm.introOptions") Intro
64-
65-
li.menu-item.link-group(
66-
ng-repeat="(menu, items) in vm.menuLinks",
67-
ng-class="{'selected': vm.selectedGroup() == menu}"
68-
)
65+
li.menu-item.link-group(ng-repeat="(menu, items) in vm.menuLinks", ng-class="{'selected': vm.selectedGroup() == menu}")
6966
.menu-item-header {{menu}}
7067

7168
ul.submenu

app/services/nav.service.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
function NavService(CONSTANTS, $state, UserService, TcAuthService) {
99

1010
var service = {
11-
1211
selectedTopLevelItem: null,
1312
getParent: getParent
14-
1513
};
1614

1715
service.menuLinks = {
@@ -47,6 +45,7 @@
4745
];
4846

4947
service.hrefs = {};
48+
5049
service.menuLinks.compete.forEach(function(link) {
5150
link.parent = 'compete';
5251
service.hrefs[link.href] = link;
@@ -68,8 +67,9 @@
6867
});
6968

7069
function getParent(ref) {
71-
if (ref.indexOf('.') >= 0)
70+
if (ref.indexOf('.') >= 0) {
7271
ref = ref.slice(0, ref.indexOf('.'));
72+
}
7373

7474
if (ref.match(/profile/)) {
7575
if (TcAuthService.isAuthenticated() && $state.params && $state.params.userHandle == UserService.getUserIdentity().handle) {
@@ -82,9 +82,6 @@
8282
}
8383
}
8484

85-
8685
return service;
87-
8886
}
89-
9087
})();

app/sitemap/sitemap.jade

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
.sitemap-container
2-
h1.page-header SITEMAP
3-
4-
.sitemap-wrapper
5-
section.sitemap-nav
6-
h2.sitemap-header Compete
7-
ul
8-
li
9-
a(href="/challenges/design/active") Design Challenges
10-
li
11-
a(href="/challenges/develop/active") Development Challenges
12-
li
13-
a(href="/challenges/data/active") Data Science Challenges
14-
li
15-
a(href="//arena.topcoder.com/") Single Round Matches
16-
17-
18-
section.sitemap-nav.hide-small
19-
h2.sitemap-header Learn
20-
ul
21-
li
22-
a(href="/community/design") Design
23-
li
24-
a(href="/community/devlopment") Development
25-
li
26-
a(href="/community/data-science") Data Science
27-
li
28-
a(href="/community/competitive programming") Competitive Programming
29-
30-
section.sitemap-nav
31-
h2.sitemap-header Community
32-
ul
33-
li
34-
a(href="/community") Home
35-
li
36-
a(href="/community/members") Members
37-
li
38-
a(href="/community/member-programs") Programs
39-
li
40-
a(href="//apps.topcoder.com/forums") Forums
41-
li
42-
a(href="/community/statistics") Statistics
43-
li
44-
a(href="/community/events") Events
45-
li
46-
a(href="/blog") Blog
47-
48-
section.sitemap-nav.hide-small
49-
h2.sitemap-header My Account
50-
ul
51-
li
52-
a(href="/my-dashboard") Dashboard
53-
li
54-
a(href="/members/") My Profile
55-
li
56-
a(href="/settings/profile") Settings
57-
58-
2+
h1.page-header SITE MAP
3+
4+
.sitemap-wrapper
5+
section.sitemap-nav
6+
h2.sitemap-header Compete
7+
ul
8+
li
9+
a(href="/challenges/design/active") Design Challenges
10+
li
11+
a(href="/challenges/develop/active") Development Challenges
12+
li
13+
a(href="/challenges/data/active") Data Science Challenges
14+
li
15+
a(href="//arena.topcoder.com/") Single Round Matches
16+
17+
18+
section.sitemap-nav.hide-small
19+
h2.sitemap-header Learn
20+
ul
21+
li
22+
a(href="/community/design") Design
23+
li
24+
a(href="/community/devlopment") Development
25+
li
26+
a(href="/community/data-science") Data Science
27+
li
28+
a(href="/community/competitive programming") Competitive Programming
29+
30+
section.sitemap-nav
31+
h2.sitemap-header Community
32+
ul
33+
li
34+
a(href="/community") Home
35+
li
36+
a(href="/community/members") Members
37+
li
38+
a(href="/community/member-programs") Programs
39+
li
40+
a(href="//apps.topcoder.com/forums") Forums
41+
li
42+
a(href="/community/statistics") Statistics
43+
li
44+
a(href="/community/events") Events
45+
li
46+
a(href="/blog") Blog
47+
48+
section.sitemap-nav.hide-small
49+
h2.sitemap-header My Account
50+
ul
51+
li
52+
a(href="/my-dashboard") Dashboard
53+
li
54+
a(href="/members/") My Profile
55+
li
56+
a(href="/settings/profile") Settings
57+
58+

0 commit comments

Comments
 (0)