2015-03-28 15:09:50 +00:00
|
|
|
|
extends ../layout-wide
|
|
|
|
|
block content
|
|
|
|
|
.row
|
2015-09-17 18:53:19 +00:00
|
|
|
|
.col-md-4.bonfire-top
|
2015-03-28 15:09:50 +00:00
|
|
|
|
h1.text-center= name
|
|
|
|
|
.well
|
|
|
|
|
h4
|
|
|
|
|
ol
|
2015-04-20 01:07:19 +00:00
|
|
|
|
for step, index in details
|
|
|
|
|
.row.checklist-element(id="#{dashedName + index}")
|
2015-04-27 07:10:14 +00:00
|
|
|
|
.col-xs-3.col-sm-1.col-md-2.padded-ionic-icon.text-center
|
2015-04-20 01:07:19 +00:00
|
|
|
|
input(type='checkbox' class='challenge-list-checkbox')
|
2015-04-27 07:10:14 +00:00
|
|
|
|
.col-xs-9.col-sm-11.col-md-10
|
2015-05-26 03:28:57 +00:00
|
|
|
|
li.step-text.wrappable!= step
|
2015-09-17 18:53:19 +00:00
|
|
|
|
.col-md-8
|
2015-03-28 15:09:50 +00:00
|
|
|
|
.embed-responsive.embed-responsive-16by9
|
|
|
|
|
iframe.embed-responsive-item(src='//player.vimeo.com/video/#{video}')
|
|
|
|
|
br
|
2015-05-26 09:36:29 +00:00
|
|
|
|
if (user)
|
2015-09-09 06:47:00 +00:00
|
|
|
|
a.btn.btn-primary.btn-big.btn-block#completed-zipline-or-basejump I've completed this challenge (ctrl + enter)
|
2015-03-28 15:09:50 +00:00
|
|
|
|
script.
|
|
|
|
|
var userLoggedIn = true;
|
2015-05-26 20:09:07 +00:00
|
|
|
|
else
|
2015-09-10 02:51:24 +00:00
|
|
|
|
a.btn.btn-big.btn-primary.btn-block(href='/challenges/next-challenge?id=' + challengeId) Go to my next challenge (ctrl + enter)
|
|
|
|
|
.button-spacer
|
|
|
|
|
.btn-group.input-group.btn-group-justified
|
2015-10-16 18:57:33 +00:00
|
|
|
|
.btn.btn-success.btn-big#challenge-help-btn
|
2015-09-10 02:51:24 +00:00
|
|
|
|
i.fa.fa-medkit
|
|
|
|
|
| Help
|
|
|
|
|
.btn.btn-success.btn-big#trigger-issue-modal
|
|
|
|
|
i.fa.fa-bug
|
|
|
|
|
| Bug
|
|
|
|
|
if (!user)
|
|
|
|
|
.button-spacer
|
2015-09-09 06:47:00 +00:00
|
|
|
|
a.btn.btn-big.signup-btn.btn-block(href='/login') Sign in so you can save your progress
|
2015-03-28 15:09:50 +00:00
|
|
|
|
script.
|
|
|
|
|
var userLoggedIn = false;
|
|
|
|
|
br
|
|
|
|
|
script(type="text/javascript").
|
2015-04-23 23:55:33 +00:00
|
|
|
|
|
2015-03-28 15:09:50 +00:00
|
|
|
|
#complete-zipline-or-basejump-dialog.modal(tabindex='-1')
|
2015-09-10 01:55:20 +00:00
|
|
|
|
.modal-dialog.animated.fadeIn.fast-animation
|
2015-03-28 15:09:50 +00:00
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header.challenge-list-header= compliment
|
|
|
|
|
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
|
2015-08-20 00:56:44 +00:00
|
|
|
|
.modal-body
|
2015-03-28 15:09:50 +00:00
|
|
|
|
.text-center
|
2015-09-14 07:02:42 +00:00
|
|
|
|
.animated.zoomInDown
|
2015-03-28 15:09:50 +00:00
|
|
|
|
span.completion-icon.ion-checkmark-circled.text-primary
|
2015-05-28 23:59:25 +00:00
|
|
|
|
if (user)
|
2015-08-20 00:56:44 +00:00
|
|
|
|
form.form-horizontal(name='completedWithForm', id='basejump-or-zipline-submit-form')
|
2015-03-28 15:09:50 +00:00
|
|
|
|
.form-group.text-center
|
2015-09-10 01:55:20 +00:00
|
|
|
|
.col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2
|
2015-03-29 11:39:41 +00:00
|
|
|
|
// extra field to distract password tools like lastpass from injecting css into our username field
|
2015-10-06 23:43:46 +00:00
|
|
|
|
input.form-control.hidden
|
2015-09-06 10:12:59 +00:00
|
|
|
|
if (challengeType === "3")
|
2015-10-06 23:43:46 +00:00
|
|
|
|
input.form-control#public-url(type="url", name="solutionUrl", placeholder="http://codepen.io/your-pen-here", autofocus, required)
|
2015-03-29 11:39:41 +00:00
|
|
|
|
else
|
2015-10-06 23:43:46 +00:00
|
|
|
|
input.form-control#public-url(type="url", name="solutionUrl", placeholder="http://yourapp.com", autofocus, required)
|
|
|
|
|
input.form-control#github-url(name="githubUrl", placeholder="http://github.com/camper/project")
|
2015-03-28 15:09:50 +00:00
|
|
|
|
|
2015-03-29 12:41:59 +00:00
|
|
|
|
if (user)
|
2015-12-07 06:51:37 +00:00
|
|
|
|
a.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) Submit and go to my next challenge
|
2015-09-09 06:47:00 +00:00
|
|
|
|
.button-spacer
|
2015-12-07 06:51:37 +00:00
|
|
|
|
a.btn.btn-lg.btn-block.btn-twitter(target="_blank", href="https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20PASTE_YOUR_CODEPEN_URL_HERE_USING_FULL_INSTEAD_OF_PEN%20%0A%20%23LearnToCode%20%23JavaScript", onclick="ga('send', 'event', 'twitter', 'share', 'challenge completion share');")
|
|
|
|
|
i.fa.fa-twitter  Tweet this project
|
2015-05-26 20:09:07 +00:00
|
|
|
|
else
|
2015-09-10 02:51:24 +00:00
|
|
|
|
a.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + challengeId) Go to my next challenge
|
2015-12-07 06:51:37 +00:00
|
|
|
|
|
2015-05-28 21:29:45 +00:00
|
|
|
|
include ../partials/challenge-modals
|
2015-10-08 23:42:24 +00:00
|
|
|
|
script.
|
2015-11-09 04:04:43 +00:00
|
|
|
|
var common = window.common || { init: [] };
|
|
|
|
|
common.challengeId = !{JSON.stringify(challengeId)};
|
|
|
|
|
common.challengeName = !{JSON.stringify(name)};
|
|
|
|
|
common.started = Math.floor(Date.now());
|
|
|
|
|
common.dashedName = !{JSON.stringify(dashedName)};
|
|
|
|
|
common.challengeType = !{JSON.stringify(challengeType)};
|
|
|
|
|
|
|
|
|
|
common.controlEnterHandler = function (e) {
|
|
|
|
|
$('body').unbind('keydown');
|
2015-11-24 01:50:09 +00:00
|
|
|
|
if (
|
|
|
|
|
e.keyCode === 13 &&
|
|
|
|
|
(e.metaKey || e.ctrlKey)
|
|
|
|
|
) {
|
2015-11-09 04:04:43 +00:00
|
|
|
|
$('#complete-zipline-or-basejump-dialog').modal('show');
|
|
|
|
|
} else {
|
|
|
|
|
$('body').bind('keydown', common.controlEnterHandler);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
common.modalControlEnterHandler = function (e) {
|
|
|
|
|
$('#complete-zipline-or-basejump-dialog').unbind('keydown');
|
2015-11-24 01:50:09 +00:00
|
|
|
|
if (
|
|
|
|
|
e.keyCode === 13 &&
|
|
|
|
|
(e.metaKey || e.ctrlKey)
|
|
|
|
|
) {
|
2015-11-09 04:04:43 +00:00
|
|
|
|
$('#next-courseware-button').click();
|
|
|
|
|
} else {
|
|
|
|
|
$('#complete-zipline-or-basejump-dialog').on('keydown', common.modalControlEnterHandler);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
common.init.push(function() {
|
|
|
|
|
$('body').on('keydown', common.controlEnterHandler);
|
|
|
|
|
|
|
|
|
|
if (!!{ JSON.stringify(user ? true : false)}) {
|
|
|
|
|
$('#complete-zipline-or-basejump-dialog').on('keydown', common.modalControlEnterHandler);
|
|
|
|
|
}
|
2015-11-18 05:25:16 +00:00
|
|
|
|
|
|
|
|
|
$('#completed-zipline-or-basejump').on('click', function() {
|
|
|
|
|
$('#complete-zipline-or-basejump-dialog').modal('show');
|
|
|
|
|
});
|
2015-11-09 04:04:43 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2015-11-18 05:25:16 +00:00
|
|
|
|
|
2015-10-16 18:57:33 +00:00
|
|
|
|
document.addEventListener('gitter-sidecar-ready', function(e) {
|
2015-10-16 23:30:44 +00:00
|
|
|
|
var room = 'freecodecamp/help';
|
|
|
|
|
var title;
|
|
|
|
|
|
2015-11-09 04:04:43 +00:00
|
|
|
|
if (common.challengeType === '4') {
|
2015-10-16 23:30:44 +00:00
|
|
|
|
room = 'freecodecamp/helpBasejumps';
|
|
|
|
|
title = 'Basejump Help';
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-09 04:04:43 +00:00
|
|
|
|
if (common.challengeType === '3') {
|
2015-10-16 23:30:44 +00:00
|
|
|
|
room = 'freecodecamp/helpZiplines';
|
|
|
|
|
title = 'Zipline Help';
|
|
|
|
|
}
|
|
|
|
|
|
2015-10-16 18:57:33 +00:00
|
|
|
|
if (window.main) {
|
2015-10-16 23:30:44 +00:00
|
|
|
|
window.main.chat.createHelpChat(room, '#challenge-help-btn', title);
|
2015-10-16 18:57:33 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
2015-11-09 04:04:43 +00:00
|
|
|
|
include ../partials/challenge-footer
|