2015-09-27 22:58:59 +00:00
extends ../layout-wide
block content
.row
.col-md-8.col-md-offset-2
for step, index in description
2016-01-09 21:32:52 +00:00
.challenge-step(class=index !== 0 ? 'hidden': '')
2015-10-26 06:28:53 +00:00
a(href=step[0] data-lightbox='img-enlarge')
2016-01-09 21:32:52 +00:00
img.gif-block.img-center.img-responsive(src='#{step[0]}' alt='#{step[1]}')
2016-01-15 10:42:26 +00:00
.row
2016-01-15 13:21:39 +00:00
.spacer
2016-01-15 10:42:26 +00:00
.col-xs-12.col-sm-10.col-sm-offset-1.col-md-8.col-md-offset-2
p!= step[2]
2016-01-15 13:21:39 +00:00
.spacer
2015-11-16 03:51:54 +00:00
.challenge-button-block
if step[3]
2016-01-15 07:29:46 +00:00
a.btn.btn-block.btn-primary.challenge-step-btn-action.btn-lg(id='#{index}' href='#{step[3]}' target='_blank') Open link in new tab (this unlocks the next step)
2015-11-16 03:51:54 +00:00
.button-spacer
2015-12-01 04:29:07 +00:00
if index === 0
.col-sm-5.hidden-xs
else
2016-01-15 07:29:46 +00:00
.btn.btn-primary.btn-primary-ghost.col-sm-5.col-xs-12.challenge-step-btn-prev.btn-lg(id='#{index - 1}') Go to my previous step
2015-12-08 22:45:30 +00:00
.challenge-step-counter.large-p.col-sm-2.col-xs-12.text-center (#{index + 1} / #{description.length})
2015-12-01 04:29:07 +00:00
if index + 1 === description.length
2016-01-15 07:29:46 +00:00
.btn.btn-primary.col-sm-5.col-xs-12.challenge-step-btn-finish.btn-lg(id='last' class=step[3] && !isCompleted ? 'disabled' : '') Finish challenge
2015-11-16 03:51:54 +00:00
else
2016-01-15 07:29:46 +00:00
.btn.btn-primary.col-sm-5.col-xs-12.challenge-step-btn-next.btn-lg(id='#{index}' class=step[3] && !isCompleted ? 'disabled' : '') Go to my next step
2015-11-16 03:51:54 +00:00
.clearfix
2016-01-15 07:06:06 +00:00
.spacer
2015-09-27 22:58:59 +00:00
#challenge-step-modal.modal(tabindex='-1')
.modal-dialog.animated.fadeIn.fast-animation
.modal-content
.modal-header.challenge-list-header= compliment
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
.text-center
#checkmark-container.row
#challenge-checkmark.animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary
.spacer
.row
if (user)
2015-10-06 04:57:15 +00:00
#challenge-step-btn-submit.animated.fadeIn.btn.btn-lg.btn-primary.btn-block Submit and go to my next challenge
2015-09-27 22:58:59 +00:00
else
2016-01-12 06:47:49 +00:00
a.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + id) Go to my next challenge
2015-09-27 22:58:59 +00:00
script.
2015-10-02 18:47:36 +00:00
var common = window.common || { init: [] };
2015-11-07 00:35:57 +00:00
2016-01-12 06:47:49 +00:00
common.challengeId = !{JSON.stringify(id)};
2015-09-27 22:58:59 +00:00
common.challengeName = !{JSON.stringify(name)};
2015-11-07 20:54:58 +00:00
common.challengeType = !{JSON.stringify(challengeType)};
2015-09-27 22:58:59 +00:00
common.dashedName = !{JSON.stringify(dashedName || '')};
2015-10-02 18:47:36 +00:00
common.isHonest = !{JSON.stringify(isHonest || false)};
common.isFrontEndCert = !{JSON.stringify(isFrontEndCert || false)};
common.isFullStackCert = !{JSON.stringify(isFullStackCert || false)};
common.challengeSeed = !{JSON.stringify(challengeSeed || [])};
2015-11-24 22:24:26 +00:00
include ../partials/challenge-footer