2015-02-17 05:45:53 -05:00
|
|
|
a(href="/")
|
|
|
|
img#small-nav-logo(src="/images/pages/base/logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat")
|
2015-07-21 13:28:13 -04:00
|
|
|
|
2015-02-05 18:05:22 -05:00
|
|
|
if campaign
|
|
|
|
.map
|
|
|
|
.gradient.horizontal-gradient.top-gradient
|
|
|
|
.gradient.vertical-gradient.right-gradient
|
|
|
|
.gradient.horizontal-gradient.bottom-gradient
|
|
|
|
.gradient.vertical-gradient.left-gradient
|
|
|
|
.map-background(alt="", draggable="false")
|
2014-12-19 13:06:20 -05:00
|
|
|
|
2015-02-05 18:05:22 -05:00
|
|
|
each level in levels
|
|
|
|
if !level.hidden
|
|
|
|
div(style="left: #{level.position.x}%; bottom: #{level.position.y}%; background-color: #{level.color}", class="level" + (level.next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + (levelStatusMap[level.slug] || ""), data-level-slug=level.slug, data-level-original=level.original, title=i18n(level, 'name') + (level.disabled ? ' (Coming Soon to Adventurers)' : ''))
|
|
|
|
if level.unlocksHero && (!level.purchasedHero || editorMode)
|
|
|
|
img.hero-portrait(src="/file/db/thang.type/#{level.unlocksHero}/portrait.png")
|
|
|
|
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.slug}", disabled=level.disabled, data-level-slug=level.slug, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
2015-04-07 12:05:13 -04:00
|
|
|
if level.slug == 'lost-viking'
|
|
|
|
img.star(src="/file/db/thang.type/5441c3144e9aeb727cc97111/portrait.png")
|
2015-03-18 00:20:26 -04:00
|
|
|
else if level.requiresSubscription
|
2015-02-05 18:05:22 -05:00
|
|
|
img.star(src="/images/pages/play/star.png")
|
|
|
|
if levelStatusMap[level.slug] === 'complete'
|
|
|
|
img.banner(src="/images/pages/play/level-banner-complete.png")
|
|
|
|
if levelStatusMap[level.slug] === 'started'
|
|
|
|
img.banner(src="/images/pages/play/level-banner-started.png")
|
2015-04-13 20:07:13 -04:00
|
|
|
if levelDifficultyMap[level.slug]
|
|
|
|
.level-difficulty-banner-text= levelDifficultyMap[level.slug]
|
2015-02-05 18:05:22 -05:00
|
|
|
div(style="left: #{level.position.x}%; bottom: #{level.position.y}%", class="level-shadow" + (level.next ? " next" : "") + " " + (levelStatusMap[level.slug] || ""))
|
|
|
|
.level-info-container(data-level-slug=level.slug, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
|
|
|
- var playCount = levelPlayCountMap[level.slug]
|
|
|
|
div(class="level-info " + (levelStatusMap[level.slug] || "") + (level.requiresSubscription ? " premium" : ""))
|
|
|
|
.level-status
|
|
|
|
h3= i18n(level, 'name') + (level.disabled ? " (Coming soon!)" : (level.locked ? " (Locked)" : ""))
|
|
|
|
- var description = i18n(level, 'description') || level.description || ""
|
|
|
|
.level-description!= marked(description)
|
|
|
|
if level.disabled
|
|
|
|
p
|
|
|
|
span.spr(data-i18n="play.awaiting_levels_adventurer_prefix") We release five levels per week.
|
|
|
|
a.spr(href="/contribute/adventurer")
|
|
|
|
strong(data-i18n="play.awaiting_levels_adventurer") Sign up as an Adventurer
|
|
|
|
span.spl(data-i18n="play.awaiting_levels_adventurer_suffix") to be the first to play new levels.
|
2015-07-21 13:28:13 -04:00
|
|
|
if level.displayConcepts && level.displayConcepts.length
|
2015-06-30 14:27:58 -04:00
|
|
|
p
|
2015-07-21 13:28:13 -04:00
|
|
|
for concept in level.displayConcepts
|
2015-06-30 14:27:58 -04:00
|
|
|
kbd(data-i18n="concepts." + concept)
|
2015-02-05 18:05:22 -05:00
|
|
|
|
|
|
|
if !level.disabled && !level.locked
|
|
|
|
if playCount && playCount.sessions
|
|
|
|
.play-counts.hidden
|
|
|
|
span.spl.spr= playCount.sessions
|
|
|
|
span(data-i18n="play.players") players
|
|
|
|
span.spr , #{Math.round(playCount.playtime / 3600)}
|
|
|
|
span(data-i18n="play.hours_played") hours played
|
|
|
|
if levelStatusMap[level.slug] === 'complete'
|
|
|
|
button.btn.btn-warning.btn.btn-lg.btn-illustrated.view-solutions(data-level-slug=level.slug)
|
|
|
|
span(data-i18n="leaderboard.scores")
|
|
|
|
button.btn.btn-success.btn.btn-lg.btn-illustrated.start-level(data-i18n="common.play") Play
|
2015-12-01 14:24:16 -05:00
|
|
|
if me.get('courseInstances') && me.get('courseInstances').length
|
|
|
|
.course-version.hidden(data-level-original=level.original)
|
|
|
|
em(data-i18n="general.or")
|
|
|
|
| ...
|
|
|
|
br
|
|
|
|
button.btn.btn-primary.btn.btn-lg.btn-illustrated
|
|
|
|
span(data-i18n="play.play_classroom_version") Play Classroom Version
|
2015-02-05 18:05:22 -05:00
|
|
|
else if level.unlocksHero && !level.purchasedHero
|
|
|
|
img.hero-portrait(src="/file/db/thang.type/#{level.unlocksHero}/portrait.png", style="left: #{level.position.x}%; bottom: #{level.position.y}%;")
|
|
|
|
|
|
|
|
for adjacentCampaign in adjacentCampaigns
|
|
|
|
a(href=(editorMode ? "/editor/campaign/" : "/play/") + adjacentCampaign.slug)
|
|
|
|
span.glyphicon.glyphicon-share-alt.campaign-switch(style=adjacentCampaign.style, title=adjacentCampaign.name, data-campaign-id=adjacentCampaign.id)
|
|
|
|
|
|
|
|
else
|
|
|
|
.portal
|
|
|
|
.portals
|
2015-06-08 16:20:54 -04:00
|
|
|
for campaignSlug in ['dungeon', 'forest', 'desert', 'mountain', 'glacier', 'volcano']
|
2015-02-05 18:05:22 -05:00
|
|
|
- var campaign = campaigns[campaignSlug];
|
2015-02-12 14:42:05 -05:00
|
|
|
- var godmode = me.get('permissions', true).indexOf('godmode') != -1;
|
|
|
|
div(class="campaign #{campaignSlug}" + (campaign ? "" : " silhouette") + (campaign && campaign.locked && !godmode ? " locked" : ""), data-campaign-slug=campaignSlug)
|
2015-02-05 18:05:22 -05:00
|
|
|
.campaign-label
|
|
|
|
h2.campaign-name
|
|
|
|
if campaign
|
|
|
|
span= i18n(campaign.attributes, 'fullName')
|
|
|
|
else
|
|
|
|
span ???
|
|
|
|
if campaign && campaign.levelsTotal
|
|
|
|
h3.levels-completed
|
|
|
|
span= campaign.levelsCompleted
|
|
|
|
| /
|
|
|
|
span= campaign.levelsTotal
|
2015-02-12 14:42:05 -05:00
|
|
|
if campaign && campaign.locked && !godmode
|
2015-02-05 18:05:22 -05:00
|
|
|
h3.campaign-locked(data-i18n="play.locked") Locked
|
|
|
|
else if campaign
|
|
|
|
btn(data-i18n="common.play").btn.btn-illustrated.btn-lg.btn-success.play-button
|
2015-03-18 19:20:30 -04:00
|
|
|
if campaign && campaign.get('description')
|
2015-04-07 16:32:18 -04:00
|
|
|
p.campaign-description
|
2015-03-18 19:20:30 -04:00
|
|
|
span= i18n(campaign.attributes, 'description')
|
2014-12-19 13:06:20 -05:00
|
|
|
|
|
|
|
.game-controls.header-font
|
2015-03-07 19:30:25 -05:00
|
|
|
button.btn.poll.hidden(data-i18n="[title]play.poll")
|
2015-08-07 10:33:30 -04:00
|
|
|
a.btn.clans(href="/clans", data-i18n="[title]clans.clans")
|
2014-12-19 13:06:20 -05:00
|
|
|
button.btn.items(data-toggle='coco-modal', data-target='play/modal/PlayItemsModal', data-i18n="[title]play.items")
|
|
|
|
button.btn.heroes(data-toggle='coco-modal', data-target='play/modal/PlayHeroesModal', data-i18n="[title]play.heroes")
|
|
|
|
button.btn.achievements(data-toggle='coco-modal', data-target='play/modal/PlayAchievementsModal', data-i18n="[title]play.achievements")
|
|
|
|
if me.get('anonymous') === false || me.get('iosIdentifierForVendor') || isIPadApp
|
|
|
|
button.btn.gems(data-toggle='coco-modal', data-target='play/modal/BuyGemsModal', data-i18n="[title]play.buy_gems")
|
2015-02-26 17:35:41 -05:00
|
|
|
if !me.get('anonymous', true)
|
|
|
|
button.btn.account(data-toggle='coco-modal', data-target='play/modal/PlayAccountModal', data-i18n="[title]play.account")
|
2015-03-07 19:30:25 -05:00
|
|
|
//if me.isAdmin()
|
|
|
|
// button.btn.settings(data-toggle='coco-modal', data-target='play/modal/PlaySettingsModal', data-i18n="[title]play.settings")
|
|
|
|
if me.get('anonymous', true)
|
2014-12-19 13:06:20 -05:00
|
|
|
button.btn.settings(data-toggle='coco-modal', data-target='core/AuthModal', data-i18n="[title]play.settings")
|
2015-07-21 13:28:13 -04:00
|
|
|
|
2014-12-19 13:06:20 -05:00
|
|
|
.user-status.header-font
|
|
|
|
.user-status-line
|
|
|
|
span.gem.gem-30
|
|
|
|
span#gems-count.spr= me.gems()
|
2015-02-21 14:29:40 -05:00
|
|
|
span.level-indicator(data-i18n="general.player_level")
|
2014-12-19 13:06:20 -05:00
|
|
|
span.player-level.spr= me.level()
|
|
|
|
span.player-hero-icon
|
|
|
|
if me.get('anonymous')
|
|
|
|
span.player-name.spr(data-i18n="play.anonymous") Anonymous Player
|
|
|
|
button.btn.btn-illustrated.login-button.btn-warning(data-i18n="login.log_in")
|
|
|
|
button.btn.btn-illustrated.signup-button.btn-danger(data-i18n="signup.sign_up")
|
|
|
|
else
|
2015-03-10 17:49:50 -04:00
|
|
|
a(data-toggle="coco-modal", data-target="play/modal/PlayAccountModal").player-name.spr= me.get('name')
|
2014-12-19 13:06:20 -05:00
|
|
|
button#logout-button.btn.btn-illustrated.btn-warning(data-i18n="login.log_out") Log Out
|
|
|
|
if me.isPremium()
|
|
|
|
button.btn.btn-illustrated.btn-primary(data-i18n="nav.contact", data-toggle="coco-modal", data-target="core/ContactModal") Contact
|
|
|
|
|
2015-02-25 14:09:11 -05:00
|
|
|
button.btn.btn-lg.btn-inverse.campaign-control-button#volume-button(data-i18n="[title]play.adjust_volume", title="Adjust volume")
|
2014-12-19 13:06:20 -05:00
|
|
|
.glyphicon.glyphicon-volume-off
|
|
|
|
.glyphicon.glyphicon-volume-down
|
|
|
|
.glyphicon.glyphicon-volume-up
|
|
|
|
|
2015-02-25 14:09:11 -05:00
|
|
|
if campaign && !editorMode
|
|
|
|
button.btn.btn-lg.btn-inverse.campaign-control-button#back-button(data-i18n="[title]resources.campaigns", title="Campaigns")
|
2015-02-05 18:40:33 -05:00
|
|
|
.glyphicon.glyphicon-globe
|
|
|
|
|
2015-02-25 14:09:11 -05:00
|
|
|
if editorMode
|
|
|
|
button.btn.btn-lg.btn-inverse.campaign-control-button#clear-storage-button(data-i18n="[title]editor.clear_storage", title="Clear your local changes")
|
|
|
|
.glyphicon.glyphicon-refresh
|
|
|
|
|
2015-02-05 18:05:22 -05:00
|
|
|
if campaign && campaign.loaded
|
2015-01-29 12:07:25 -05:00
|
|
|
h1#campaign-status
|
|
|
|
.campaign-status-background
|
2015-02-03 12:56:27 -05:00
|
|
|
.campaign-name
|
|
|
|
- var fullName = i18n(campaign.attributes, 'fullName')
|
|
|
|
if (me.get('preferredLanguage', true) || 'en-US').split('-')[0] == 'en' || fullName != campaign.get('fullName')
|
|
|
|
// We have a translation.
|
|
|
|
span= fullName
|
|
|
|
.levels-completed
|
|
|
|
span= levelsCompleted
|
|
|
|
| /
|
|
|
|
span= levelsTotal
|