mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
73 lines
4.2 KiB
Text
73 lines
4.2 KiB
Text
.map
|
|
.gradient.horizontal-gradient.top-gradient
|
|
.gradient.vertical-gradient.right-gradient
|
|
.gradient.horizontal-gradient.bottom-gradient
|
|
.gradient.vertical-gradient.left-gradient
|
|
img.map-background(src="/images/pages/play/map_" + mapType + ".jpg", alt="")
|
|
|
|
- var seenNext = nextLevel;
|
|
each level in campaign.levels
|
|
if level.hidden
|
|
continue;
|
|
- var next = level.id == nextLevel || (!seenNext && levelStatusMap[level.id] != "complete" && !level.locked && !level.disabled);
|
|
- seenNext = seenNext || next;
|
|
div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{level.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name)
|
|
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] || "")
|
|
.level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name)
|
|
div(class="level-info " + (levelStatusMap[level.id] || ""))
|
|
h3= level.name + (level.disabled ? " (Coming soon!)" : (level.locked ? " (Locked)" : ""))
|
|
.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]
|
|
if playCount && playCount.sessions > 20
|
|
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
|
|
if isIPadApp
|
|
button.btn.btn-success.btn-lg.start-level(data-i18n="common.play") Play
|
|
|
|
.game-controls.header-font
|
|
if me.isAdmin()
|
|
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.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")
|
|
|
|
if mapType === 'forest'
|
|
a.btn(href="/play/dungeon", data-i18n="[title]play.campaign_dungeon")
|
|
img(src="/images/pages/play/map_dungeon_icon.jpg").img-thumbnail
|
|
if mapType === 'dungeon'
|
|
a.btn(href="/play/forest", data-i18n="[title]play.campaign_forest")
|
|
img(src="/images/pages/play/map_forest_icon.jpg").img-thumbnail
|
|
|
|
.old-levels
|
|
a(href="/play-old", data-i18n="play.older_campaigns").header-font Older Campaigns
|
|
|
|
.user-status.header-font
|
|
span.gem.gem-20
|
|
span.spr= me.gems()
|
|
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
|
|
|
|
button.btn.btn-lg.btn-inverse#volume-button(title="Adjust volume")
|
|
.glyphicon.glyphicon-volume-off
|
|
.glyphicon.glyphicon-volume-down
|
|
.glyphicon.glyphicon-volume-up
|