diff --git a/app/directives/header/header-menu-item.directive.js b/app/directives/header/header-menu-item.directive.js index e8465ce53..d484d0b71 100644 --- a/app/directives/header/header-menu-item.directive.js +++ b/app/directives/header/header-menu-item.directive.js @@ -13,8 +13,9 @@ var href = $scope.item.href; // I believe I have to hack this because of https://github.com/angular-ui/ui-router/issues/395, I tried ui-state - if ($scope.item.srefParams) + if ($scope.item.srefParams) { $scope.wtfhref = $state.href($scope.item.sref, $scope.item.srefParams); + } $scope.isActive = function() { if (window.location.pathname == href || $state.is(sref)) { @@ -23,6 +24,7 @@ return true; } + return false; } }] diff --git a/app/layout/footer/footer.jade b/app/layout/footer/footer.jade index 2f83b3c2e..01e24216b 100644 --- a/app/layout/footer/footer.jade +++ b/app/layout/footer/footer.jade @@ -2,20 +2,25 @@ footer.bottom-footer // Footer links nav.menu-item .menu-item-header.show-small OTHERS + ul.submenu - li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/sitemap") SITEMAP] - li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/about") ABOUT US] - li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="/contact-us") CONTACT US] - li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://help.{{domain}}" target="_blank") HELP CENTER] - li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://www.{{domain}}/community/how-it-works/privacy-policy/") PRIVACY POLICY] - li.submenu-item #[a.menu-link(ng-click="$event.stopPropagation();" href="https://www.{{domain}}/community/how-it-works/terms/") TERMS] + li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/sitemap") SITE MAP] + li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/about") ABOUT US] + li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/contact-us") CONTACT US] + li.submenu-item #[a.menu-link(ng-href="https://help.{{domain}}" target="_blank") HELP CENTER] + li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/community/how-it-works/privacy-policy/") PRIVACY POLICY] + li.submenu-item #[a.menu-link(ng-href="https://www.{{domain}}/community/how-it-works/terms/") TERMS] // Social links .social-links p Topcoder is also on + a.fb-link(href="https://www.facebook.com/topcoder" target="fbwindow") + a.twitter-link(href="http://www.twitter.com/topcoder" target="twwindow") + a.linkedin-link(href="https://www.linkedin.com/company/topcoder" target="liwindow") + a.google-link(href="https://plus.google.com/u/0/b/104268008777050019973/104268008777050019973/posts" target="gpwindow") p.copyright-notice © 2015 Topcoder. All Rights Reserved diff --git a/app/layout/header/header.jade b/app/layout/header/header.jade index 37fd76873..343f6dff5 100644 --- a/app/layout/header/header.jade +++ b/app/layout/header/header.jade @@ -1,6 +1,7 @@ .header-wrapper(ng-class="{'autocomplete': main.searchTerm.length > 0}") header.top-header a.logo-link(href="/") + // Header content visible on small screens .show-small.mobile-heading span.tc-text-logo(ng-if="main.menuVisible") [ topcoder ] @@ -11,8 +12,8 @@ // User link (profile or join) a(ui-sref="profile.about({userHandle: vm.userHandle})", ng-switch="vm.isAuth" class="user-link" data-ng-if="!main.menuVisible") - //- img(ng-switch-when="true", class="user-avatar", ng-src="{{vm.profile.photoURL}}") img(ng-switch-when="true", ng-if="vm.profile.photoURL && vm.profile.photoURL.length", class="user-avatar", ng-src="{{vm.profile.photoURL}}") + img(ng-switch-when="true", ng-if="!vm.profile.photoURL || !vm.profile.photoURL.length", class="user-avatar", ng-src="/images/ico-user-default.svg") span(ng-switch-when="false" class="tc-btn tc-btn-s") JOIN @@ -29,7 +30,7 @@ // a(href="javascript:;" class="menu-link") {{suggestion}} li.menu-item.link-group.user-menu(ng-switch="vm.isAuth", ng-class="{'anonymous-menu': !vm.isAuth}") - // links for logged in user + // Links for logged in user div(ng-switch-when="true") .menu-item-header( ng-class="{'hide': vm.selectedGroup() == 'user'}" @@ -52,20 +53,16 @@ //- a.menu-link(ng-click="vm.logout(); main.menuVisible = vm.isAuth = false") a.menu-link(ui-sref="logout") img.menu-icon(ng-src="/images/nav/exit.svg") + .menu-text LOG OUT - // links for anonymous user + // Links for anonymous user .menu-item-header(ng-switch-when="false") a.tc-btn.tc-btn-s.btn-link(ui-sref="register") JOIN a.tc-btn.tc-btn-s.tc-btn-ghost.btn-link(ui-sref="login") LOG IN - //- a(ng-click="launchIntro();", ng-show="!!vm.introOptions") Intro - - li.menu-item.link-group( - ng-repeat="(menu, items) in vm.menuLinks", - ng-class="{'selected': vm.selectedGroup() == menu}" - ) + li.menu-item.link-group(ng-repeat="(menu, items) in vm.menuLinks", ng-class="{'selected': vm.selectedGroup() == menu}") .menu-item-header {{menu}} ul.submenu diff --git a/app/services/nav.service.js b/app/services/nav.service.js index a10926048..7a0325fa3 100644 --- a/app/services/nav.service.js +++ b/app/services/nav.service.js @@ -8,10 +8,8 @@ function NavService(CONSTANTS, $state, UserService, TcAuthService) { var service = { - selectedTopLevelItem: null, getParent: getParent - }; service.menuLinks = { @@ -47,6 +45,7 @@ ]; service.hrefs = {}; + service.menuLinks.compete.forEach(function(link) { link.parent = 'compete'; service.hrefs[link.href] = link; @@ -68,8 +67,9 @@ }); function getParent(ref) { - if (ref.indexOf('.') >= 0) + if (ref.indexOf('.') >= 0) { ref = ref.slice(0, ref.indexOf('.')); + } if (ref.match(/profile/)) { if (TcAuthService.isAuthenticated() && $state.params && $state.params.userHandle == UserService.getUserIdentity().handle) { @@ -82,9 +82,6 @@ } } - return service; - } - })(); diff --git a/app/sitemap/sitemap.jade b/app/sitemap/sitemap.jade index 4624a5a15..4be8aace8 100644 --- a/app/sitemap/sitemap.jade +++ b/app/sitemap/sitemap.jade @@ -1,58 +1,58 @@ .sitemap-container - h1.page-header SITEMAP - - .sitemap-wrapper - section.sitemap-nav - h2.sitemap-header Compete - ul - li - a(href="/challenges/design/active") Design Challenges - li - a(href="/challenges/develop/active") Development Challenges - li - a(href="/challenges/data/active") Data Science Challenges - li - a(href="//arena.topcoder.com/") Single Round Matches - - - section.sitemap-nav.hide-small - h2.sitemap-header Learn - ul - li - a(href="/community/design") Design - li - a(href="/community/devlopment") Development - li - a(href="/community/data-science") Data Science - li - a(href="/community/competitive programming") Competitive Programming - - section.sitemap-nav - h2.sitemap-header Community - ul - li - a(href="/community") Home - li - a(href="/community/members") Members - li - a(href="/community/member-programs") Programs - li - a(href="//apps.topcoder.com/forums") Forums - li - a(href="/community/statistics") Statistics - li - a(href="/community/events") Events - li - a(href="/blog") Blog - - section.sitemap-nav.hide-small - h2.sitemap-header My Account - ul - li - a(href="/my-dashboard") Dashboard - li - a(href="/members/") My Profile - li - a(href="/settings/profile") Settings - - + h1.page-header SITE MAP + + .sitemap-wrapper + section.sitemap-nav + h2.sitemap-header Compete + ul + li + a(href="/challenges/design/active") Design Challenges + li + a(href="/challenges/develop/active") Development Challenges + li + a(href="/challenges/data/active") Data Science Challenges + li + a(href="//arena.topcoder.com/") Single Round Matches + + + section.sitemap-nav.hide-small + h2.sitemap-header Learn + ul + li + a(href="/community/design") Design + li + a(href="/community/devlopment") Development + li + a(href="/community/data-science") Data Science + li + a(href="/community/competitive programming") Competitive Programming + + section.sitemap-nav + h2.sitemap-header Community + ul + li + a(href="/community") Home + li + a(href="/community/members") Members + li + a(href="/community/member-programs") Programs + li + a(href="//apps.topcoder.com/forums") Forums + li + a(href="/community/statistics") Statistics + li + a(href="/community/events") Events + li + a(href="/blog") Blog + + section.sitemap-nav.hide-small + h2.sitemap-header My Account + ul + li + a(href="/my-dashboard") Dashboard + li + a(href="/members/") My Profile + li + a(href="/settings/profile") Settings + + diff --git a/assets/css/layout/footer.scss b/assets/css/layout/footer.scss index 349caa546..0860b6586 100644 --- a/assets/css/layout/footer.scss +++ b/assets/css/layout/footer.scss @@ -71,6 +71,19 @@ height: 27px; } } + + .bottom-footer nav { + position: absolute; + top: 997px; + left: 0; + width: 100%; + padding: 20px; + background-color: $gray-darkest; + + ul a { + color: $white; + } + } } @media only screen and (min-width : 1025px) { diff --git a/assets/css/layout/header.scss b/assets/css/layout/header.scss index 1473c205d..2fb7f5af6 100644 --- a/assets/css/layout/header.scss +++ b/assets/css/layout/header.scss @@ -148,17 +148,18 @@ .search-wrapper { input { - font-weight: bold; - border: 1px solid #7f7f7f; - color: #fff; - border-radius: 4px; display: block; + box-sizing: border-box; height: 32px; width: 100%; padding: 0 15px 0 37px; background: transparent; - outline: none; + border: 1px solid #7f7f7f; + border-radius: 4px; box-shadow: none; + outline: none; + font-weight: bold; + color: #fff; &:focus { outline: none; @@ -193,6 +194,9 @@ width: 31px; vertical-align: middle; border-radius: 50%; + @media only screen and (max-width: 1024px) { + margin-right: 10px; + } } .username { @@ -200,6 +204,10 @@ &.underline { padding-bottom: 12px; border-bottom: 2px $primary solid; + @media only screen and (max-width: 1024px) { + padding-bottom: 0; + border-bottom: none; + } } } @@ -212,8 +220,17 @@ text-transform: uppercase; } +.user-menu .submenu { + padding-top: 5px; +} + .submenu { font-size: 14px; + @media only screen and (max-width: 1024px) { + .submenu-item { + margin-top: 3px; + } + } } .suggestion-list { @@ -297,11 +314,11 @@ } .top-header { - padding: 0 20px; + padding: 0 20px 20px; .logo-link:after { - margin-top: 17px; - margin-left: 4px; + margin-top: 21px; + margin-left: -3px; } }