mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 08:41:46 -05:00
Revert using Bluebird instead of Promise polyfill
This commit is contained in:
commit
f728c1c8a7
4 changed files with 12 additions and 96 deletions
|
@ -165,21 +165,6 @@ module.exports = class User extends CocoModel
|
|||
application.tracker.identify campaignAdsGroup: @campaignAdsGroup unless me.isAdmin()
|
||||
@campaignAdsGroup
|
||||
|
||||
getHomepageGroup: ->
|
||||
# Only testing on en-US so localization issues are not a factor
|
||||
return 'home-legacy' unless _.string.startsWith(me.get('preferredLanguage', true) or 'en-US', 'en')
|
||||
return @homepageGroup if @homepageGroup
|
||||
group = parseInt(util.getQueryVariable('variation'))
|
||||
group ?= me.get('testGroupNumber') % 5
|
||||
@homepageGroup = switch group
|
||||
when 0 then 'home-legacy'
|
||||
when 1 then 'home-teachers'
|
||||
when 2 then 'home-legacy-left'
|
||||
when 3 then 'home-dropdowns'
|
||||
when 4 then 'home-play-for-free'
|
||||
application.tracker.identify homepageGroup: @homepageGroup unless me.isAdmin()
|
||||
return @homepageGroup
|
||||
|
||||
# Signs and Portents was receiving updates after test started, and also had a big bug on March 4, so just look at test from March 5 on.
|
||||
# ... and stopped working well until another update on March 10, so maybe March 11+...
|
||||
# ... and another round, and then basically it just isn't completing well, so we pause the test until we can fix it.
|
||||
|
|
|
@ -3,74 +3,14 @@ extends /templates/base-flat
|
|||
mixin box
|
||||
.well.text-center
|
||||
if me.isAnonymous() == true
|
||||
if ['home-legacy','home-legacy-left'].indexOf(view.variation) != -1
|
||||
h6#classroom-edition-header(data-i18n="new_home.classroom_edition")
|
||||
div
|
||||
button.teacher-btn.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.im_a_teacher")
|
||||
div
|
||||
a.btn.btn-forest.btn-lg.btn-block(href="/courses", data-i18n="new_home.im_a_student")
|
||||
h6#learn-to-code-header(data-i18n="new_home.learn_to_code")
|
||||
a.btn.btn-gold.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now")
|
||||
else if ['home-teachers','home-dropdowns'].indexOf(view.variation) != -1
|
||||
h5#educator-header(data-i18n="new_home.teachers")
|
||||
p.small(data-i18n="new_home.class_in_box")
|
||||
h6#classroom-edition-header(data-i18n="new_home.classroom_edition")
|
||||
div
|
||||
button.teacher-btn.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.im_a_teacher")
|
||||
div
|
||||
a.btn.btn-forest.btn-lg.btn-block(href="/courses", data-i18n="new_home.im_a_student")
|
||||
h6#learn-to-code-header(data-i18n="new_home.learn_to_code")
|
||||
a.btn.btn-gold.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now")
|
||||
|
||||
if view.variation == 'home-dropdowns'
|
||||
div.form-group
|
||||
h6.control-label(data-i18n="new_home.role")
|
||||
select.form-control#request-form-role
|
||||
option(value="", data-i18n="new_home.form_select_role")
|
||||
option(data-i18n="courses.teacher", value="Teacher")
|
||||
option(data-i18n="teachers_quote.tech_coordinator", value="Technology coordinator")
|
||||
option(data-i18n="teachers_quote.advisor", value="Advisor")
|
||||
option(data-i18n="teachers_quote.principal", value="Principal")
|
||||
option(data-i18n="teachers_quote.superintendent", value="Superintendent")
|
||||
option(data-i18n="teachers_quote.parent", value="Parent")
|
||||
div.form-group
|
||||
h6.control-label(data-i18n="new_home.student_count")
|
||||
select.form-control#request-form-range
|
||||
option(value="", data-i18n="new_home.form_select_range")
|
||||
option 1-10
|
||||
option 11-50
|
||||
option 51-100
|
||||
option 101-200
|
||||
option 201-500
|
||||
option 501-1000
|
||||
option 1000+
|
||||
div
|
||||
button.btn.btn-forest.btn-lg.btn-block.request-demo(href="#",data-i18n="new_home.get_started")
|
||||
else
|
||||
div
|
||||
button.teacher-btn.btn.btn-forest.btn-lg.btn-block(data-i18n="new_home.get_started")
|
||||
|
||||
if view.variation == 'home-teachers'
|
||||
h5#students-header(data-i18n="new_home.students")
|
||||
div
|
||||
button.join-class.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.join_class", href="/courses")
|
||||
div
|
||||
a.btn.btn-default.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now")
|
||||
else
|
||||
h6#students-header(data-i18n="new_home.students_and_players")
|
||||
div
|
||||
a.btn.btn-primary.btn-lg.play-btn.btn-block(href=view.playURL, data-i18n="new_home.play_now")
|
||||
else
|
||||
h5#educator-header(data-i18n="new_home.start_playing_for_free")
|
||||
div
|
||||
a.btn.btn-forest.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.play_now")
|
||||
div
|
||||
button.join-class.btn.btn-default.btn-lg.btn-block(data-i18n="new_home.join_class", href="/courses")
|
||||
|
||||
|
||||
h6#classroom-edition-header(style="padding-top: 20px",data-i18n="new_home.teachers_and_educators")
|
||||
p.small(data-i18n="new_home.class_in_box")
|
||||
button.teacher-btn.btn.btn-primary.btn-lg.btn-block(data-i18n="new_home.get_started")
|
||||
|
||||
|
||||
if ['home-teachers','home-dropdowns','home-play-for-free'].indexOf(view.variation) != -1
|
||||
p.small
|
||||
span(data-i18n="new_home.have_an_account")
|
||||
span
|
||||
a.login-button(data-i18n="login.log_in", href="#")
|
||||
else
|
||||
h6#classroom-edition-header(data-i18n="new_home.logged_in_as")
|
||||
p.small #{me.get("email")}
|
||||
|
@ -113,24 +53,16 @@ block content
|
|||
.container
|
||||
.row.hidden-xs.top-spacer(style="height: 160px")
|
||||
.row.hidden-sm.hidden-xs
|
||||
case view.variation
|
||||
when 'home-legacy-left'
|
||||
.col-lg-3.col-md-4
|
||||
+box
|
||||
.col-lg-7.col-lg-offset-2.col-md-8
|
||||
h1(data-i18n="new_home.slogan")
|
||||
default
|
||||
.col-lg-7.col-md-8
|
||||
h1(data-i18n="new_home.slogan")
|
||||
.col-lg-3.col-lg-offset-2.col-md-4
|
||||
+box
|
||||
.col-lg-7.col-md-8
|
||||
h1(data-i18n="new_home.slogan")
|
||||
.col-lg-3.col-lg-offset-2.col-md-4
|
||||
+box
|
||||
.row.hidden-lg.hidden-md
|
||||
.col-lg-7.col-md-8
|
||||
h1(data-i18n="new_home.slogan")
|
||||
.col
|
||||
div(style="margin: auto; max-width: 300px")
|
||||
+box
|
||||
|
||||
.row#learn-more-row
|
||||
.col-xs-12.text-center
|
||||
a#learn-more-link
|
||||
|
|
|
@ -35,7 +35,6 @@ module.exports = class NewHomeView extends RootView
|
|||
initialize: (options) ->
|
||||
@courses = new CocoCollection [], {url: "/db/course", model: Course}
|
||||
@supermodel.loadCollection(@courses, 'courses')
|
||||
@variation ?= me.getHomepageGroup()
|
||||
|
||||
window.tracker?.trackEvent 'Homepage Loaded', category: 'Homepage'
|
||||
if me.isTeacher()
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
"algoliasearch": "^3.13.1",
|
||||
"algolia-autocomplete.js": "^0.17.0",
|
||||
"algolia-autocomplete-no-conflict": "1.0.0",
|
||||
"bluebird": "^3.4.0"
|
||||
"promise-polyfill": "^5.2.1"
|
||||
},
|
||||
"overrides": {
|
||||
"algolia-autocomplete.js": {
|
||||
|
|
Loading…
Reference in a new issue