2015-02-13 21:07:56 -05:00
|
|
|
|
extends ../layout-wide
|
2015-02-13 20:55:49 -05:00
|
|
|
|
block content
|
|
|
|
|
.row
|
2015-02-13 18:40:39 -08:00
|
|
|
|
.col-xs-12.col-sm-12.col-md-4.bonfire-top
|
|
|
|
|
h1.text-center= name
|
|
|
|
|
.well
|
|
|
|
|
h4
|
|
|
|
|
ol
|
2015-04-17 23:51:57 -07:00
|
|
|
|
for step, index in details
|
2015-04-18 15:00:31 -07:00
|
|
|
|
.row.checklist-element(id="#{dashedName + index}")
|
|
|
|
|
.col-xs-2.col-sm-1.col-md-2.padded-ionic-icon.text-center
|
|
|
|
|
input(type='checkbox' class='challenge-list-checkbox')
|
|
|
|
|
.col-xs-10.col-sm-11.col-md-10
|
|
|
|
|
li
|
|
|
|
|
.step-text!= step
|
2015-02-13 18:40:39 -08:00
|
|
|
|
.col-xs-12.col-sm-12.col-md-8
|
|
|
|
|
.embed-responsive.embed-responsive-16by9
|
|
|
|
|
iframe.embed-responsive-item(src='//player.vimeo.com/video/#{video}')
|
|
|
|
|
br
|
2015-03-27 14:36:17 -07:00
|
|
|
|
- if (user)
|
2015-03-29 17:09:12 -07:00
|
|
|
|
a.btn.btn-primary.btn-big.btn-block#completed-courseware I've completed this challenge (ctrl + enter)
|
2015-02-13 20:55:49 -05:00
|
|
|
|
script.
|
2015-02-13 18:40:39 -08:00
|
|
|
|
var userLoggedIn = true;
|
|
|
|
|
- else
|
2015-03-29 17:09:12 -07:00
|
|
|
|
a.btn.btn-big.signup-btn.btn-block(href='/login') Sign in so you can save your progress
|
2015-02-13 18:40:39 -08:00
|
|
|
|
script.
|
|
|
|
|
var userLoggedIn = false;
|
|
|
|
|
br
|
2015-03-29 17:09:12 -07:00
|
|
|
|
.button-spacer
|
|
|
|
|
script(type="text/javascript").
|
2015-02-14 12:52:04 -08:00
|
|
|
|
var tests = !{JSON.stringify(tests)};
|
|
|
|
|
var passedCoursewareHash = !{JSON.stringify(coursewareHash)};
|
|
|
|
|
var challengeName = !{JSON.stringify(name)};
|
2015-03-21 15:44:18 +09:00
|
|
|
|
var passedCoursewareName = challengeName;
|
2015-03-27 14:36:17 -07:00
|
|
|
|
var started = Math.floor(Date.now());
|
2015-03-29 20:39:41 +09:00
|
|
|
|
var challengeType = !{JSON.stringify(challengeType)};
|
2015-04-23 19:55:33 -04:00
|
|
|
|
var controlEnterHandler = function(e) {
|
|
|
|
|
$('body').unbind('keypress');
|
|
|
|
|
if (e.ctrlKey && e.keyCode == 13) {
|
|
|
|
|
$('#complete-courseware-dialog').modal('show');
|
|
|
|
|
} else {
|
|
|
|
|
$('body').bind('keypress', controlEnterHandler);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var modalControlEnterHandler = function(e) {
|
|
|
|
|
$('#complete-courseware-dialog').unbind('keypress');
|
|
|
|
|
if (e.ctrlKey && e.keyCode == 13) {
|
|
|
|
|
$('#next-courseware-button').click();
|
|
|
|
|
} else {
|
|
|
|
|
$('#complete-courseware-dialog').bind('keypress', modalControlEnterHandler);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2015-02-13 18:40:39 -08:00
|
|
|
|
#complete-courseware-dialog.modal(tabindex='-1')
|
|
|
|
|
.modal-dialog.animated.zoomIn.fast-animation
|
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header.challenge-list-header= compliment
|
2015-03-21 14:28:00 +09:00
|
|
|
|
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
|
2015-02-13 18:40:39 -08:00
|
|
|
|
.modal-body(ng-controller="pairedWithController")
|
|
|
|
|
.text-center
|
|
|
|
|
.animated.zoomInDown.delay-half
|
|
|
|
|
span.completion-icon.ion-checkmark-circled.text-primary
|
2015-03-27 14:36:17 -07:00
|
|
|
|
- if (user)
|
2015-04-22 08:36:31 -04:00
|
|
|
|
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) On to my next challenge (ctrl + enter)
|
2015-04-23 19:30:24 -04:00
|
|
|
|
script.
|
2015-04-23 19:55:33 -04:00
|
|
|
|
$('#complete-courseware-dialog').bind('keypress', modalControlEnterHandler);
|
|
|
|
|
|
2015-03-27 14:36:17 -07:00
|
|
|
|
- if (user.progressTimestamps.length > 2)
|
2015-02-13 18:40:39 -08:00
|
|
|
|
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20Bonfire:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/bonfires/#{dashedName}&hashtags=LearnToCode, JavaScript" target="_blank")
|
2015-03-08 01:36:09 -08:00
|
|
|
|
i.fa.fa-twitter  
|
2015-02-13 18:40:39 -08:00
|
|
|
|
= phrase
|
|
|
|
|
- else
|
|
|
|
|
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
|
|
|
|
|
h1 #{name}
|
2015-02-22 19:35:55 +09:00
|
|
|
|
script.
|
2015-04-23 19:55:33 -04:00
|
|
|
|
$('body').bind('keypress', controlEnterHandler);
|