2015-01-26 11:02:22 -08:00
|
|
|
|
extends ../layout-wide
|
2015-01-22 11:59:55 -05:00
|
|
|
|
block content
|
2015-01-22 13:20:46 -05:00
|
|
|
|
|
2015-05-06 14:06:10 -04:00
|
|
|
|
script(type='text/javascript', src='/js/lib/codemirror/lib/codemirror.js')
|
|
|
|
|
script(type='text/javascript', src='/js/lib/codemirror/addon/edit/closebrackets.js')
|
|
|
|
|
script(type='text/javascript', src='/js/lib/codemirror/addon/edit/matchbrackets.js')
|
|
|
|
|
script(type='text/javascript', src='/js/lib/codemirror/addon/lint/lint.js')
|
|
|
|
|
script(type='text/javascript', src='/js/lib/codemirror/addon/lint/javascript-lint.js')
|
2015-05-11 23:40:04 -07:00
|
|
|
|
script(type='text/javascript', src='/bower_components/jshint/dist/jshint.js')
|
2015-05-06 14:06:10 -04:00
|
|
|
|
script(type='text/javascript', src='/js/lib/chai/chai.js')
|
2015-01-22 13:20:46 -05:00
|
|
|
|
link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
|
|
|
|
|
link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
|
|
|
|
|
link(rel='stylesheet', href='/js/lib/codemirror/theme/monokai.css')
|
|
|
|
|
link(rel="stylesheet", href="http://fonts.googleapis.com/css?family=Ubuntu+Mono")
|
2015-05-06 14:06:10 -04:00
|
|
|
|
script(type='text/javascript', src='/js/lib/codemirror/mode/javascript/javascript.js')
|
|
|
|
|
script(type='text/javascript', src='/js/lib/jailed/jailed.js')
|
2015-05-20 22:31:20 -04:00
|
|
|
|
script(type='text/javascript', src='/js/lib/coursewares/sandbox.js')
|
2015-01-22 15:49:16 -05:00
|
|
|
|
|
2015-05-25 17:27:27 -04:00
|
|
|
|
.row(ng-controller="pairedWithController")
|
2015-01-27 20:12:51 -05:00
|
|
|
|
.col-xs-12.col-sm-12.col-md-4.bonfire-top
|
2015-01-27 15:05:51 -08:00
|
|
|
|
#testCreatePanel
|
2015-04-05 18:37:58 -07:00
|
|
|
|
h1#bonfire-name.text-center= name
|
2015-02-18 21:20:44 -08:00
|
|
|
|
h2.text-center
|
2015-03-08 01:36:09 -08:00
|
|
|
|
.bonfire-flames Difficulty: 
|
2015-02-18 21:20:44 -08:00
|
|
|
|
if (difficulty == "0")
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
if (difficulty == "1")
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
if (difficulty == "2")
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
if (difficulty == "3")
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
if (difficulty == "4")
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame-outline
|
|
|
|
|
if (difficulty == "5")
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
|
|
|
|
i.ion-ios-flame
|
2015-01-27 20:12:51 -05:00
|
|
|
|
.well
|
2015-01-28 21:14:26 -08:00
|
|
|
|
.row
|
|
|
|
|
.col-xs-12
|
|
|
|
|
.bonfire-instructions
|
2015-05-26 09:46:23 -07:00
|
|
|
|
p.wrappable= brief
|
2015-01-28 21:14:26 -08:00
|
|
|
|
#brief-instructions
|
2015-02-22 17:32:30 -08:00
|
|
|
|
#more-info.btn.btn-primary.btn-block.btn-primary-ghost
|
|
|
|
|
span.ion-arrow-down-b
|
|
|
|
|
| More information
|
2015-01-28 21:14:26 -08:00
|
|
|
|
#long-instructions.row.hide
|
|
|
|
|
.col-xs-12
|
|
|
|
|
for sentence in details
|
2015-05-25 20:28:34 -07:00
|
|
|
|
p.wrappable!= sentence
|
2015-03-23 23:57:44 -04:00
|
|
|
|
#MDN-links
|
2015-03-31 10:00:30 -07:00
|
|
|
|
p Here are some helpful links:
|
2015-03-23 23:57:44 -04:00
|
|
|
|
for link, index in MDNlinks
|
|
|
|
|
ul: li: a(href=""+link, target="_blank") !{MDNkeys[index]}
|
2015-02-22 17:32:30 -08:00
|
|
|
|
#less-info.btn.btn-primary.btn-block.btn-primary-ghost
|
|
|
|
|
span.ion-arrow-up-b
|
|
|
|
|
| Less information
|
2015-03-29 21:41:59 +09:00
|
|
|
|
|
2015-05-25 17:27:27 -04:00
|
|
|
|
if (user)
|
|
|
|
|
form.form-horizontal(novalidate='novalidate', name='completedWithForm')
|
|
|
|
|
.form-group.text-center
|
2015-05-25 17:52:00 -07:00
|
|
|
|
.col-xs-12
|
2015-05-25 17:27:27 -04:00
|
|
|
|
// extra field to distract password tools like lastpass from injecting css into our username field
|
|
|
|
|
input.form-control(ng-show="false")
|
2015-05-25 17:52:00 -07:00
|
|
|
|
input.form-control#completed-with(name="existingUser", placeholder="Your pair's username if pairing", existing-username='', ng-model="existingUser")
|
|
|
|
|
.col-xs-12(ng-cloak, ng-show="completedWithForm.$error.exists && !completedWithForm.existingUser.$pristine && existingUser.length > 0")
|
2015-05-25 17:27:27 -04:00
|
|
|
|
alert(type='danger')
|
|
|
|
|
span.ion-close-circled
|
|
|
|
|
| Username not found
|
2015-01-27 20:12:51 -05:00
|
|
|
|
#submitButton.btn.btn-primary.btn-big.btn-block Run code (ctrl + enter)
|
2015-05-26 02:36:29 -07:00
|
|
|
|
if (user && user.sentSlackInvite)
|
2015-05-25 18:00:45 -07:00
|
|
|
|
.button-spacer
|
|
|
|
|
.btn-group.input-group.btn-group-justified
|
2015-05-28 14:29:45 -07:00
|
|
|
|
label.btn.btn-success#trigger-help-modal
|
2015-05-25 18:00:45 -07:00
|
|
|
|
i.fa.fa-medkit
|
2015-05-28 14:29:45 -07:00
|
|
|
|
| Help
|
|
|
|
|
label.btn.btn-success#trigger-pair-modal
|
2015-05-25 18:00:45 -07:00
|
|
|
|
i.fa.fa-user-plus
|
|
|
|
|
| Pair
|
2015-05-28 14:29:45 -07:00
|
|
|
|
label.btn.btn-success#trigger-issue-modal
|
2015-05-25 18:00:45 -07:00
|
|
|
|
i.fa.fa-bug
|
|
|
|
|
| Bug
|
2015-05-23 16:48:55 -07:00
|
|
|
|
.button-spacer
|
2015-01-27 20:12:51 -05:00
|
|
|
|
form.code
|
|
|
|
|
.form-group.codeMirrorView
|
2015-03-09 23:03:17 -07:00
|
|
|
|
textarea#codeOutput(style='display: none;')
|
2015-01-27 20:12:51 -05:00
|
|
|
|
br
|
|
|
|
|
#testSuite
|
|
|
|
|
br
|
|
|
|
|
script(type="text/javascript").
|
|
|
|
|
var tests = !{JSON.stringify(tests)};
|
|
|
|
|
var challengeSeed = !{JSON.stringify(challengeSeed)};
|
2015-05-20 21:50:31 -04:00
|
|
|
|
var challenge_Id = !{JSON.stringify(challengeId)};
|
|
|
|
|
var challenge_Name = !{JSON.stringify(name)};
|
2015-03-27 14:36:17 -07:00
|
|
|
|
var started = Math.floor(Date.now());
|
2015-05-20 21:50:31 -04:00
|
|
|
|
var challengeType = !{JSON.stringify(challengeType)};
|
2015-02-21 11:38:03 +09:00
|
|
|
|
var _ = R;
|
2015-02-23 08:01:55 +09:00
|
|
|
|
var dashed = !{JSON.stringify(dashedName)};
|
2015-03-23 23:55:24 -04:00
|
|
|
|
|
2015-01-27 20:12:51 -05:00
|
|
|
|
.col-xs-12.col-sm-12.col-md-8
|
2015-01-27 15:05:51 -08:00
|
|
|
|
#mainEditorPanel
|
|
|
|
|
form.code
|
|
|
|
|
.form-group.codeMirrorView
|
2015-03-09 17:38:21 -05:00
|
|
|
|
textarea#codeEditor(autofocus=true, style='display: none;')
|
2015-05-26 10:41:50 -04:00
|
|
|
|
script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.4.js')
|
2015-01-25 09:41:07 -08:00
|
|
|
|
|
2015-05-20 21:50:31 -04:00
|
|
|
|
#complete-courseware-dialog.modal(tabindex='-1')
|
2015-01-25 09:06:30 -08:00
|
|
|
|
.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') ×
|
2015-05-25 17:27:27 -04:00
|
|
|
|
.modal-body
|
2015-01-25 09:06:30 -08:00
|
|
|
|
.text-center
|
|
|
|
|
.animated.zoomInDown.delay-half
|
2015-01-30 17:42:17 -08:00
|
|
|
|
span.completion-icon.ion-checkmark-circled.text-primary
|
2015-05-28 16:59:25 -07:00
|
|
|
|
if (user)
|
2015-01-25 09:06:30 -08:00
|
|
|
|
|
2015-05-25 17:27:27 -04:00
|
|
|
|
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) Go to my next challenge (ctrl + enter)
|
2015-01-24 03:11:01 -05:00
|
|
|
|
|
|
|
|
|
|
2015-05-28 16:59:25 -07:00
|
|
|
|
if (user.progressTimestamps.length > 2)
|
2015-05-28 14:29:45 -07:00
|
|
|
|
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(target="_blank", 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")
|
2015-03-08 01:36:09 -08:00
|
|
|
|
i.fa.fa-twitter  
|
2015-01-25 09:06:30 -08:00
|
|
|
|
= phrase
|
2015-05-28 16:59:25 -07:00
|
|
|
|
else
|
2015-01-25 09:06:30 -08:00
|
|
|
|
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
|
2015-05-28 14:29:45 -07:00
|
|
|
|
include ../partials/challenge-modals
|
2015-02-23 08:01:55 +09:00
|
|
|
|
script.
|
2015-03-24 01:24:06 -04:00
|
|
|
|
var MDNlinks = !{JSON.stringify(MDNlinks)};
|
|
|
|
|
if (!MDNlinks.length) {
|
|
|
|
|
$('#MDN-links').addClass('collapse');
|
|
|
|
|
}
|
2015-05-28 14:29:45 -07:00
|
|
|
|
|