Files
freeCodeCamp/server/views/challenges/showZiplineOrBasejump.jade
Berkeley Martinez a63fba8c9c Merge pull request #8196 from QuincyLarson/fix/vimeo-to-youtube
Transition Videos from Vimeo to Youtube
2016-05-04 15:42:15 -07:00

114 lines
5.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends ../layout-wide
block content
include ../partials/flyer
.row
.col-md-4
h4.text-center.challenge-instructions-title= name
if (isCompleted)
|  
i.ion-checkmark-circled.text-primary(title="Completed")
hr
ol
for step, index in description
.row.checklist-element(id="#{dashedName + index}")
.col-xs-3.col-sm-1.col-md-2.padded-ionic-icon.text-center
input(type='checkbox' class='challenge-list-checkbox')
.col-xs-9.col-sm-11.col-md-10
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
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
.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
input.form-control.hidden
if (challengeType === "3")
input.form-control#public-url(type="url", name="solutionUrl", placeholder="http://codepen.io/your-pen-here", autofocus, required)
else
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
.button-spacer
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
else
a.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + id) Go to my next challenge
include ../partials/challenge-modals
script.
var common = window.common || { init: [] };
common.challengeId = !{JSON.stringify(id)};
common.challengeName = !{JSON.stringify(name)};
common.dashedName = !{JSON.stringify(dashedName)};
common.gaName = !{JSON.stringify(gaName)};
common.challengeType = !{JSON.stringify(challengeType)};
common.controlEnterHandler = function (e) {
$('body').unbind('keydown');
if (
e.keyCode === 13 &&
(e.metaKey || e.ctrlKey)
) {
$('#complete-zipline-or-basejump-dialog').modal('show');
} else {
$('body').bind('keydown', common.controlEnterHandler);
}
};
common.modalControlEnterHandler = function (e) {
$('#complete-zipline-or-basejump-dialog').unbind('keydown');
if (
e.keyCode === 13 &&
(e.metaKey || e.ctrlKey)
) {
$('#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);
}
$('#completed-zipline-or-basejump').on('click', function() {
$('#complete-zipline-or-basejump-dialog').modal('show');
});
});
include ../partials/challenge-footer