Files
freeCodeCamp/server/views/coursewares/showVideo.jade
Berkeley Martinez 5dbfbfcf57 Add head/tail to challenge spec.
Lint EVERYTHING!
2015-11-06 17:32:01 -08:00

94 lines
4.4 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
.row
.col-xs-12.col-sm-12.col-md-4.bonfire-top
h1.text-center= name
.well
h4
ol
for step, index in details
.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='//player.vimeo.com/video/#{video}')
.spacer
if (user)
a.btn.btn-primary.btn-big.btn-block#completed-courseware-editorless I've completed this challenge (ctrl + enter)
else
a.btn.btn-big.btn-primary.btn-block(href='/challenges/next-challenge?id=' + challengeId) I've completed this challenge (ctrl + enter)
script.
var userLoggedIn = true;
.button-spacer
.btn-group.input-group.btn-group-justified
.btn.btn-success.btn-big#challenge-help-btn
i.fa.fa-medkit
|   Get help
.btn.btn-success.btn-big#trigger-issue-modal
i.fa.fa-bug
|   Report a bug
if (!user)
.button-spacer
a.btn.btn-big.signup-btn.btn-block(href='/login') Sign in so you can save your progress
script.
var userLoggedIn = false;
br
script(type="text/javascript").
var controlEnterHandler = function(e) {
$('body').unbind('keydown');
if (e.metaKey && e.keyCode === 13 ||
e.ctrlKey && e.keyCode === 13) {
$('#complete-courseware-editorless-dialog').modal('show');
} else {
$('body').bind('keydown', controlEnterHandler);
}
};
var modalControlEnterHandler = function(e) {
$('#complete-courseware-editorless-dialog').unbind('keydown');
if (e.metaKey && e.keyCode === 13 ||
e.ctrlKey && e.keyCode === 13) {
$('#next-courseware-button').click();
} else {
$('#complete-courseware-editorless-dialog').bind('keydown', modalControlEnterHandler);
}
};
#complete-courseware-editorless-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(ng-controller="pairedWithController")
.text-center
.animated.zoomInDown
span.completion-icon.ion-checkmark-circled.text-primary
if (user)
a.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) I've completed this challenge (ctrl + enter)
script.
$('#complete-courseware-editorless-dialog').bind('keydown', modalControlEnterHandler);
else
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + challengeId) I've completed this challenge (ctrl + enter)
script.
$('body').bind('keydown', controlEnterHandler);
include ../partials/challenge-modals
script.
var common = window.common = { init: [] };
common.challengeId = !{JSON.stringify(challengeId)};
common.challengeName = !{JSON.stringify(name)};
common.challengeType = !{JSON.stringify(challengeType)};
common.dashedName = !{JSON.stringify(dashedName)};
document.addEventListener('gitter-sidecar-ready', function(e) {
if (window.main) {
window.main.chat.createHelpChat('freecodecamp/help', '#challenge-help-btn');
}
});
include ../partials/challenge-footer