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

Commit c72e59c

Browse files
author
vikasrohit
authored
Merge pull request #878 from appirio-tech/qa-integration
Promoting to Prod (Members Subdomain and TCO17)
2 parents 6bfc5f5 + 4c37b79 commit c72e59c

38 files changed

+123
-459
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ In order to test a logged in user, you must make an entry in your `/etc/hosts` f
2020
- To create the build: `npm run build`
2121
- To run code linting: `npm run lint`
2222
- To run the tests: `npm test`
23-
23+
24+
## Test Users
25+
- general member user accounts:
26+
- ksmith/Topcoder123$
27+
- dan_developer/dantopcoder123
28+
- Create your own:
29+
- You may register your own account at https://local.topcoder-dev.com/register
30+
2431
## Recommended Developer Tools
2532

2633
Syntax highlighting for ES6 and React JSX

app/directives/challenge-links/challenge-links.directive.js

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import angular from 'angular'
1212
scope: {
1313
challenge: '=',
1414
view: '='
15+
},
16+
link: function(scope, element, attrs) {
17+
element.on('click', function() {
18+
window.location.href = $(this).attr('href')
19+
})
1520
}
1621
}
1722
})

app/directives/ios-card/ios-card.directive.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import angular from 'angular'
1313
},
1414
controller: ['$scope', 'CONSTANTS', function($scope, CONSTANTS) {
1515
$scope.DOMAIN = CONSTANTS.domain
16+
$scope.SUBDOMAIN = location.href.search('//members') >= 0 ? 'members' : 'www'
1617
}]
1718
}
1819
})

app/directives/ios-card/ios-card.jade

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33

44
header
55
.top
6-
a.name(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}") #[span {{challenge.name}}]
6+
a.name(ng-href="https://{{SUBDOMAIN}}.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}") #[span {{challenge.name}}]
77

88
p.subtrack-color {{challenge.subTrack | underscoreStrip}}
99

1010
.challenge-links
1111
.stats
12-
a.registrants(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#viewRegistrant")
12+
a.registrants(ng-href="https://{{SUBDOMAIN}}.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#viewRegistrant")
1313
.registrants-icon
1414

1515
p {{challenge.numRegistrants}}
1616

17-
a.submissions(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#submissions")
17+
a.submissions(ng-href="https://{{SUBDOMAIN}}.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#submissions")
1818
.submissions-icon
1919

2020
p {{challenge.numSubmissions}}

app/filters/challengeLinks.filter.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import _ from 'lodash'
4545
} else {
4646
data = {
4747
domain: CONSTANTS.domain,
48+
subdomain: location.href.search('//members') >= 0 ? 'members' : 'www',
4849
track: challenge.track.toLowerCase(),
4950
forumId: challenge.forumId,
5051
id: challenge.id
@@ -61,13 +62,13 @@ import _ from 'lodash'
6162
}
6263
/*eslint no-fallthrough:0*/
6364
case 'submissions':
64-
return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}#submissions', data)
65+
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}#submissions', data)
6566
case 'registrants':
66-
return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}#viewRegistrant', data)
67+
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}#viewRegistrant', data)
6768
case 'submit':// TODO use details link for submit, we can replace it with new submission page url
68-
return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}', data)
69+
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data)
6970
case 'detail':
70-
return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}', data)
71+
return String.supplant('https://{subdomain}.{domain}/challenge-details/{id}/?type={track}', data)
7172
}
7273
}
7374
}

app/my-dashboard/my-dashboard.jade

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
//- .ttl
99
//- tc-banner(theme="black", banner-name="ttl")
10+
.tco.tco17
11+
.tc-banner-placeholder.black.bg-image
12+
.title 2017 Topcoder Open
13+
.subtitle The Ultimate Programming & Design tournament
14+
.description Earn your way to the USA!
15+
a(href="http://tco17.topcoder.com/").cta.tc-btn-white.tc-btn-radius Learn More
1016

1117
.tco
1218
tc-banner(theme="black", banner-name="tco16")

app/services/nav.service.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import angular from 'angular'
3030
],
3131
'community': [
3232
{ 'sref': 'community.members', 'text': 'OVERVIEW', 'icon': require('../../assets/images/nav/members.svg') },
33-
{ 'href': CONSTANTS.TCO16_URL, 'text': 'TCO16', 'icon': require('../../assets/images/nav/ico-tco16.svg'), 'target': '_blank' },
33+
{ 'href': CONSTANTS.TCO_HOME_URL, 'text': 'TCO', 'icon': require('../../assets/images/nav/tco-generic.svg'), 'target': '_blank' },
3434
{ 'href': '/community/member-programs/', 'text': 'PROGRAMS', 'icon': require('../../assets/images/nav/programs.svg') },
3535
{ 'href': CONSTANTS.FORUMS_APP_URL, 'text': 'FORUMS', 'icon': require('../../assets/images/nav/forums.svg') },
3636
{ 'sref': 'community.statistics', 'text': 'STATISTICS', 'icon': require('../../assets/images/nav/statistics.svg') },

app/topcoder.constants.js

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ angular.module('CONSTANTS', []).constant('CONSTANTS', {
2020
'PHOTO_LINK_LOCATION' : process.env.PHOTO_LINK_LOCATION,
2121
'SWIFT_PROGRAM_URL' : process.env.SWIFT_PROGRAM_URL,
2222
'TCO16_URL' : process.env.TCO16_URL,
23+
'TCO17_URL' : process.env.TCO17_URL,
24+
'TCO_HOME_URL' : process.env.TCO_HOME_URL,
2325
'ACCOUNTS_APP_URL' : process.env.ACCOUNTS_APP_URL,
2426
'FILE_PICKER_API_KEY' : process.env.FILE_PICKER_API_KEY,
2527
'FILE_PICKER_SUBMISSION_CONTAINER_NAME': process.env.FILE_PICKER_SUBMISSION_CONTAINER_NAME,

assets/css/directives/tc-banner.scss

+46
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
$tco-color: #F47A20;
44
$tco-color-dark: #ea690b;
55

6+
.tco17 {
7+
margin-bottom: 10px;
8+
}
9+
610
.tc-banner-placeholder {
711
display: flex;
812
flex-direction: column;
@@ -113,6 +117,11 @@ $tco-color-dark: #ea690b;
113117
color: $white;
114118
}
115119

120+
.subtitle {
121+
@extend .title;
122+
@include sofia-pro-regular;
123+
}
124+
116125
.description {
117126
color: $white;
118127
}
@@ -124,4 +133,41 @@ $tco-color-dark: #ea690b;
124133
}
125134
}
126135
}
136+
137+
.tc-btn-white {
138+
background-color: white;
139+
color: #0096FF;
140+
padding: 10px 20px;
141+
margin-top: 5px;
142+
}
143+
144+
.tc-btn-radius {
145+
border-radius: 26px;
146+
}
147+
}
148+
.tc-banner-placeholder.bg-image {
149+
background-image: url(../../images/home-hero.jpg);
150+
background-size: 100%;
151+
height: 352px;
152+
background-position: center 40%;
153+
background-repeat: no-repeat;
154+
155+
padding-top: 50px;
156+
padding-right: 350px;
157+
158+
.title {
159+
font-size: 36px;
160+
margin-bottom: 5px;
161+
margin-top: 10px;
162+
}
163+
164+
.subtitle {
165+
margin-top: 20px;
166+
width: 450px;
167+
}
168+
169+
.cta {
170+
margin-top: 20px;
171+
}
127172
}
173+

assets/css/my-dashboard/my-dashboard.scss

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
}
3535
}
3636

37+
3738
.challenges, .srms, .programs, .tco, .ttl, .community-updates {
3839
padding-top: 0px;
3940
}

assets/images/home-hero.jpg

106 KB
Loading

assets/images/nav/blog.svg

+1-17
Loading

assets/images/nav/book-cp.svg

+1-14
Loading

assets/images/nav/book-data.svg

+1-21
Loading

assets/images/nav/book-design.svg

+1-14
Loading

assets/images/nav/book-develop.svg

+1-17
Loading

0 commit comments

Comments
 (0)