mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-29 15:35:15 -04:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
5365a9fdf1
6 changed files with 65 additions and 12 deletions
app
assets/images/pages/play/modal
models
styles/play/modal
templates/play/modal
views/play/modal
Binary file not shown.
After ![]() (image error) Size: 56 KiB |
BIN
app/assets/images/pages/play/modal/subscribe-gems.png
Normal file
BIN
app/assets/images/pages/play/modal/subscribe-gems.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 31 KiB |
|
@ -127,6 +127,7 @@ module.exports = class User extends CocoModel
|
||||||
@fastVictoryModalGroup
|
@fastVictoryModalGroup
|
||||||
|
|
||||||
getGemPromptGroup: ->
|
getGemPromptGroup: ->
|
||||||
|
# A/B Testing whether extra prompt when low gems leads to more gem purchases
|
||||||
return @gemPromptGroup if @gemPromptGroup
|
return @gemPromptGroup if @gemPromptGroup
|
||||||
group = me.get('testGroupNumber') % 8
|
group = me.get('testGroupNumber') % 8
|
||||||
@gemPromptGroup = switch group
|
@gemPromptGroup = switch group
|
||||||
|
@ -136,6 +137,19 @@ module.exports = class User extends CocoModel
|
||||||
application.tracker.identify gemPromptGroup: @gemPromptGroup unless me.isAdmin()
|
application.tracker.identify gemPromptGroup: @gemPromptGroup unless me.isAdmin()
|
||||||
@gemPromptGroup
|
@gemPromptGroup
|
||||||
|
|
||||||
|
getSubscribeCopyGroup: ->
|
||||||
|
# A/B Testing alternate subscribe modal copy
|
||||||
|
return @subscribeCopyGroup if @subscribeCopyGroup
|
||||||
|
group = me.get('testGroupNumber') % 6
|
||||||
|
@subscribeCopyGroup = switch group
|
||||||
|
when 0, 1, 2 then 'original'
|
||||||
|
when 3, 4, 5 then 'new'
|
||||||
|
if /^en/.test(@get('preferredLanguage')) and not me.isAdmin()
|
||||||
|
application.tracker.identify subscribeCopyGroup: @subscribeCopyGroup
|
||||||
|
else
|
||||||
|
@subscribeCopyGroup = 'original'
|
||||||
|
@subscribeCopyGroup
|
||||||
|
|
||||||
isPremium: ->
|
isPremium: ->
|
||||||
return false unless stripe = @get('stripe')
|
return false unless stripe = @get('stripe')
|
||||||
return true if stripe.subscriptionID
|
return true if stripe.subscriptionID
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
top: -61px
|
top: -61px
|
||||||
left: 0px
|
left: 0px
|
||||||
|
|
||||||
|
#subscribe-gems
|
||||||
|
position: absolute
|
||||||
|
top: 155px
|
||||||
|
right: 65px
|
||||||
|
|
||||||
|
|
||||||
//- Header
|
//- Header
|
||||||
h1
|
h1
|
||||||
|
@ -80,6 +85,22 @@
|
||||||
text-decoration: underline
|
text-decoration: underline
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
|
#selling-points-BTest
|
||||||
|
position: absolute
|
||||||
|
left: 65px
|
||||||
|
top: 150px
|
||||||
|
width: 500px
|
||||||
|
font-weight: normal
|
||||||
|
line-height: 18px
|
||||||
|
color: black
|
||||||
|
font-family: $headings-font-family
|
||||||
|
font-size: 18px
|
||||||
|
|
||||||
|
.point
|
||||||
|
overflow: none
|
||||||
|
text-align: left
|
||||||
|
margin: 20px
|
||||||
|
|
||||||
.popover
|
.popover
|
||||||
z-index: 1050
|
z-index: 1050
|
||||||
|
|
||||||
|
|
|
@ -7,24 +7,39 @@
|
||||||
#retrying-alert.alert.alert-danger(data-i18n="buy_gems.retrying")
|
#retrying-alert.alert.alert-danger(data-i18n="buy_gems.retrying")
|
||||||
|
|
||||||
else
|
else
|
||||||
img(src="/images/pages/play/modal/subscribe-background.png")#subscribe-background
|
if BTest
|
||||||
|
img(src="/images/pages/play/modal/subscribe-background-blank.png")#subscribe-background
|
||||||
|
img(src="/images/pages/play/modal/subscribe-gems.png")#subscribe-gems
|
||||||
|
else
|
||||||
|
img(src="/images/pages/play/modal/subscribe-background.png")#subscribe-background
|
||||||
|
|
||||||
h1(data-i18n="subscribe.subscribe_title") Subscribe
|
h1(data-i18n="subscribe.subscribe_title") Subscribe
|
||||||
|
|
||||||
div#close-modal
|
div#close-modal
|
||||||
span.glyphicon.glyphicon-remove
|
span.glyphicon.glyphicon-remove
|
||||||
|
|
||||||
#selling-points
|
if BTest
|
||||||
#point-levels.point
|
#selling-points-BTest
|
||||||
.blurb(data-i18n="subscribe.levels")
|
#point-levels.point
|
||||||
#point-heroes.point
|
.blurb(style="font-style:italic") "Great product ... I have been looking for a good tool to teach my kids programming."
|
||||||
.blurb(data-i18n="subscribe.heroes")
|
#point-heroes.point
|
||||||
#point-gems.point
|
.blurb Join the CodeCombat subscription and get even more learn-to-code goodness!
|
||||||
.blurb(data-i18n="subscribe.gems")
|
#point-gems.point
|
||||||
#point-items.point
|
.blurb For $#{price}/mo, you'll get access to bonus levels and 3500 extra gems per month! Players who complete bonus levels learn more programming and advance further in the game.
|
||||||
.blurb(data-i18n="subscribe.items")
|
#point-items.point
|
||||||
|
.blurb There's no risk: 100% money back guarantee.
|
||||||
|
else
|
||||||
|
#selling-points
|
||||||
|
#point-levels.point
|
||||||
|
.blurb(data-i18n="subscribe.levels")
|
||||||
|
#point-heroes.point
|
||||||
|
.blurb(data-i18n="subscribe.heroes")
|
||||||
|
#point-gems.point
|
||||||
|
.blurb(data-i18n="subscribe.gems")
|
||||||
|
#point-items.point
|
||||||
|
.blurb(data-i18n="subscribe.items")
|
||||||
|
|
||||||
#parents-info(data-i18n="subscribe.parents")
|
#parents-info(data-i18n="subscribe.parents")
|
||||||
|
|
||||||
button.btn.btn-lg.btn-illustrated.purchase-button(data-i18n="subscribe.subscribe_button")
|
button.btn.btn-lg.btn-illustrated.purchase-button(data-i18n="subscribe.subscribe_button")
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ module.exports = class SubscribeModal extends ModalView
|
||||||
c = super()
|
c = super()
|
||||||
c.state = @state
|
c.state = @state
|
||||||
c.stateMessage = @stateMessage
|
c.stateMessage = @stateMessage
|
||||||
|
c.price = @product.amount / 100
|
||||||
|
c.BTest = me.getSubscribeCopyGroup() is 'new'
|
||||||
return c
|
return c
|
||||||
|
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
|
@ -61,6 +63,7 @@ module.exports = class SubscribeModal extends ModalView
|
||||||
# SALE LOGIC
|
# SALE LOGIC
|
||||||
# overwrite amount with sale price
|
# overwrite amount with sale price
|
||||||
# maybe also put in another description with details about how long it lasts, etc
|
# maybe also put in another description with details about how long it lasts, etc
|
||||||
|
# NOTE: Do not change this price without updating the context.price in getRenderData
|
||||||
# options = {
|
# options = {
|
||||||
# description: 'Subscription. Half price for three months!'
|
# description: 'Subscription. Half price for three months!'
|
||||||
# amount: 499
|
# amount: 499
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue