diff --git a/README.md b/README.md index f21bc7d90..b1d5e8923 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,14 @@ In order to test a logged in user, you must make an entry in your `/etc/hosts` f - To create the build: `npm run build` - To run code linting: `npm run lint` - To run the tests: `npm test` - + +## Test Users +- general member user accounts: + - ksmith/Topcoder123$ + - dan_developer/dantopcoder123 +- Create your own: + - You may register your own account at https://local.topcoder-dev.com/register + ## Recommended Developer Tools Syntax highlighting for ES6 and React JSX diff --git a/app/directives/challenge-links/challenge-links.directive.js b/app/directives/challenge-links/challenge-links.directive.js index 04a25d70c..e5d4035de 100644 --- a/app/directives/challenge-links/challenge-links.directive.js +++ b/app/directives/challenge-links/challenge-links.directive.js @@ -12,6 +12,11 @@ import angular from 'angular' scope: { challenge: '=', view: '=' + }, + link: function(scope, element, attrs) { + element.on('click', function() { + window.location.href = $(this).attr('href') + }) } } }) diff --git a/app/directives/ios-card/ios-card.directive.js b/app/directives/ios-card/ios-card.directive.js index 52e234b59..16b431f9f 100644 --- a/app/directives/ios-card/ios-card.directive.js +++ b/app/directives/ios-card/ios-card.directive.js @@ -13,6 +13,7 @@ import angular from 'angular' }, controller: ['$scope', 'CONSTANTS', function($scope, CONSTANTS) { $scope.DOMAIN = CONSTANTS.domain + $scope.SUBDOMAIN = location.href.search('//members') >= 0 ? 'members' : 'www' }] } }) diff --git a/app/directives/ios-card/ios-card.jade b/app/directives/ios-card/ios-card.jade index 568e042a3..d3d7c1f34 100644 --- a/app/directives/ios-card/ios-card.jade +++ b/app/directives/ios-card/ios-card.jade @@ -3,18 +3,18 @@ header .top - a.name(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}") #[span {{challenge.name}}] + a.name(ng-href="https://{{SUBDOMAIN}}.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}") #[span {{challenge.name}}] p.subtrack-color {{challenge.subTrack | underscoreStrip}} .challenge-links .stats - a.registrants(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#viewRegistrant") + a.registrants(ng-href="https://{{SUBDOMAIN}}.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#viewRegistrant") .registrants-icon p {{challenge.numRegistrants}} - a.submissions(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#submissions") + a.submissions(ng-href="https://{{SUBDOMAIN}}.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#submissions") .submissions-icon p {{challenge.numSubmissions}} diff --git a/app/filters/challengeLinks.filter.js b/app/filters/challengeLinks.filter.js index 5204ba37b..67439916c 100644 --- a/app/filters/challengeLinks.filter.js +++ b/app/filters/challengeLinks.filter.js @@ -45,6 +45,7 @@ import _ from 'lodash' } else { data = { domain: CONSTANTS.domain, + subdomain: location.href.search('//members') >= 0 ? 'members' : 'www', track: challenge.track.toLowerCase(), forumId: challenge.forumId, id: challenge.id @@ -61,13 +62,13 @@ import _ from 'lodash' } /*eslint no-fallthrough:0*/ case 'submissions': - return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}#submissions', data) + return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}#submissions', data) case 'registrants': - return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}#viewRegistrant', data) + return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}#viewRegistrant', data) case 'submit':// TODO use details link for submit, we can replace it with new submission page url - return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}', data) + return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data) case 'detail': - return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}', data) + return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data) } } } diff --git a/app/my-dashboard/my-dashboard.jade b/app/my-dashboard/my-dashboard.jade index c1452f50e..4094dd765 100644 --- a/app/my-dashboard/my-dashboard.jade +++ b/app/my-dashboard/my-dashboard.jade @@ -7,6 +7,12 @@ //- .ttl //- tc-banner(theme="black", banner-name="ttl") + .tco.tco17 + .tc-banner-placeholder.black.bg-image + .title 2017 Topcoder Open + .subtitle The Ultimate Programming & Design tournament + .description Earn your way to the USA! + a(href="http://tco17.topcoder.com/").cta.tc-btn-white.tc-btn-radius Learn More .tco tc-banner(theme="black", banner-name="tco16") diff --git a/app/services/nav.service.js b/app/services/nav.service.js index d8b667d69..93469d7c5 100644 --- a/app/services/nav.service.js +++ b/app/services/nav.service.js @@ -30,7 +30,7 @@ import angular from 'angular' ], 'community': [ { 'sref': 'community.members', 'text': 'OVERVIEW', 'icon': require('../../assets/images/nav/members.svg') }, - { 'href': CONSTANTS.TCO16_URL, 'text': 'TCO16', 'icon': require('../../assets/images/nav/ico-tco16.svg'), 'target': '_blank' }, + { 'href': CONSTANTS.TCO_HOME_URL, 'text': 'TCO', 'icon': require('../../assets/images/nav/tco-generic.svg'), 'target': '_blank' }, { 'href': '/community/member-programs/', 'text': 'PROGRAMS', 'icon': require('../../assets/images/nav/programs.svg') }, { 'href': CONSTANTS.FORUMS_APP_URL, 'text': 'FORUMS', 'icon': require('../../assets/images/nav/forums.svg') }, { 'sref': 'community.statistics', 'text': 'STATISTICS', 'icon': require('../../assets/images/nav/statistics.svg') }, diff --git a/app/topcoder.constants.js b/app/topcoder.constants.js index 7fabeac94..43094cba2 100644 --- a/app/topcoder.constants.js +++ b/app/topcoder.constants.js @@ -20,6 +20,8 @@ angular.module('CONSTANTS', []).constant('CONSTANTS', { 'PHOTO_LINK_LOCATION' : process.env.PHOTO_LINK_LOCATION, 'SWIFT_PROGRAM_URL' : process.env.SWIFT_PROGRAM_URL, 'TCO16_URL' : process.env.TCO16_URL, + 'TCO17_URL' : process.env.TCO17_URL, + 'TCO_HOME_URL' : process.env.TCO_HOME_URL, 'ACCOUNTS_APP_URL' : process.env.ACCOUNTS_APP_URL, 'FILE_PICKER_API_KEY' : process.env.FILE_PICKER_API_KEY, 'FILE_PICKER_SUBMISSION_CONTAINER_NAME': process.env.FILE_PICKER_SUBMISSION_CONTAINER_NAME, diff --git a/assets/css/directives/tc-banner.scss b/assets/css/directives/tc-banner.scss index b9b11d802..ea9489f69 100644 --- a/assets/css/directives/tc-banner.scss +++ b/assets/css/directives/tc-banner.scss @@ -3,6 +3,10 @@ $tco-color: #F47A20; $tco-color-dark: #ea690b; +.tco17 { + margin-bottom: 10px; +} + .tc-banner-placeholder { display: flex; flex-direction: column; @@ -113,6 +117,11 @@ $tco-color-dark: #ea690b; color: $white; } + .subtitle { + @extend .title; + @include sofia-pro-regular; + } + .description { color: $white; } @@ -124,4 +133,41 @@ $tco-color-dark: #ea690b; } } } + + .tc-btn-white { + background-color: white; + color: #0096FF; + padding: 10px 20px; + margin-top: 5px; + } + + .tc-btn-radius { + border-radius: 26px; + } +} +.tc-banner-placeholder.bg-image { + background-image: url(../../images/home-hero.jpg); + background-size: 100%; + height: 352px; + background-position: center 40%; + background-repeat: no-repeat; + + padding-top: 50px; + padding-right: 350px; + + .title { + font-size: 36px; + margin-bottom: 5px; + margin-top: 10px; + } + + .subtitle { + margin-top: 20px; + width: 450px; + } + + .cta { + margin-top: 20px; + } } + diff --git a/assets/css/my-dashboard/my-dashboard.scss b/assets/css/my-dashboard/my-dashboard.scss index c60aca5eb..e835fee50 100644 --- a/assets/css/my-dashboard/my-dashboard.scss +++ b/assets/css/my-dashboard/my-dashboard.scss @@ -34,6 +34,7 @@ } } + .challenges, .srms, .programs, .tco, .ttl, .community-updates { padding-top: 0px; } diff --git a/assets/images/home-hero.jpg b/assets/images/home-hero.jpg new file mode 100644 index 000000000..29183b413 Binary files /dev/null and b/assets/images/home-hero.jpg differ diff --git a/assets/images/nav/blog.svg b/assets/images/nav/blog.svg index 7d49875d1..a1fb066be 100644 --- a/assets/images/nav/blog.svg +++ b/assets/images/nav/blog.svg @@ -1,17 +1 @@ - - - - nav/blog - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/book-cp.svg b/assets/images/nav/book-cp.svg index 1a3644302..da6235f6a 100644 --- a/assets/images/nav/book-cp.svg +++ b/assets/images/nav/book-cp.svg @@ -1,14 +1 @@ - - - - nav/book-cp - Created with Sketch. - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/book-data.svg b/assets/images/nav/book-data.svg index 8f1a4c04f..ccd5e5e10 100644 --- a/assets/images/nav/book-data.svg +++ b/assets/images/nav/book-data.svg @@ -1,21 +1 @@ - - - - nav/book-data - Created with Sketch. - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/book-design.svg b/assets/images/nav/book-design.svg index f43da7f91..09594ed84 100644 --- a/assets/images/nav/book-design.svg +++ b/assets/images/nav/book-design.svg @@ -1,14 +1 @@ - - - - nav/book-design - Created with Sketch. - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/book-develop.svg b/assets/images/nav/book-develop.svg index 2608e163b..d18293957 100644 --- a/assets/images/nav/book-develop.svg +++ b/assets/images/nav/book-develop.svg @@ -1,17 +1 @@ - - - - nav/book-develop - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/book-tutorials.svg b/assets/images/nav/book-tutorials.svg index 3e2e21ec6..ce026cdb3 100644 --- a/assets/images/nav/book-tutorials.svg +++ b/assets/images/nav/book-tutorials.svg @@ -1,17 +1 @@ - - - - nav/book-tutorials - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/community.svg b/assets/images/nav/community.svg index b04727bdc..cbb9be926 100644 --- a/assets/images/nav/community.svg +++ b/assets/images/nav/community.svg @@ -1,15 +1 @@ - - - - nav/community - Created with Sketch. - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/dashboard.svg b/assets/images/nav/dashboard.svg index f0bb741c8..083934db6 100644 --- a/assets/images/nav/dashboard.svg +++ b/assets/images/nav/dashboard.svg @@ -1,18 +1 @@ - - - - nav/dashboard - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/data-science.svg b/assets/images/nav/data-science.svg new file mode 100644 index 000000000..5ad1513cd --- /dev/null +++ b/assets/images/nav/data-science.svg @@ -0,0 +1 @@ +icons/nav/data-science \ No newline at end of file diff --git a/assets/images/nav/events.svg b/assets/images/nav/events.svg index ce495ca2f..733691cc3 100644 --- a/assets/images/nav/events.svg +++ b/assets/images/nav/events.svg @@ -1,19 +1 @@ - - - - nav/events - Created with Sketch. - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/exit.svg b/assets/images/nav/exit.svg index 21b43802f..ccb3120e7 100644 --- a/assets/images/nav/exit.svg +++ b/assets/images/nav/exit.svg @@ -1,15 +1 @@ - - - - nav/exit - Created with Sketch. - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/forums.svg b/assets/images/nav/forums.svg index ebb3af996..f8ed557f2 100644 --- a/assets/images/nav/forums.svg +++ b/assets/images/nav/forums.svg @@ -1,14 +1 @@ - - - - nav/forums - Created with Sketch. - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/help.svg b/assets/images/nav/help.svg index 315776385..43a8e4f49 100644 --- a/assets/images/nav/help.svg +++ b/assets/images/nav/help.svg @@ -1,13 +1 @@ - - - - nav/help - Created with Sketch. - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/ico-tco16.svg b/assets/images/nav/ico-tco16.svg index b9f20330e..ba4dd1abd 100644 --- a/assets/images/nav/ico-tco16.svg +++ b/assets/images/nav/ico-tco16.svg @@ -1,65 +1 @@ - - - - tco16-bah - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/members.svg b/assets/images/nav/members.svg index d9680b5d6..4a2fe5653 100644 --- a/assets/images/nav/members.svg +++ b/assets/images/nav/members.svg @@ -1,14 +1 @@ - - - - nav/members - Created with Sketch. - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/profile.svg b/assets/images/nav/profile.svg index 5e9e6b161..46afcaac0 100644 --- a/assets/images/nav/profile.svg +++ b/assets/images/nav/profile.svg @@ -1,14 +1 @@ - - - - nav/profile - Created with Sketch. - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/programs.svg b/assets/images/nav/programs.svg index 5bb848fc1..4441b49c9 100644 --- a/assets/images/nav/programs.svg +++ b/assets/images/nav/programs.svg @@ -1,16 +1 @@ - - - - nav/programs - Created with Sketch. - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/rocket.svg b/assets/images/nav/rocket.svg index 260981a45..513f6517b 100644 --- a/assets/images/nav/rocket.svg +++ b/assets/images/nav/rocket.svg @@ -1,16 +1 @@ - - - - nav/rocket - Created with Sketch. - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/settings.svg b/assets/images/nav/settings.svg index dba5bdede..71859faaf 100644 --- a/assets/images/nav/settings.svg +++ b/assets/images/nav/settings.svg @@ -1,13 +1 @@ - - - - nav/settings - Created with Sketch. - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/statistics.svg b/assets/images/nav/statistics.svg index a018bb7d8..21874ed8d 100644 --- a/assets/images/nav/statistics.svg +++ b/assets/images/nav/statistics.svg @@ -1,14 +1 @@ - - - - nav/statistics - Created with Sketch. - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/tco-generic.svg b/assets/images/nav/tco-generic.svg new file mode 100644 index 000000000..c187ee936 --- /dev/null +++ b/assets/images/nav/tco-generic.svg @@ -0,0 +1,19 @@ + + + + nav/tco-generic + Created with Sketch. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/images/nav/track-copilot.svg b/assets/images/nav/track-copilot.svg index bd92fa282..f65b69190 100644 --- a/assets/images/nav/track-copilot.svg +++ b/assets/images/nav/track-copilot.svg @@ -1,18 +1 @@ - - - - nav/track-copilot - Created with Sketch. - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/track-cp.svg b/assets/images/nav/track-cp.svg index 05442fd8a..2c86a0884 100644 --- a/assets/images/nav/track-cp.svg +++ b/assets/images/nav/track-cp.svg @@ -1,16 +1 @@ - - - - nav/track-cp - Created with Sketch. - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/track-data.svg b/assets/images/nav/track-data.svg index 4d12fbd9f..830aac685 100644 --- a/assets/images/nav/track-data.svg +++ b/assets/images/nav/track-data.svg @@ -1,22 +1 @@ - - - - nav/track-data - Created with Sketch. - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/track-design.svg b/assets/images/nav/track-design.svg index fbe7f11ce..a2cc7a0e7 100644 --- a/assets/images/nav/track-design.svg +++ b/assets/images/nav/track-design.svg @@ -1,17 +1 @@ - - - - nav/track-design - Created with Sketch. - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/track-develop.svg b/assets/images/nav/track-develop.svg index 1b70e1633..4b76ac1b5 100644 --- a/assets/images/nav/track-develop.svg +++ b/assets/images/nav/track-develop.svg @@ -1,16 +1 @@ - - - - nav/track-develop - Created with Sketch. - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/images/nav/wallet.svg b/assets/images/nav/wallet.svg index e202430ff..8621bdb2f 100644 --- a/assets/images/nav/wallet.svg +++ b/assets/images/nav/wallet.svg @@ -1,15 +1 @@ - - - - nav/wallet - Created with Sketch. - - - - - - - - - - \ No newline at end of file + \ No newline at end of file