mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Preparing for Zero Sum tournament starting tomorrow morning.
This commit is contained in:
parent
ca761866c0
commit
ceb81494a0
6 changed files with 126 additions and 100 deletions
|
@ -942,11 +942,13 @@
|
|||
fight: "Fight!"
|
||||
watch_victory: "Watch your victory"
|
||||
defeat_the: "Defeat the"
|
||||
tournament_started: ", started"
|
||||
tournament_ends: "Tournament ends"
|
||||
tournament_ended: "Tournament ended"
|
||||
tournament_rules: "Tournament Rules"
|
||||
tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
|
||||
tournament_blurb_criss_cross: "Win bids, construct paths, outwit opponents, grab gems, and upgrade your career in our Criss-Cross tournament! Check out the details"
|
||||
tournament_blurb_zero_sum: "Unleash your coding creativity in both gold gathering and battle tactics in this alpine mirror match between red sorcerer and blue sorcerer. The tournament began on Friday, March 27 and will run until Monday, April 6 at 5PM PDT. This tournament is just for fun and glory. Check out the details"
|
||||
tournament_blurb_blog: "on our blog"
|
||||
rules: "Rules"
|
||||
winners: "Winners"
|
||||
|
|
|
@ -1,20 +1,27 @@
|
|||
#ladder-view
|
||||
.main-content-area
|
||||
background-color: whitesmoke
|
||||
|
||||
#level-column img
|
||||
margin: -14px -12px 0px -12px
|
||||
width: 100%
|
||||
width: -webkit-calc(100% + 24px)
|
||||
width: calc(100% + 24px)
|
||||
#ladder-top
|
||||
background-color: whitesmoke
|
||||
margin: -14px -12px 20px -12px
|
||||
padding-bottom: 30px
|
||||
border-bottom: 1px solid #888
|
||||
|
||||
#level-column
|
||||
padding-top: 14px
|
||||
text-align: center
|
||||
|
||||
img
|
||||
margin-top: -14px
|
||||
width: 100%
|
||||
|
||||
h1
|
||||
text-align: center
|
||||
|
||||
.tournament-blurb
|
||||
margin: -20px -12px 20px -12px
|
||||
padding: 10px
|
||||
background-color: white
|
||||
margin-top: -10px
|
||||
margin-bottom: 10px
|
||||
padding: 10px 20px
|
||||
background-color: whitesmoke
|
||||
|
||||
h2
|
||||
text-align: center
|
||||
|
@ -56,11 +63,17 @@
|
|||
.play-button
|
||||
margin-bottom: 10px
|
||||
background-image: none
|
||||
color: white
|
||||
font-size: 24px
|
||||
|
||||
.spectate-button-container
|
||||
margin-top: 10px
|
||||
text-align: center
|
||||
|
||||
.btn.spectate-button
|
||||
font-size: 18px
|
||||
color: white
|
||||
|
||||
.name-col-cell
|
||||
max-width: 150px
|
||||
text-overflow: ellipsis
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
button.btn.btn-lg.btn-block.btn-success.rank-button
|
||||
button.btn.btn-lg.btn-block.btn-success.rank-button.btn-illustrated
|
||||
span(data-i18n="ladder.rank_no_code").unavailable.secret No New Code to Rank
|
||||
span(data-i18n="ladder.rank_my_game").rank.secret Rank My Game!
|
||||
span(data-i18n="ladder.rank_submitting").submitting.secret Submitting...
|
||||
|
|
|
@ -2,88 +2,101 @@ extends /templates/base
|
|||
block content
|
||||
- var base = "/images/pages/play/ladder/prize_";
|
||||
|
||||
div#level-column
|
||||
if levelDescription
|
||||
div!= levelDescription
|
||||
else
|
||||
h1= level.get('name')
|
||||
div#ladder-top
|
||||
|
||||
if level.get('name') == 'Greed'
|
||||
.tournament-blurb
|
||||
h2
|
||||
span(data-i18n="ladder.tournament_ended") Tournament ended
|
||||
| #{tournamentTimeLeft}
|
||||
p
|
||||
span(data-i18n="ladder.tournament_blurb") Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details
|
||||
|
|
||||
a(href="http://blog.codecombat.com/multiplayer-programming-tournament", data-i18n="ladder.tournament_blurb_blog") on our blog
|
||||
| .
|
||||
p
|
||||
strong Tournament ended!
|
||||
a(href="#winners") Behold the winners
|
||||
| . Thanks for playing! You can
|
||||
strong still play
|
||||
| Greed and all of our other
|
||||
a(href="/play/ladder") multiplayer arenas
|
||||
| .
|
||||
p
|
||||
| Want to commiserate? Head over to
|
||||
a(href="http://discourse.codecombat.com/") the forum
|
||||
| and discuss your strategies, your triumphs, and your turmoils.
|
||||
div#level-column
|
||||
if levelDescription
|
||||
div!= levelDescription
|
||||
else
|
||||
h1= level.get('name')
|
||||
|
||||
.sponsor-logos
|
||||
a(href="https://heapanalytics.com/")
|
||||
img(src=base + "heap.png")
|
||||
a(href="https://www.firebase.com/")
|
||||
img(src=base + "firebase.png")
|
||||
a(href="https://onemonthrails.com/")
|
||||
img(src=base + "one_month.png")
|
||||
a(href="http://www.jetbrains.com/webstorm/")
|
||||
img(src=base + "webstorm.png")
|
||||
a(href="http://shop.oreilly.com/category/ebooks.do")
|
||||
img(src=base + "oreilly.png")
|
||||
a(href="http://aws.amazon.com/")
|
||||
img(src=base + "aws.png")
|
||||
|
||||
if level.get('name') == 'Criss-Cross'
|
||||
.tournament-blurb
|
||||
h2
|
||||
span(data-i18n="ladder.tournament_ended") Tournament ended
|
||||
| #{tournamentTimeLeft}
|
||||
p
|
||||
span(data-i18n="ladder.tournament_blurb_criss_cross") Win bids, construct paths, outwit opponents, grab gems, and upgrade your career in our Criss-Cross tournament! Check out the details
|
||||
|
|
||||
a(href="http://blog.codecombat.com/6-programming-languages-one-victor-codecombats-newest-tournament", data-i18n="ladder.tournament_blurb_blog") on our blog
|
||||
| .
|
||||
p
|
||||
strong Tournament ended!
|
||||
a(href="#winners") Behold the winners
|
||||
| . Thanks for playing! You can
|
||||
strong still play
|
||||
| Criss-Cross and all of our other
|
||||
a(href="/play/ladder") multiplayer arenas
|
||||
| .
|
||||
p
|
||||
| Want to commiserate? Head over to
|
||||
a(href="http://discourse.codecombat.com/") the forum
|
||||
| and discuss your strategies, your triumphs, and your turmoils.
|
||||
|
||||
div#columns.row
|
||||
div.column.col-md-2
|
||||
for team in teams
|
||||
div.column.col-md-4
|
||||
a(style="background-color: #{team.primaryColor}", data-team=team.id).play-button.btn.btn-danger.btn-block.btn-lg
|
||||
span(data-i18n="play.play_as") Play As
|
||||
if level.get('name') == 'Greed'
|
||||
.tournament-blurb
|
||||
h2
|
||||
span(data-i18n="ladder.tournament_ended") Tournament ended
|
||||
| #{tournamentTimeLeft}
|
||||
p
|
||||
span(data-i18n="ladder.tournament_blurb") Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details
|
||||
|
|
||||
span= team.name
|
||||
div.column.col-md-2
|
||||
|
||||
.spectate-button-container
|
||||
a(href="/play/spectate/#{level.get('slug')}").spectate-button.btn.btn-primary.center
|
||||
span(data-i18n="play.spectate") Spectate
|
||||
a(href="http://blog.codecombat.com/multiplayer-programming-tournament", data-i18n="ladder.tournament_blurb_blog") on our blog
|
||||
| .
|
||||
p
|
||||
strong Tournament ended!
|
||||
a(href="#winners") Behold the winners
|
||||
| . Thanks for playing! You can
|
||||
strong still play
|
||||
| Greed and all of our other
|
||||
a(href="/play/ladder") multiplayer arenas
|
||||
| .
|
||||
p
|
||||
| Want to commiserate? Head over to
|
||||
a(href="http://discourse.codecombat.com/") the forum
|
||||
| and discuss your strategies, your triumphs, and your turmoils.
|
||||
|
||||
.sponsor-logos
|
||||
a(href="https://heapanalytics.com/")
|
||||
img(src=base + "heap.png")
|
||||
a(href="https://www.firebase.com/")
|
||||
img(src=base + "firebase.png")
|
||||
a(href="https://onemonthrails.com/")
|
||||
img(src=base + "one_month.png")
|
||||
a(href="http://www.jetbrains.com/webstorm/")
|
||||
img(src=base + "webstorm.png")
|
||||
a(href="http://shop.oreilly.com/category/ebooks.do")
|
||||
img(src=base + "oreilly.png")
|
||||
a(href="http://aws.amazon.com/")
|
||||
img(src=base + "aws.png")
|
||||
|
||||
if level.get('name') == 'Criss-Cross'
|
||||
.tournament-blurb
|
||||
h2
|
||||
span(data-i18n="ladder.tournament_ended") Tournament ended
|
||||
| #{tournamentTimeLeft}
|
||||
p
|
||||
span(data-i18n="ladder.tournament_blurb_criss_cross") Win bids, construct paths, outwit opponents, grab gems, and upgrade your career in our Criss-Cross tournament! Check out the details
|
||||
|
|
||||
a(href="http://blog.codecombat.com/6-programming-languages-one-victor-codecombats-newest-tournament", data-i18n="ladder.tournament_blurb_blog") on our blog
|
||||
| .
|
||||
p
|
||||
strong Tournament ended!
|
||||
a(href="#winners") Behold the winners
|
||||
| . Thanks for playing! You can
|
||||
strong still play
|
||||
| Criss-Cross and all of our other
|
||||
a(href="/play/ladder") multiplayer arenas
|
||||
| .
|
||||
p
|
||||
| Want to commiserate? Head over to
|
||||
a(href="http://discourse.codecombat.com/") the forum
|
||||
| and discuss your strategies, your triumphs, and your turmoils.
|
||||
|
||||
if level.get('name') == 'Zero Sum'
|
||||
.tournament-blurb
|
||||
h2
|
||||
span(data-i18n="ladder.tournament_ends") Tournament ends
|
||||
| #{tournamentTimeLeft}
|
||||
span(data-i18n="ladder.tournament_started") , started
|
||||
| #{tournamentTimeElapsed}
|
||||
p
|
||||
span(data-i18n="ladder.tournament_blurb_zero_sum") Unleash your coding creativity in both gold gathering and battle tactics in this alpine mirror match between red sorcerer and blue sorcerer. The tournament began on Friday, March 27 and will run until Monday, April 6 at 5PM PDT. This tournament is just for fun and glory. Check out the details
|
||||
|
|
||||
a(href="http://blog.codecombat.com/zero-sum", data-i18n="ladder.tournament_blurb_blog") on our blog
|
||||
| .
|
||||
|
||||
div#columns.row
|
||||
div.column.col-md-2
|
||||
for team in teams
|
||||
div.column.col-md-4
|
||||
a(class="play-button btn btn-illustrated btn-block btn-lg " + (team.id == 'ogres' ? 'btn-primary' : 'btn-danger'), data-team=team.id)
|
||||
span(data-i18n="play.play_as") Play As
|
||||
|
|
||||
span= team.name
|
||||
div.column.col-md-2
|
||||
|
||||
.spectate-button-container
|
||||
a(href="/play/spectate/#{level.get('slug')}").spectate-button.btn.btn-illustrated.btn-info.center
|
||||
span(data-i18n="play.spectate") Spectate
|
||||
|
||||
hr
|
||||
|
||||
ul.nav.nav-pills
|
||||
li.active
|
||||
a(href="#ladder", data-toggle="tab", data-i18n="general.ladder") Ladder
|
||||
|
|
|
@ -54,8 +54,10 @@ module.exports = class LadderView extends RootView
|
|||
ctx.levelID = @levelID
|
||||
ctx.levelDescription = marked(@level.get('description')) if @level.get('description')
|
||||
ctx._ = _
|
||||
if tournamentDate = {greed: 1402444800000, 'criss-cross': 1410912000000}[@levelID]
|
||||
ctx.tournamentTimeLeft = moment(new Date(tournamentDate)).fromNow()
|
||||
if tournamentEndDate = {greed: 1402444800000, 'criss-cross': 1410912000000, 'zero-sum': 1428364800000}[@levelID]
|
||||
ctx.tournamentTimeLeft = moment(new Date(tournamentEndDate)).fromNow()
|
||||
if tournamentStartDate = {'zero-sum': 1427472000000}[@levelID]
|
||||
ctx.tournamentTimeElapsed = moment(new Date(tournamentStartDate)).fromNow()
|
||||
ctx.winners = require('./tournament_results')[@levelID]
|
||||
ctx
|
||||
|
||||
|
@ -98,21 +100,12 @@ module.exports = class LadderView extends RootView
|
|||
Backbone.Mediator.publish 'router:navigate', route: url
|
||||
|
||||
showPlayModal: (teamID) ->
|
||||
return @showApologeticSignupModal() if me.get('anonymous')
|
||||
session = (s for s in @sessions.models when s.get('team') is teamID)[0]
|
||||
modal = new LadderPlayModal({}, @level, session, teamID)
|
||||
@openModalView modal
|
||||
|
||||
showApologeticSignupModal: ->
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
@openModalView(new AuthModal({showRequiredError: true}))
|
||||
|
||||
onClickedLink: (e) ->
|
||||
link = $(e.target).closest('a').attr('href')
|
||||
if link? and _.string.startsWith(link, '/play/level') and me.get('anonymous')
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
@showApologeticSignupModal()
|
||||
if link and /#rules$/.test link
|
||||
@$el.find('a[href="#rules"]').tab('show')
|
||||
if link and /#prizes/.test link
|
||||
|
|
|
@ -46,8 +46,13 @@ module.exports = class LadderSubmissionView extends CocoView
|
|||
showLastSubmitted = not (spanClass in ['submitting'])
|
||||
@$el.find('.last-submitted').toggle(showLastSubmitted)
|
||||
|
||||
showApologeticSignupModal: ->
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
@openModalView(new AuthModal({showRequiredError: true}))
|
||||
|
||||
rankSession: (e) ->
|
||||
return unless @session.readyToRank()
|
||||
return @showApologeticSignupModal() if me.get('anonymous')
|
||||
@playSound 'menu-button-click'
|
||||
@setRankingButtonText 'submitting'
|
||||
success = =>
|
||||
|
|
Loading…
Reference in a new issue