Working on home language selection.
BIN
app/assets/images/pages/home/language_background_small.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
app/assets/images/pages/home/language_beta_sticker.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/assets/images/pages/home/language_js.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
app/assets/images/pages/home/language_logo_coffeescript.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/assets/images/pages/home/language_logo_io.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
app/assets/images/pages/home/language_logo_lua.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
app/assets/images/pages/home/language_logo_python.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
app/assets/images/pages/home/language_python.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
app/assets/images/pages/home/wizard.png
Normal file
After Width: | Height: | Size: 20 KiB |
|
@ -66,6 +66,30 @@
|
|||
filter: brightness(1.2)
|
||||
-webkit-filter: brightness(1.2)
|
||||
box-shadow: 0 0 5px black
|
||||
|
||||
.code-languages
|
||||
.primary-code-languages
|
||||
|
||||
#javascript
|
||||
background: transparent url(/images/pages/home/language_js.png)
|
||||
padding-right: 150px
|
||||
|
||||
#python
|
||||
background: transparent url(/images/pages/home/language_python.png)
|
||||
padding-left: 150px
|
||||
|
||||
.code-language
|
||||
text-align: center
|
||||
width: 498px
|
||||
height: 153px
|
||||
padding: 30px
|
||||
margin-left: 11px
|
||||
|
||||
.secondary-code-languages
|
||||
.code-language
|
||||
text-align: center
|
||||
|
||||
|
||||
|
||||
#multiplayer-launch-modal
|
||||
.modal-dialog
|
||||
|
|
|
@ -4,29 +4,29 @@ block content
|
|||
|
||||
h1#site-slogan(data-i18n="home.slogan") Learn to Code JavaScript by Playing a Game
|
||||
|
||||
if frontPageContent == 'video'
|
||||
//- if language is Chinese, we use youku, because China can't visit youtube.
|
||||
//- otherwise, we use youtube.
|
||||
if languageName == "zh-HANS"
|
||||
#trailer-wrapper
|
||||
<embed src="http://player.youku.com/player.php/sid/XNjk2Mzg5NjYw/v.swf" style="margin-left:15px; margin-top:8px;"allowFullScreen="true" quality="high" width="920" height="518" wmode="opaque"></embed>
|
||||
img(src="/images/pages/home/video_border.png")
|
||||
#mobile-trailer-wrapper
|
||||
<embed src="http://player.youku.com/player.php/sid/XNjk2Mzg5NjYw/v.swf" style="margin-left:15px; margin-top:8px;"allowFullScreen="true" quality="high" width="280" height="158" wmode="opaque"></embed>
|
||||
else
|
||||
#trailer-wrapper
|
||||
<iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720&wmode=transparent" frameborder="0" wmode="opaque" allowfullscreen></iframe>
|
||||
img(src="/images/pages/home/video_border.png")
|
||||
#mobile-trailer-wrapper
|
||||
<iframe src="//www.youtube.com/embed/1zjaA13k-dA" frameborder="0" width="280" height="158"></iframe>
|
||||
hr
|
||||
.code-languages
|
||||
.primary-code-languages.row
|
||||
.code-language.col-md-6#javascript(data-code-language='javascript')
|
||||
h2 JavaScript
|
||||
p language of web yo
|
||||
|
||||
else if frontPageContent == 'screenshot'
|
||||
#front-screenshot
|
||||
img(src="/images/pages/home/front_screenshot_01.png", alt="")
|
||||
.code-language.beta.col-md-6#python(data-code-language='python')
|
||||
h2 Python
|
||||
p language of badassery
|
||||
|
||||
.secondary-code-languages.row
|
||||
.code-language.beta.col-md-4#clojure(data-code-language='clojure')
|
||||
h3 Clojure
|
||||
p language of geekery
|
||||
|
||||
.code-language.beta.col-md-4#clojure(data-code-language='lua')
|
||||
h3 Lua
|
||||
p language of game scripting
|
||||
|
||||
.code-language.beta.col-md-4#clojure(data-code-language='io')
|
||||
h3 Io
|
||||
p language of simplicity
|
||||
|
||||
else if frontPageContent == 'nothing'
|
||||
p
|
||||
|
||||
.alert.alert-danger.lt-ie10
|
||||
strong(data-i18n="home.no_ie") CodeCombat does not run in Internet Explorer 9 or older. Sorry!
|
||||
|
|
|
@ -25,10 +25,6 @@ module.exports = class HomeView extends View
|
|||
console.warn 'no more jquery browser version...'
|
||||
c.isEnglish = (me.get('preferredLanguage') or 'en').startsWith 'en'
|
||||
c.languageName = me.get('preferredLanguage')
|
||||
# A/B test: https://github.com/codecombat/codecombat/issues/769
|
||||
c.frontPageContent = {0: "video", 1: "screenshot", 2: "nothing"}[me.get('testGroupNumber') % 3]
|
||||
application.tracker.identify frontPageContent: c.frontPageContent
|
||||
application.tracker.trackEvent 'Front Page Content', frontPageContent: c.frontPageContent
|
||||
c
|
||||
|
||||
afterRender: ->
|
||||
|
|
|
@ -126,7 +126,7 @@ module.exports = class HUDView extends View
|
|||
if thangType.get('raster')
|
||||
wrapper.empty().append($('<img />').attr('src', '/file/'+thangType.get('raster')))
|
||||
else
|
||||
stage = thangType.getPortraitStage options
|
||||
return unless stage = thangType.getPortraitStage options
|
||||
newCanvas = $(stage.canvas).addClass('thang-canvas')
|
||||
wrapper.empty().append(newCanvas)
|
||||
stage.update()
|
||||
|
|