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

Sup 2409 mobile dashboard #543

Merged
merged 3 commits into from
Nov 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/directives/header/header-menu-item.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -23,6 +24,7 @@

return true;
}

return false;
}
}]
Expand Down
17 changes: 11 additions & 6 deletions app/layout/footer/footer.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes links work locally and per environment

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
15 changes: 6 additions & 9 deletions app/layout/header/header.jade
Original file line number Diff line number Diff line change
@@ -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 ]
Expand All @@ -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
Expand All @@ -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'}"
Expand All @@ -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
Expand Down
9 changes: 3 additions & 6 deletions app/services/nav.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
function NavService(CONSTANTS, $state, UserService, TcAuthService) {

var service = {

selectedTopLevelItem: null,
getParent: getParent

};

service.menuLinks = {
Expand Down Expand Up @@ -47,6 +45,7 @@
];

service.hrefs = {};

service.menuLinks.compete.forEach(function(link) {
link.parent = 'compete';
service.hrefs[link.href] = link;
Expand All @@ -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) {
Expand All @@ -82,9 +82,6 @@
}
}


return service;

}

})();
114 changes: 57 additions & 57 deletions app/sitemap/sitemap.jade
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is in correct? Shouldn't this be dynamic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't make any changes to this file except adding a space between SITE and MAP, the rest is improper indenting that Sublime Text auto fixed. I haven't taken a look at the site map code - but I can make the necessary updates if we want to change it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix these. These are minor issues so hopefully it doesn't take too
long.
Thanks

On Mon, Nov 9, 2015 at 12:36 PM, Nicholas Litwin [email protected]
wrote:

In app/sitemap/sitemap.jade
#543 (comment)
:

  •    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
    

I didn't make any changes to this file except adding a space between SITE
and MAP, the rest is improper indenting that Sublime Text auto fixed. I
haven't taken a look at the site map code - but I can make the necessary
updates if we want to change it.


Reply to this email directly or view it on GitHub
https://github.com/appirio-tech/topcoder-app/pull/543/files#r44327588.

Thanks
Parth Shah

li
a(href="/settings/profile") Settings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be "ui-sref"?

13 changes: 13 additions & 0 deletions assets/css/layout/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@
height: 27px;
}
}

.bottom-footer nav {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moves the footer links up to connect with the mobile nav links.

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) {
Expand Down
33 changes: 25 additions & 8 deletions assets/css/layout/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

border-box fixes the search bar going off the screen

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;
Expand Down Expand Up @@ -193,13 +194,20 @@
width: 31px;
vertical-align: middle;
border-radius: 50%;
@media only screen and (max-width: 1024px) {
margin-right: 10px;
}
}

.username {
vertical-align: middle;
&.underline {
padding-bottom: 12px;
border-bottom: 2px $primary solid;
@media only screen and (max-width: 1024px) {
padding-bottom: 0;
border-bottom: none;
}
}
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}
}

Expand Down