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

Commit dc05621

Browse files
committed
Merge pull request #543 from appirio-tech/sup-2409-mobile-dashboard
Sup 2409 mobile dashboard
2 parents 471a74e + aa4fce5 commit dc05621

File tree

7 files changed

+118
-87
lines changed

7 files changed

+118
-87
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/footer/footer.jade

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@ footer.bottom-footer
22
// Footer links
33
nav.menu-item
44
.menu-item-header.show-small OTHERS
5+
56
ul.submenu
6-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/sitemap") SITEMAP]
7-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/about") ABOUT US]
8-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/contact-us") CONTACT US]
9-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://help.{{domain}}" target="_blank") HELP CENTER]
10-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://www.{{domain}}/community/how-it-works/privacy-policy/") PRIVACY POLICY]
11-
li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://www.{{domain}}/community/how-it-works/terms/") TERMS]
7+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/sitemap") SITE MAP]
8+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/about") ABOUT US]
9+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/contact-us") CONTACT US]
10+
li.submenu-item #[a.menu-link(ng-href="https://help.{{domain}}" target="_blank") HELP CENTER]
11+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/community/how-it-works/privacy-policy/") PRIVACY POLICY]
12+
li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/community/how-it-works/terms/") TERMS]
1213

1314
// Social links
1415
.social-links
1516
p Topcoder is also on
17+
1618
a.fb-link(href="https://www.facebook.com/topcoder" target="fbwindow")
19+
1720
a.twitter-link(href="http://www.twitter.com/topcoder" target="twwindow")
21+
1822
a.linkedin-link(href="https://www.linkedin.com/company/topcoder" target="liwindow")
23+
1924
a.google-link(href="https://plus.google.com/u/0/b/104268008777050019973/104268008777050019973/posts" target="gpwindow")
2025

2126
p.copyright-notice © 2015 Topcoder. All Rights Reserved

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+

assets/css/layout/footer.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,19 @@
7171
height: 27px;
7272
}
7373
}
74+
75+
.bottom-footer nav {
76+
position: absolute;
77+
top: 997px;
78+
left: 0;
79+
width: 100%;
80+
padding: 20px;
81+
background-color: $gray-darkest;
82+
83+
ul a {
84+
color: $white;
85+
}
86+
}
7487
}
7588

7689
@media only screen and (min-width : 1025px) {

assets/css/layout/header.scss

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,18 @@
148148

149149
.search-wrapper {
150150
input {
151-
font-weight: bold;
152-
border: 1px solid #7f7f7f;
153-
color: #fff;
154-
border-radius: 4px;
155151
display: block;
152+
box-sizing: border-box;
156153
height: 32px;
157154
width: 100%;
158155
padding: 0 15px 0 37px;
159156
background: transparent;
160-
outline: none;
157+
border: 1px solid #7f7f7f;
158+
border-radius: 4px;
161159
box-shadow: none;
160+
outline: none;
161+
font-weight: bold;
162+
color: #fff;
162163

163164
&:focus {
164165
outline: none;
@@ -193,13 +194,20 @@
193194
width: 31px;
194195
vertical-align: middle;
195196
border-radius: 50%;
197+
@media only screen and (max-width: 1024px) {
198+
margin-right: 10px;
199+
}
196200
}
197201

198202
.username {
199203
vertical-align: middle;
200204
&.underline {
201205
padding-bottom: 12px;
202206
border-bottom: 2px $primary solid;
207+
@media only screen and (max-width: 1024px) {
208+
padding-bottom: 0;
209+
border-bottom: none;
210+
}
203211
}
204212
}
205213

@@ -212,8 +220,17 @@
212220
text-transform: uppercase;
213221
}
214222

223+
.user-menu .submenu {
224+
padding-top: 5px;
225+
}
226+
215227
.submenu {
216228
font-size: 14px;
229+
@media only screen and (max-width: 1024px) {
230+
.submenu-item {
231+
margin-top: 3px;
232+
}
233+
}
217234
}
218235

219236
.suggestion-list {
@@ -297,11 +314,11 @@
297314
}
298315

299316
.top-header {
300-
padding: 0 20px;
317+
padding: 0 20px 20px;
301318

302319
.logo-link:after {
303-
margin-top: 17px;
304-
margin-left: 4px;
320+
margin-top: 21px;
321+
margin-left: -3px;
305322
}
306323
}
307324

0 commit comments

Comments
 (0)