2015-01-26 19:02:22 +00:00
|
|
|
|
extends ../layout-wide
|
2015-01-22 16:59:55 +00:00
|
|
|
|
block content
|
2015-11-13 19:10:23 +00:00
|
|
|
|
link(rel='stylesheet', href='/bower_components/CodeMirror/lib/codemirror.css')
|
|
|
|
|
link(rel='stylesheet', href='/bower_components/CodeMirror/addon/lint/lint.css')
|
|
|
|
|
link(rel='stylesheet', href='/bower_components/CodeMirror/theme/monokai.css')
|
2015-09-17 07:06:01 +00:00
|
|
|
|
link(rel='stylesheet', href='/css/ubuntu.css')
|
2015-01-22 20:49:16 +00:00
|
|
|
|
|
2015-05-25 21:27:27 +00:00
|
|
|
|
.row(ng-controller="pairedWithController")
|
2015-09-17 18:53:19 +00:00
|
|
|
|
.col-md-4.col-lg-3
|
2015-08-25 21:25:00 +00:00
|
|
|
|
.scroll-locker(id = "scroll-locker")
|
2015-08-25 21:49:19 +00:00
|
|
|
|
.innerMarginFix(style=' width: 99%')
|
2015-08-25 21:25:00 +00:00
|
|
|
|
#testCreatePanel.well
|
|
|
|
|
h3.text-center.negative-10= name
|
|
|
|
|
.row
|
2015-08-21 23:59:21 +00:00
|
|
|
|
.col-xs-12
|
2015-08-25 21:25:00 +00:00
|
|
|
|
.bonfire-instructions
|
|
|
|
|
for sentence in details
|
|
|
|
|
p.wrappable.negative-10!= sentence
|
2015-09-14 07:02:42 +00:00
|
|
|
|
.negative-30-bottom
|
2015-08-25 21:25:00 +00:00
|
|
|
|
#MDN-links
|
|
|
|
|
p.negative-10 Here are some helpful links:
|
|
|
|
|
for link, index in MDNlinks
|
|
|
|
|
.negative-10
|
|
|
|
|
ul: li: a(href=""+link, target="_blank") !{MDNkeys[index]}
|
|
|
|
|
|
|
|
|
|
if (user)
|
|
|
|
|
form.form-horizontal(novalidate='novalidate', name='completedWithForm')
|
|
|
|
|
.form-group.text-center.negative-10
|
|
|
|
|
.col-xs-12
|
|
|
|
|
// extra field to distract password tools like lastpass from injecting css into our username field
|
|
|
|
|
input.form-control(ng-show="false")
|
|
|
|
|
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")
|
|
|
|
|
alert(type='danger')
|
|
|
|
|
span.ion-close-circled
|
|
|
|
|
| Username not found
|
2015-09-10 02:51:24 +00:00
|
|
|
|
label.negative-10.btn.btn-primary.btn-block.btn-lg#submitButton
|
2015-08-25 21:25:00 +00:00
|
|
|
|
i.fa.fa-play
|
2015-08-29 16:30:47 +00:00
|
|
|
|
| Run tests (ctrl + enter)
|
2015-08-25 21:25:00 +00:00
|
|
|
|
.button-spacer
|
|
|
|
|
.btn-group.input-group.btn-group-justified
|
|
|
|
|
label.btn.btn-success#trigger-reset-modal
|
|
|
|
|
i.fa.fa-refresh
|
|
|
|
|
| Reset
|
2015-10-16 18:57:33 +00:00
|
|
|
|
label.btn.btn-success#challenge-help-btn
|
2015-08-25 21:25:00 +00:00
|
|
|
|
i.fa.fa-medkit
|
|
|
|
|
| Help
|
|
|
|
|
label.btn.btn-success#trigger-issue-modal
|
|
|
|
|
i.fa.fa-bug
|
|
|
|
|
| Bug
|
2015-09-10 02:51:24 +00:00
|
|
|
|
if (!user)
|
|
|
|
|
.button-spacer
|
|
|
|
|
a.btn.signup-btn.btn-block.btn-block(href='/login') Sign in so you can save your progress
|
|
|
|
|
script.
|
|
|
|
|
var userLoggedIn = false;
|
2015-08-25 21:25:00 +00:00
|
|
|
|
.button-spacer
|
|
|
|
|
form.code
|
|
|
|
|
.form-group.codeMirrorView
|
|
|
|
|
textarea#codeOutput(style='display: none;')
|
|
|
|
|
br
|
|
|
|
|
#testSuite.negative-10
|
|
|
|
|
br
|
2015-03-24 03:55:24 +00:00
|
|
|
|
|
2015-09-17 18:53:19 +00:00
|
|
|
|
.col-md-8.col-lg-9
|
2015-08-01 19:25:49 +00:00
|
|
|
|
.editorScrollDiv(style = "overflow-y: auto; overflow-x: hidden;")
|
|
|
|
|
#mainEditorPanel
|
|
|
|
|
form.code
|
|
|
|
|
.form-group.codeMirrorView
|
|
|
|
|
textarea#codeEditor(autofocus=true, style='display: none;')
|
2015-11-07 00:35:57 +00:00
|
|
|
|
|
2015-01-25 17:41:07 +00:00
|
|
|
|
|
2015-05-21 01:50:31 +00:00
|
|
|
|
#complete-courseware-dialog.modal(tabindex='-1')
|
2015-09-10 01:55:20 +00:00
|
|
|
|
.modal-dialog.animated.fadeIn.fast-animation
|
2015-01-25 17:06:30 +00:00
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header.challenge-list-header= compliment
|
|
|
|
|
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
|
2015-05-25 21:27:27 +00:00
|
|
|
|
.modal-body
|
2015-01-25 17:06:30 +00:00
|
|
|
|
.text-center
|
2015-08-26 22:17:19 +00:00
|
|
|
|
#checkmark-container.row
|
|
|
|
|
#challenge-checkmark.animated.zoomInDown.delay-half
|
|
|
|
|
span.completion-icon.ion-checkmark-circled.text-primary
|
|
|
|
|
.spacer
|
|
|
|
|
.row
|
|
|
|
|
if (user)
|
2015-09-10 01:59:56 +00:00
|
|
|
|
#submit-challenge.animated.fadeIn.btn.btn-lg.btn-primary.btn-block Submit and go to my next challenge (ctrl + enter)
|
2015-10-25 08:30:44 +00:00
|
|
|
|
a.animated.fadeIn.btn.btn-lg.btn-danger.btn-block#gist-share Share your solution as a GitHub gist
|
2015-08-26 22:17:19 +00:00
|
|
|
|
if (user.progressTimestamps.length > 2)
|
2015-10-15 04:26:22 +00:00
|
|
|
|
a.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", onclick="ga('send', 'event', 'twitter', 'share', 'challenge completion share');")
|
2015-08-26 22:17:19 +00:00
|
|
|
|
i.fa.fa-twitter  
|
|
|
|
|
= phrase
|
|
|
|
|
else
|
2015-11-09 19:15:14 +00:00
|
|
|
|
a#next-challenge.btn.btn-lg.btn-primary.btn-block(href="/challenges/next-challenge?id="+challengeId) Go to my next challenge (ctrl + enter)
|
2015-10-25 08:30:44 +00:00
|
|
|
|
a.btn.btn-lg.btn-danger.btn-block#gist-share Share your solution as a GitHub gist
|
2015-06-20 00:26:04 +00:00
|
|
|
|
#reset-modal.modal(tabindex='-1')
|
|
|
|
|
.modal-dialog.animated.fadeInUp.fast-animation
|
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header.challenge-list-header Clear your code?
|
|
|
|
|
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
|
|
|
|
|
.modal-body
|
|
|
|
|
h3 This will restore your code editor to its original state.
|
|
|
|
|
a.btn.btn-lg.btn-info.btn-block#reset-button(href='#', data-dismiss='modal', aria-hidden='true') Clear my code
|
|
|
|
|
a.btn.btn-lg.btn-primary.btn-block(href='#', data-dismiss='modal', aria-hidden='true') Cancel
|
2015-05-28 21:29:45 +00:00
|
|
|
|
include ../partials/challenge-modals
|
2015-11-07 00:35:57 +00:00
|
|
|
|
script(type="text/javascript").
|
|
|
|
|
var common = window.common = { init: [] };
|
|
|
|
|
|
|
|
|
|
common.tests = !{JSON.stringify(tests)};
|
|
|
|
|
common.head = !{JSON.stringify(head)};
|
|
|
|
|
common.tail = !{JSON.stringify(tail)};
|
2015-10-16 18:57:33 +00:00
|
|
|
|
|
2015-11-07 00:35:57 +00:00
|
|
|
|
common.challengeId = !{JSON.stringify(challengeId)};
|
|
|
|
|
common.challengeName = !{JSON.stringify(name)};
|
|
|
|
|
common.challengeSeed = !{JSON.stringify(challengeSeed)};
|
|
|
|
|
common.challengeType = !{JSON.stringify(challengeType)};
|
|
|
|
|
common.dashedName = !{JSON.stringify(dashedName)};
|
|
|
|
|
|
|
|
|
|
common.started = Math.floor(Date.now());
|
2015-11-07 01:48:17 +00:00
|
|
|
|
common.username = !{JSON.stringify(user && user.username || '')};
|
2015-11-07 00:35:57 +00:00
|
|
|
|
|
|
|
|
|
include ../partials/challenge-footer
|
|
|
|
|
script.
|
2015-10-16 18:57:33 +00:00
|
|
|
|
document.addEventListener('gitter-sidecar-ready', function(e) {
|
|
|
|
|
if (window.main) {
|
2015-10-16 23:10:45 +00:00
|
|
|
|
window.main.chat.createHelpChat('freecodecamp/helpbonfires', '#challenge-help-btn', 'Bonfires Help');
|
2015-10-16 18:57:33 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
2015-10-08 23:42:24 +00:00
|
|
|
|
|
2015-11-07 20:54:58 +00:00
|
|
|
|
if (!!{JSON.stringify(MDNlinks.length)}) {
|
2015-10-08 23:42:24 +00:00
|
|
|
|
$('#MDN-links').addClass('collapse');
|
|
|
|
|
}
|