Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-03-17 01:11:39 -07:00
commit 120dc895be
7 changed files with 60 additions and 31 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -7,9 +7,20 @@
text-align: center
margin-top: 0
#trailer-wrapper iframe
#trailer-wrapper
position: relative
margin: 0 auto 40px
width: 950px
iframe
display: block
margin: 0 auto
position: relative
top: 8px
img
position: absolute
left: 0
top: 0
pointer-events: none
.game-mode-wrapper
position: relative
@ -49,8 +60,9 @@
&:hover div
color: lighten($yellow, 20%)
&:hover img
filter: brightness(1.1)
-webkit-filter: brightness(1.1)
filter: brightness(1.2)
-webkit-filter: brightness(1.2)
box-shadow: 0 0 5px black
#multiplayer-launch-modal
.modal-dialog

View file

@ -32,7 +32,9 @@
width: $WIDTH
margin-left: (-$WIDTH / 2)
z-index: 100
background-color: rgba(220, 255, 230, 0.5)
background-color: rgba(220, 255, 230, 0.6)
color: darkslategray
font-size: 15px
border-radius: 30px
padding: 10px
text-align: center
@ -44,12 +46,21 @@
transition: top $UNVEIL_TIME cubic-bezier(0.285, -0.595, 0.670, -0.600)
.load-progress
width: 100%
position: absolute
left: 2%
top: 0px
opacity: 0.6
width: 96%
margin: 10px auto 0
.progress-bar
width: 1%
transition-duration: 1.2s
#tip-wrapper
position: relative
z-index: 2
.left-wing, .right-wing
width: 100%
height: 100%

View file

@ -5,7 +5,8 @@ block content
h1#site-slogan(data-i18n="home.slogan") Learn to Code JavaScript by Playing a Game
#trailer-wrapper
<iframe width="949" height="534" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen></iframe>
<iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen></iframe>
img(src="/images/pages/home/video_border.png")
hr

View file

@ -4,10 +4,24 @@
.loading-details
h2(data-i18n='play_level.loading_level') Loading Level
.load-progress
.progress.progress-striped.active
.progress-bar.progress-bar-success
h4= tip
#tip-wrapper
strong.tip(data-i18n='play_level.tip_insert_positions') Shift+Click a point on the map to insert it into the spell editor.
strong.tip(data-i18n='play_level.tip_toggle_play') Toggle play/paused with Ctrl+P.
strong.tip(data-i18n='play_level.tip_scrub_shortcut') Ctrl+[ and Ctrl+] rewind and fast-forward.
strong.tip(data-i18n='play_level.tip_guide_exists') Click the guide at the top of the page for useful info.
strong.tip(data-i18n='play_level.tip_open_source') CodeCombat is 100% open source!
strong.tip(data-i18n='play_level.tip_beta_launch') CodeCombat launched its beta in October, 2013.
strong.tip(data-i18n='play_level.tip_js_beginning') JavaScript is just the beginning.
strong.tip(data-i18n='play_level.tip_autocast_setting') Adjust autocast settings by clicking the gear on the cast button.
strong.tip.rare(data-i18n='play_level.tip_baby_coders') In the future, even babies will be Archmages.
strong.tip.rare(data-i18n='play_level.tip_morale_improves') Loading will continue until morale improves.
strong.tip.rare(data-i18n='play_level.tip_all_species') We believe in equal opportunities to learn programming for all species.
strong.tip.rare(data-i18n='play_level.tip_reticulating') Reticulating spines.
strong.tip.rare
span(data-i18n='play_level.tip_harry') Yer a Wizard,
span= me.get('name') || 'Anoner'

View file

@ -134,7 +134,7 @@ module.exports = class LadderView extends RootView
onClickedLink: (e) ->
link = $(e.target).closest('a').attr('href')
if link?.startsWith '/play/level'
if link?.startsWith('/play/level') and me.get('anonymous')
e.stopPropagation()
e.preventDefault()
@showApologeticSignupModal()

View file

@ -2,18 +2,6 @@ View = require 'views/kinds/CocoView'
template = require 'templates/play/level/level_loading'
tips = [
"Tip: you can shift+click a position on the map to insert it into the spell editor."
"You can toggle play/paused with ctrl+p."
"Pressing ctrl+[ and ctrl+] rewinds and fast-forwards."
"CodeCombat is 100% open source!"
"In the future, even babies will be Archmages."
"Loading will continue until morale improves."
"CodeCombat launched its beta in October, 2013."
"JavaScript is just the beginning."
"We believe in equal opportunities to learn programming for all species."
]
module.exports = class LevelLoadingView extends View
id: "level-loading-view"
template: template
@ -21,8 +9,16 @@ module.exports = class LevelLoadingView extends View
subscriptions:
'level-loader:progress-changed': 'onLevelLoaderProgressChanged'
afterRender: ->
@$el.find('.tip.rare').remove() if _.random(1, 10) < 9
tips = @$el.find('.tip').addClass('to-remove')
tip = _.sample(tips)
$(tip).removeClass('to-remove')
@$el.find('.to-remove').remove()
onLevelLoaderProgressChanged: (e) ->
@progress = e.progress
@progress = 0.01 if @progress < 0.01
@updateProgressBar()
updateProgressBar: ->
@ -47,8 +43,3 @@ module.exports = class LevelLoadingView extends View
onUnveilEnded: =>
return if @destroyed
Backbone.Mediator.publish 'onLoadingViewUnveiled', view: @
getRenderData: (c={}) ->
super c
c.tip = _.sample tips
c