2014-09-17 21:56:08 -04:00
|
|
|
.map
|
|
|
|
img.map-background(src="/images/pages/play/map_forest.jpg", alt="")
|
|
|
|
|
2014-09-19 14:03:38 -04:00
|
|
|
- var seenNext = false;
|
2014-09-17 21:56:08 -04:00
|
|
|
each campaign in campaigns
|
|
|
|
each level in campaign.levels
|
2014-09-19 14:03:38 -04:00
|
|
|
- var next = !seenNext && levelStatusMap[level.id] != "complete";
|
|
|
|
- seenNext = seenNext || next;
|
2014-09-26 05:28:54 -04:00
|
|
|
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{campaign.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name)
|
2014-09-19 14:03:38 -04:00
|
|
|
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
|
|
|
div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "")
|
2014-09-23 22:12:05 -04:00
|
|
|
.level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
2014-09-17 21:56:08 -04:00
|
|
|
div(class="level-info " + (levelStatusMap[level.id] || ""))
|
2014-09-26 05:28:54 -04:00
|
|
|
h3= level.name + (level.disabled ? " (Coming soon!)" : (level.locked ? " (Locked)" : ""))
|
2014-09-17 21:56:08 -04:00
|
|
|
.level-description= level.description
|
|
|
|
span(data-i18n="play.level_difficulty") Difficulty:
|
|
|
|
each i in Array(level.difficulty)
|
|
|
|
i.icon-star
|
|
|
|
- var playCount = levelPlayCountMap[level.id]
|
2014-09-23 14:39:56 -04:00
|
|
|
if playCount && playCount > 20
|
2014-09-17 21:56:08 -04:00
|
|
|
div
|
|
|
|
span.spr #{playCount.sessions}
|
|
|
|
span(data-i18n="play.players") players
|
|
|
|
span.spr , #{Math.round(playCount.playtime / 3600)}
|
|
|
|
span(data-i18n="play.hours_played") hours played
|
|
|
|
.campaign-label(style="color: #{campaign.color}")= campaign.name
|
2014-09-24 18:21:39 -04:00
|
|
|
if isIPadApp
|
|
|
|
button.btn.btn-success.btn-lg.start-level(data-i18n="common.play") Play
|
2014-09-17 21:56:08 -04:00
|
|
|
|
2014-09-20 01:15:58 -04:00
|
|
|
.game-controls.header-font
|
2014-09-18 21:25:33 -04:00
|
|
|
if me.isAdmin()
|
|
|
|
button.btn.items(data-toggle='coco-modal', data-target='play/modal/PlayItemsModal', data-i18n="[title]play.items")
|
2014-09-25 18:58:25 -04:00
|
|
|
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.isAdmin()
|
|
|
|
button.btn.account(data-toggle='coco-modal', data-target='play/modal/PlayAccountModal', data-i18n="[title]play.account")
|
|
|
|
button.btn.settings(data-toggle='coco-modal', data-target='play/modal/PlaySettingsModal', data-i18n="[title]play.settings")
|
|
|
|
else if me.get('anonymous')
|
|
|
|
button.btn.settings(data-toggle='coco-modal', data-target='modal/AuthModal', data-i18n="[title]play.settings")
|
|
|
|
else
|
|
|
|
a.btn.achievements(href="/user/#{me.getSlugOrID()}/stats", data-i18n="[title]play.achievements")
|
|
|
|
a.btn.account(href="/user/#{me.getSlugOrID()}", data-i18n="[title]play.account")
|
|
|
|
a.btn.settings(href='/account', data-i18n="[title]play.settings")
|
2014-09-25 18:32:33 -04:00
|
|
|
|
|
|
|
.old-levels
|
|
|
|
a(href="/play-old", data-i18n="play.older_campaigns").header-font Older Campaigns
|
2014-09-25 18:58:25 -04:00
|
|
|
|
|
|
|
.user-status.header-font
|
2014-09-26 05:28:54 -04:00
|
|
|
span.gem.gem-20
|
|
|
|
span.spr= me.gems()
|
2014-09-25 18:58:25 -04:00
|
|
|
if me.get('anonymous')
|
|
|
|
span.spr(data-i18n="play.anonymous_player") Anonymous Player
|
|
|
|
button.btn.btn-default.btn-flat.btn-sm(data-toggle='coco-modal', data-target='modal/AuthModal', data-i18n="login.log_in")
|
|
|
|
else
|
|
|
|
span.spr= me.get('name')
|
|
|
|
button#logout-button.btn.btn-default.btn-flat.btn-sm(data-i18n="login.log_out") Log Out
|