Added signup poke to HeroVictoryModal.

This commit is contained in:
Nick Winter 2014-10-17 20:47:32 -07:00
parent de7985fc2e
commit 2e539debbb
4 changed files with 40 additions and 9 deletions

View file

@ -86,6 +86,12 @@
-ms-flex-pack: justify
justify-content: space-between
@mixin flex-justify-center()
-webkit-box-pack: center
-webkit-justify-content: center
-ms-flex-pack: center
justify-content: center
@mixin flex-align-content-start()
-webkit-align-content: flex-start
-ms-flex-align-content: flex-start

View file

@ -43,10 +43,10 @@
@include transition-duration(1s)
-webkit-filter: grayscale(100%)
-moz-filter: grayscale(100%)
-o-filter: grayscale(100%)
filter: grayscale(100%)
-webkit-filter: grayscale(100%) brightness(75%)
-moz-filter: grayscale(100%) brightness(75%)
-o-filter: grayscale(100%) brightness(75%)
filter: grayscale(100%) brightness(75%)
&.earned
-webkit-filter: none
@ -54,7 +54,11 @@
-o-filter: none
filter: none
.achievement-description
@include opacity(1)
.achievement-description
@include opacity(0.75)
position: absolute
text-align: center
left: 95px
@ -64,14 +68,15 @@
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
.achievement-rewards
position: absolute
left: 25px
right: 23px
top: 41px
bottom: 18px
@include flexbox()
@include flex-justify-center()
//- Reward panels
@ -156,7 +161,10 @@
.modal-content
padding-bottom: 50px // so the footer appears at the bottom
&.with-sign-up .modal-content
padding-bottom: 100px // need more space for signup poke
.modal-footer
position: absolute
bottom: -20px
@ -166,6 +174,16 @@
#totals
color: white
p.sign-up-poke
position: absolute
bottom: 60px
right: 20px
color: white
.sign-up-button
float: right
margin-left: 10px
html.no-borderimage
#hero-victory-modal
.background-wrapper

View file

@ -17,13 +17,13 @@ block modal-body-content
.reward-panel.numerical.xp(data-number=worth, data-number-unit='xp')
.reward-image-container(class=animate?'':'show')
img(src="/images/pages/play/level/modal/reward_icon_xp.png")
.reward-text= animate ? 'x0' : '+'+worth
.reward-text= animate ? '+0' : '+'+worth
if rewards.gems
.reward-panel.numerical.gems(data-number=rewards.gems, data-number-unit='gem')
.reward-image-container(class=animate?'':'show')
img(src="/images/pages/play/level/modal/reward_icon_gems.png")
.reward-text= animate ? 'x0' : '+'+rewards.gems
.reward-text= animate ? '+0' : '+'+rewards.gems
if rewards.heroes
for hero in rewards.heroes
@ -52,3 +52,8 @@ block modal-footer-content
button.btn.btn-warning.hide#saving-progress-label(disabled, data-i18n="play_level.victory_saving_progress") Saving Progress
a.btn.btn-success.world-map-button.hide#continue-button(href="/play-hero", data-dismiss="modal", data-i18n="play_level.victory_play_continue") Continue
if me.get('anonymous')
p.sign-up-poke
button.btn.btn-success.sign-up-button.btn-large(data-toggle="coco-modal", data-target="modal/SignupModal", data-i18n="play_level.victory_sign_up") Sign Up to Save Progress
span(data-i18n="play_level.victory_sign_up_poke") Want to save your code? Create a free account!

View file

@ -87,11 +87,13 @@ module.exports = class HeroVictoryModal extends ModalView
# rewards.gems *= (index + 1)
c.thangTypes = @thangTypes
c.me = me
return c
afterRender: ->
super()
return unless @supermodel.finished()
@$el.addClass 'with-sign-up' if me.get('anonymous')
@updateSavingProgressStatus()
@$el.find('#victory-header').delay(250).queue(-> $(@).removeClass('out').dequeue())
complete = _.once(_.bind(@beginAnimateNumbers, @))