diff --git a/app/directives/tc-banner/tc-banner.jade b/app/directives/tc-banner/tc-banner.jade index 697a39c77..cadaf290f 100644 --- a/app/directives/tc-banner/tc-banner.jade +++ b/app/directives/tc-banner/tc-banner.jade @@ -1,9 +1,9 @@ .tc-banner-placeholder(class="{{vm.theme}}") .image img(ng-src="{{vm.img}}") - .title(ng-bind="vm.title") + .title(ng-bind="vm.title", ng-show="vm.title !== null") .content(ng-transclude, ng-show="transcluded") - .description(ng-bind-html="vm.description") + .description(ng-bind-html="vm.description", ng-show="vm.description !== null") .ctas .cta(ng-repeat="link in vm.ctas") a(class="{{link.cssClass}}", title="{{link.title}}", ng-href="{{link.url}}", ng-if="link.url") {{link.title}} diff --git a/app/directives/tc-form-stockart/tc-form-stockart.spec.js b/app/directives/tc-form-stockart/tc-form-stockart.spec.js index 8b92a6d46..e49147f16 100644 --- a/app/directives/tc-form-stockart/tc-form-stockart.spec.js +++ b/app/directives/tc-form-stockart/tc-form-stockart.spec.js @@ -88,7 +88,7 @@ describe('Topcoder Form Stockart Directive', function() { }) }) - describe.only('isButtonDisabled', function() { + describe('isButtonDisabled', function() { var button beforeEach(function() { diff --git a/app/index.jade b/app/index.jade index bb39b0aaa..5a5a0beeb 100644 --- a/app/index.jade +++ b/app/index.jade @@ -18,6 +18,7 @@ html })(document); include ../assets/scripts/google.analytics.jade + include ../assets/scripts/zendesk-widget.jade if htmlWebpackPlugin.options.NEW_RELIC_APPLICATION_ID include ../assets/scripts/newrelic.analytics.jade diff --git a/app/index.js b/app/index.js index 30f039869..e698b267b 100644 --- a/app/index.js +++ b/app/index.js @@ -41,7 +41,7 @@ require('../node_modules/font-awesome/fonts/fontawesome-webfont.woff') require('../node_modules/font-awesome/fonts/fontawesome-webfont.woff2') require('../node_modules/font-awesome/css/font-awesome.css') -// Require non-npm scripts +// Require non-npm scripts, e.g. kissmetrics, munchkin (analytics via jade are included in index.html) requireContextFiles(require.context('../assets/scripts/', true, /^(.*\.(js$))[^.]*$/igm)) // Require Angular modules first diff --git a/app/my-dashboard/my-dashboard.jade b/app/my-dashboard/my-dashboard.jade index c1452f50e..43c19350f 100644 --- a/app/my-dashboard/my-dashboard.jade +++ b/app/my-dashboard/my-dashboard.jade @@ -7,6 +7,8 @@ //- .ttl //- tc-banner(theme="black", banner-name="ttl") + .one-million + tc-banner(theme="black", banner-name="1million") .tco tc-banner(theme="black", banner-name="tco16") diff --git a/app/services/bannerDataService.js b/app/services/bannerDataService.js index dd4b8f2c8..bb25bfa4b 100644 --- a/app/services/bannerDataService.js +++ b/app/services/bannerDataService.js @@ -35,6 +35,16 @@ import angular from 'angular' url: 'http://tco16.topcoder.com/latest/overview/', cssClass: 'tc-btn tc-btn-s tco-cta' }] + }, + '1million': { + title: null, + img: require('../../assets/images/1M-banner-hero.png'), + description: null, + ctas: [{ + title: 'Learn More', + url: 'https://www.topcoder.com/blog/1-million-members-strong/', + cssClass: 'tc-btn tc-btn-s' + }] } // Commenting out instead of deleting in case there is // another one with a similar format soon diff --git a/app/services/blog.service.js b/app/services/blog.service.js index 89d8e2dad..3047dcceb 100644 --- a/app/services/blog.service.js +++ b/app/services/blog.service.js @@ -31,6 +31,9 @@ import X2JS from 'xml2js' result.forEach(function(item) { item.title = $sce.trustAsHtml(item.title.toString()) item.description = $sce.trustAsHtml(item.description.toString()) + if (item.link && Array.isArray(item.link) && item.link.length) { + item.link = item.link[0] + } }) deferred.resolve(result) diff --git a/app/settings/email/email.controller.js b/app/settings/email/email.controller.js index 443265c54..7086c4d74 100644 --- a/app/settings/email/email.controller.js +++ b/app/settings/email/email.controller.js @@ -5,9 +5,9 @@ import angular from 'angular' angular.module('tc.settings').controller('EmailSettingsController', EmailSettingsController) - EmailSettingsController.$inject = ['$rootScope', 'userProfile', 'ProfileService', 'MailchimpService', 'logger', 'CONSTANTS', 'toaster', '$q', '$scope'] + EmailSettingsController.$inject = ['$rootScope', 'userData', 'ProfileService', 'MailchimpService', 'logger', 'CONSTANTS', 'toaster', '$q', '$scope'] - function EmailSettingsController($rootScope, userProfile, ProfileService, MailchimpService, logger, CONSTANTS, toaster, $q, $scope) { + function EmailSettingsController($rootScope, userData, ProfileService, MailchimpService, logger, CONSTANTS, toaster, $q, $scope) { var vm = this vm.loading = false vm.saving = false @@ -34,7 +34,7 @@ import angular from 'angular' }, { id: CONSTANTS.MAILCHIMP_NL_DEV, - name: 'Developer Newsletter', + name: 'Development Newsletter', desc: 'Software architecture, component assembly, application development, and bug hunting', enabled: false, dirty: false @@ -63,11 +63,11 @@ import angular from 'angular' ] vm.loading = true - return MailchimpService.getMemberSubscription(userProfile).then(function(subscription) { + return MailchimpService.getMemberSubscription(userData).then(function(subscription) { vm.loading = false if (!subscription) { - // add member to the list with empty preferences - MailchimpService.addSubscription(userProfile, {}).then(function(resp) { + // add member to the list with default preferences + MailchimpService.addSubscription(userData, {}).then(function(resp) { logger.debug(resp) }).catch(function(err) { // no error to user @@ -102,7 +102,7 @@ import angular from 'angular' vm.newsletters.forEach(function(newsletter) { preferences[newsletter.id] = newsletter.enabled }) - MailchimpService.addSubscription(userProfile, preferences).then(function(resp) { + MailchimpService.addSubscription(userData, preferences).then(function(resp) { vm.loading = false vm.saving = false // reset dirty state for all newsletter options diff --git a/app/settings/settings.routes.js b/app/settings/settings.routes.js index 031faed38..58d3ef6eb 100644 --- a/app/settings/settings.routes.js +++ b/app/settings/settings.routes.js @@ -54,14 +54,6 @@ import angular from 'angular' controllerAs: 'vm', data: { title: 'Email Preferences' - }, - resolve: { - userIdentity: ['UserService', function(UserService) { - return UserService.getUserIdentity() - }], - userProfile: ['userIdentity', 'ProfileService', function(userIdentity, ProfileService) { - return ProfileService.getUserProfile(userIdentity.handle.toLowerCase()) - }] } }, 'settings.preferences': { diff --git a/app/submissions/submit-design-files/submit-design-files.jade b/app/submissions/submit-design-files/submit-design-files.jade index ccdf77c64..ce0be9d04 100644 --- a/app/submissions/submit-design-files/submit-design-files.jade +++ b/app/submissions/submit-design-files/submit-design-files.jade @@ -4,7 +4,7 @@ .mobile-redirect__body p Our team is working hard on new features, and file upload currently only works on the web. Please open this page on your desktop if you want to create a submission. - a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") Learn more about formatting your submission file + a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/219122667-Formatting-Your-Submission-for-Design-Challenges") Learn more about formatting your submission file a.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenge-details/{{submissions.challengeId}}/?type={{submissions.track}}") Back to Challenge Details @@ -23,7 +23,7 @@ p Please be sure to double-check that you have submitted the correct files and that your JPG files (if applicable) are in RGB color mode. - a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") Learn more about formatting your submission file + a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/219122667-Formatting-Your-Submission-for-Design-Challenges") Learn more about formatting your submission file .form-block__fields .fieldset @@ -122,7 +122,7 @@ .form-block__text p Check to see if your font is on the Studio Standard Fonts list. If it is, leave the URL field blank. - p Read the #[a(ng-href="http://help.{{DOMAIN}}/design/design-copyright-and-font-policies/font-policy-for-design-challenges/") Studio Fonts Policy]. + p Read the #[a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/217959447-Font-Policy-for-Design-Challenges") Studio Fonts Policy]. p If your font is not on the list, you must provide the URL to the font page (not file) from one of the approved font websites in the dropdown box. @@ -135,7 +135,7 @@ .form-block__title Did you use stock art? .form-block__text - p If you used any stock photos in your design mocks, please provide the location and details so that the client can obtain them. Follow the guidelines at our #[a(ng-href="http://help.{{DOMAIN}}/design/design-copyright-and-font-policies/policy-for-stock-photos-in-design-submissions/") Studio Stock Art Policy]. + p If you used any stock photos in your design mocks, please provide the location and details so that the client can obtain them. Follow the guidelines at our #[a(ng-href="https://help.{{DOMAIN}}/hc/en-us/articles/217481408-Policy-for-Stock-Artwork-in-Design-Submissions") Studio Stock Art Policy]. .form-block__fields .fieldsets diff --git a/app/submissions/submit-develop-files/submit-develop-files.jade b/app/submissions/submit-develop-files/submit-develop-files.jade index 6c149d034..942cae0a0 100644 --- a/app/submissions/submit-develop-files/submit-develop-files.jade +++ b/app/submissions/submit-develop-files/submit-develop-files.jade @@ -4,7 +4,7 @@ .mobile-redirect__body p Our team is working hard on new features, and file upload currently only works on the web. Please open this page on your desktop if you want to create a submission. - a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") TODO: same link as below for help on formatting submission + a(ng-href="") TODO: same link as below for help on formatting submission a.tc-btn.tc-btn-s(ng-href="https://www.{{DOMAIN}}/challenge-details/{{submissions.challengeId}}/?type={{submissions.track}}") Back to Challenge Details @@ -23,7 +23,7 @@ p Need text from PMs. - a(ng-href="http://help.{{DOMAIN}}/design/submitting-to-a-design-challenge/formatting-your-submission-for-design-challenges/") Need link from PMs + a(ng-href="") Need link from PMs .form-block__fields .fieldset diff --git a/assets/css/my-dashboard/my-dashboard.scss b/assets/css/my-dashboard/my-dashboard.scss index c60aca5eb..fea5f1ddb 100644 --- a/assets/css/my-dashboard/my-dashboard.scss +++ b/assets/css/my-dashboard/my-dashboard.scss @@ -11,7 +11,7 @@ background-color: $white; } - .challenges, .srms, .programs, .tco, .ttl, .community-updates { + .challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates { @include module-l; margin-top: 1px; width: 100%; @@ -34,7 +34,25 @@ } } - .challenges, .srms, .programs, .tco, .ttl, .community-updates { + .one-million { + .tc-banner-placeholder { + background: none $tc-gray-90; + .image { + img { + width: auto; + } + } + + .ctas { + // specific css override to reduce the gap between image and ctas + // ideally we should have separate title, image and description + // however, here we have all 3 in single image + margin-top: 0px; + } + } + } + + .challenges, .srms, .programs, .tco, .ttl, .one-million, .community-updates { padding-top: 0px; } diff --git a/assets/css/settings/email.scss b/assets/css/settings/email.scss index e8d38e568..cabb86142 100644 --- a/assets/css/settings/email.scss +++ b/assets/css/settings/email.scss @@ -8,6 +8,7 @@ display: flex; justify-content: center; align-items: center; + min-height: 100px; } .newsletters { diff --git a/assets/images/1M-banner-hero.png b/assets/images/1M-banner-hero.png new file mode 100644 index 000000000..cb2e87dd9 Binary files /dev/null and b/assets/images/1M-banner-hero.png differ diff --git a/assets/scripts/usersnap.analytics.js b/assets/scripts/usersnap.analytics.js deleted file mode 100644 index 0f8d9fba0..000000000 --- a/assets/scripts/usersnap.analytics.js +++ /dev/null @@ -1,8 +0,0 @@ -(function() { - var s = document.createElement('script') - s.type = 'text/javascript' - s.async = true - s.src = '//api.usersnap.com/load/'+'cda7d23b-04e6-4908-8cde-f7e3f858e8a0.js' - var x = document.getElementsByTagName('script')[0] - x.parentNode.insertBefore(s, x)} -)() diff --git a/assets/scripts/zendesk-widget.jade b/assets/scripts/zendesk-widget.jade new file mode 100644 index 000000000..1864804d4 --- /dev/null +++ b/assets/scripts/zendesk-widget.jade @@ -0,0 +1,3 @@ +script(type="text/javascript"). + /*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","topcoder.zendesk.com"); +/*]]>*/