freeCodeCamp/server/views/challenges/showZiplineOrBasejump.jade

111 lines
5.2 KiB
Plaintext
Raw Normal View History

extends ../layout-wide
block content
2016-04-15 02:49:19 +00:00
include ../partials/flyer
.row
.col-md-4
2016-02-04 16:24:09 +00:00
h4.text-center.challenge-instructions-title= name
if (isCompleted)
|  
2016-04-03 03:52:52 +00:00
i.ion-checkmark-circled.text-primary(title="Completed")
2016-01-09 21:32:52 +00:00
hr
2016-01-15 13:04:44 +00:00
ol
for step, index in description
.row.checklist-element(id="#{dashedName + index}")
2016-02-04 16:24:09 +00:00
.col-xs-3.col-sm-1.col-md-2.padded-ionic-icon.text-center
2016-01-15 13:04:44 +00:00
input(type='checkbox' class='challenge-list-checkbox')
2016-02-04 16:24:09 +00:00
.col-xs-9.col-sm-11.col-md-10
2016-01-15 13:04:44 +00:00
li.step-text.wrappable!= step
.col-xs-12.col-sm-12.col-md-8
.embed-responsive.embed-responsive-16by9
iframe.embed-responsive-item(src='//www.youtube.com/embed/#{video}?rel=0&showinfo=0')
br
if (user)
a.btn.btn-primary.btn-big.btn-block#completed-zipline-or-basejump I've completed this challenge (ctrl + enter)
script.
var userLoggedIn = true;
else
a.btn.btn-big.btn-primary.btn-block(href='/challenges/next-challenge?id=' + id) Go to my next challenge (ctrl + enter)
.button-spacer
.btn-group.input-group.btn-group-justified
.btn.btn-primary.btn-primary-ghost.btn-big#challenge-help-btn Help
.btn.btn-primary.btn-primary-ghost.btn-big#trigger-issue-modal Bug
if (!user)
.button-spacer
2016-05-03 15:06:20 +00:00
a.btn.btn-big.signup-btn.btn-block(href='/signin') Sign in so you can save your progress
script.
var userLoggedIn = false;
br
script(type="text/javascript").
#complete-zipline-or-basejump-dialog.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
2015-09-14 07:02:42 +00:00
.animated.zoomInDown
span.completion-icon.ion-checkmark-circled.text-primary
if (user)
form.form-horizontal(name='completedWithForm', id='basejump-or-zipline-submit-form')
.form-group.text-center
.col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2
// 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)
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")
if (user)
a.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) Submit and go to my next challenge
else
a.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + id) Go to my next challenge
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(id)};
2015-11-09 04:04:43 +00:00
common.challengeName = !{JSON.stringify(name)};
common.dashedName = !{JSON.stringify(dashedName)};
common.gaName = !{JSON.stringify(gaName)};
2015-11-09 04:04:43 +00:00
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
});
include ../partials/challenge-footer