Begin shaping codebase for loopback migration.

This commit is contained in:
terakilobyte
2015-06-01 18:30:43 -04:00
parent 73de78bbad
commit d9c3251f94
74 changed files with 1186 additions and 1320 deletions

View File

@@ -0,0 +1,86 @@
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}')
br
if (user)
a.btn.btn-primary.btn-big.btn-block#completed-courseware-editorless I've completed this challenge (ctrl + enter)
script.
var userLoggedIn = true;
.button-spacer
if (user.sentSlackInvite)
.btn-group.input-group.btn-group-justified
.btn.btn-success.btn-big#trigger-help-editorless-modal
i.fa.fa-medkit
|   Get help
.btn.btn-success.btn-big#trigger-issue-modal
i.fa.fa-bug
|   Report a bug
.button-spacer
else
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('keypress');
if (e.ctrlKey && e.keyCode == 13) {
$('#complete-courseware-editorless-dialog').modal('show');
} else {
$('body').bind('keypress', controlEnterHandler);
}
};
var modalControlEnterHandler = function(e) {
$('#complete-courseware-editorless-dialog').unbind('keypress');
if (e.ctrlKey && e.keyCode == 13) {
$('#next-courseware-button').click();
} else {
$('#complete-courseware-editorless-dialog').bind('keypress', modalControlEnterHandler);
}
};
#complete-courseware-editorless-dialog.modal(tabindex='-1')
.modal-dialog.animated.zoomIn.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.delay-half
span.completion-icon.ion-checkmark-circled.text-primary
if (user)
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) On to my next challenge (ctrl + enter)
script.
$('#complete-courseware-editorless-dialog').bind('keypress', modalControlEnterHandler);
if (user.progressTimestamps.length > 2)
.button-spacer
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{dashedName}&hashtags=LearnToCode, JavaScript" target="_blank")
i.fa.fa-twitter  
= phrase
else
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
h1 #{name}
script.
$('body').bind('keypress', controlEnterHandler);
script.
var challenge_Id = !{JSON.stringify(challengeId)};
var challenge_Name = !{JSON.stringify(name)};
var challengeType = !{JSON.stringify(challengeType)};
include ../partials/challenge-modals