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-12-05 01:21:19 +00:00
|
|
|
|
.row
|
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%')
|
2016-01-09 21:32:52 +00:00
|
|
|
|
#testCreatePanel
|
2016-02-04 16:24:09 +00:00
|
|
|
|
h4.text-center.challenge-instructions-title= name
|
2016-01-02 11:50:28 +00:00
|
|
|
|
if (isCompleted)
|
|
|
|
|
|
|
|
|
|
|
i.ion-checkmark-circled.text-primary(title="Completed")
|
2016-01-10 04:12:32 +00:00
|
|
|
|
hr
|
2015-07-02 20:31:28 +00:00
|
|
|
|
.row
|
2015-01-29 05:14:26 +00:00
|
|
|
|
.col-xs-12
|
2016-02-04 16:24:09 +00:00
|
|
|
|
.challenge-instructions
|
2016-01-12 06:47:49 +00:00
|
|
|
|
for sentence in description
|
2015-12-25 00:00:44 +00:00
|
|
|
|
if (/blockquote|h4|table/.test(sentence))
|
2015-12-22 21:27:17 +00:00
|
|
|
|
!=sentence
|
|
|
|
|
else
|
2016-01-15 12:03:31 +00:00
|
|
|
|
p.wrappable!= sentence
|
2016-01-13 10:25:49 +00:00
|
|
|
|
if (MDNlinks.length)
|
2016-01-12 00:25:20 +00:00
|
|
|
|
#MDN-links
|
2016-01-15 12:03:31 +00:00
|
|
|
|
p Here are some helpful links:
|
2016-01-12 00:25:20 +00:00
|
|
|
|
for link, index in MDNlinks
|
2016-01-15 12:03:31 +00:00
|
|
|
|
ul: li: a(href=""+link, target="_blank") !{MDNkeys[index]}
|
2016-01-12 00:25:20 +00:00
|
|
|
|
.button-spacer
|
2015-07-02 20:31:28 +00:00
|
|
|
|
if (user)
|
2016-01-15 12:03:31 +00:00
|
|
|
|
label.btn.btn-primary.btn-block.btn-lg#submitButton
|
2016-01-15 07:06:06 +00:00
|
|
|
|
| Run tests (ctrl + enter)
|
2015-07-02 20:31:28 +00:00
|
|
|
|
.button-spacer
|
|
|
|
|
.btn-group.input-group.btn-group-justified
|
2016-01-15 12:03:31 +00:00
|
|
|
|
label.btn.btn-primary.btn-primary-ghost.btn-lg#trigger-reset-modal
|
2015-07-02 20:31:28 +00:00
|
|
|
|
| Reset
|
2016-01-15 12:03:31 +00:00
|
|
|
|
label.btn.btn-primary.btn-primary-ghost.btn-lg#challenge-help-btn
|
2015-07-02 20:31:28 +00:00
|
|
|
|
| Help
|
2016-01-15 12:03:31 +00:00
|
|
|
|
label.btn.btn-primary.btn-primary-ghost.btn-lg#trigger-issue-modal
|
2015-07-02 20:31:28 +00:00
|
|
|
|
| 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-07-02 20:31:28 +00:00
|
|
|
|
.button-spacer
|
2015-08-01 19:25:49 +00:00
|
|
|
|
form.code
|
|
|
|
|
.form-group.codeMirrorView
|
|
|
|
|
textarea#codeOutput(style='display: none;')
|
2015-07-02 20:31:28 +00:00
|
|
|
|
br
|
2016-01-15 12:03:31 +00:00
|
|
|
|
#testSuite
|
2015-07-02 20:31:28 +00:00
|
|
|
|
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-12-07 06:51:37 +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');")
|
|
|
|
|
i.fa.fa-twitter  
|
|
|
|
|
= phrase
|
2015-08-26 22:17:19 +00:00
|
|
|
|
else
|
2016-01-12 06:47:49 +00:00
|
|
|
|
a#next-challenge.btn.btn-lg.btn-primary.btn-block(href="/challenges/next-challenge?id="+id) Go to my next challenge (ctrl + enter)
|
2015-05-28 21:29:45 +00:00
|
|
|
|
include ../partials/challenge-modals
|
2015-11-07 00:35:57 +00:00
|
|
|
|
script(type="text/javascript").
|
2015-11-18 05:25:16 +00:00
|
|
|
|
var common = window.common = window.common || { init: [] };
|
2015-11-07 00:35:57 +00:00
|
|
|
|
|
|
|
|
|
common.tests = !{JSON.stringify(tests)};
|
|
|
|
|
common.head = !{JSON.stringify(head)};
|
|
|
|
|
common.tail = !{JSON.stringify(tail)};
|
2015-10-16 18:57:33 +00:00
|
|
|
|
|
2016-01-12 06:47:49 +00:00
|
|
|
|
common.challengeId = !{JSON.stringify(id)};
|
2015-11-07 00:35:57 +00:00
|
|
|
|
common.challengeName = !{JSON.stringify(name)};
|
|
|
|
|
common.challengeSeed = !{JSON.stringify(challengeSeed)};
|
|
|
|
|
common.challengeType = !{JSON.stringify(challengeType)};
|
|
|
|
|
common.dashedName = !{JSON.stringify(dashedName)};
|
2016-01-02 11:50:28 +00:00
|
|
|
|
common.isCompleted = !{JSON.stringify(isCompleted)};
|
2016-01-30 08:13:41 +00:00
|
|
|
|
common.gaName = !{JSON.stringify(gaName)};
|
2015-11-07 00:35:57 +00:00
|
|
|
|
|
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
|