2015-02-13 20:55:49 -05:00
|
|
|
|
extends ../layout-wide
|
|
|
|
|
block content
|
2015-11-24 15:01:22 -08: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 00:06:01 -07:00
|
|
|
|
link(rel='stylesheet', href='/css/ubuntu.css')
|
2015-12-04 18:24:09 -08:00
|
|
|
|
.row
|
2015-09-17 11:53:19 -07:00
|
|
|
|
.col-md-4.col-lg-3
|
2015-08-25 22:25:00 +01:00
|
|
|
|
.scroll-locker(id = "scroll-locker")
|
|
|
|
|
.innerMarginFix(style = "width: 99%;")
|
2016-01-09 22:12:32 -06:00
|
|
|
|
#testCreatePanel
|
2016-02-04 11:24:09 -05:00
|
|
|
|
h4.text-center.challenge-instructions-title= name
|
2016-01-02 15:50:28 +04:00
|
|
|
|
if (isCompleted)
|
|
|
|
|
|
|
|
|
|
|
i.ion-checkmark-circled.text-primary(title="Completed")
|
2016-01-09 22:12:32 -06:00
|
|
|
|
hr
|
2015-08-25 22:25:00 +01:00
|
|
|
|
.row
|
2015-07-02 21:32:20 +01:00
|
|
|
|
.col-xs-12
|
2016-02-04 11:24:09 -05:00
|
|
|
|
.challenge-instructions
|
2016-01-11 22:47:49 -08:00
|
|
|
|
for sentence in description
|
2016-02-18 12:31:22 -05:00
|
|
|
|
if (/blockquote|\<ol|h4|\<table/.test(sentence))
|
2015-12-22 13:27:17 -08:00
|
|
|
|
!=sentence
|
|
|
|
|
else
|
2016-01-14 23:06:06 -08:00
|
|
|
|
p.wrappable!= sentence
|
2016-01-13 14:25:49 +04:00
|
|
|
|
if (MDNlinks.length)
|
2015-08-25 22:25:00 +01:00
|
|
|
|
.negative-bottom-margin-30
|
|
|
|
|
#MDN-links
|
2016-01-14 23:06:06 -08:00
|
|
|
|
p Here are some helpful links:
|
2015-08-25 22:25:00 +01:00
|
|
|
|
for link, index in MDNlinks
|
2016-01-14 23:06:06 -08:00
|
|
|
|
ul: li: a(href="" + link, target="_blank") !{MDNkeys[index]}
|
2016-01-11 18:25:20 -06:00
|
|
|
|
.button-spacer
|
2015-08-25 22:25:00 +01:00
|
|
|
|
if (user)
|
|
|
|
|
form.form-horizontal(novalidate='novalidate', name='completedWithForm')
|
2016-01-14 23:06:06 -08:00
|
|
|
|
.form-group.text-center
|
2015-08-25 22:25:00 +01:00
|
|
|
|
.col-xs-12
|
|
|
|
|
// extra field to distract password tools like lastpass from injecting css into our username field
|
2016-01-14 23:06:06 -08:00
|
|
|
|
label.btn.btn-primary.btn-big.btn-block#submitButton Run tests (ctrl + enter)
|
2015-08-25 22:25:00 +01:00
|
|
|
|
.button-spacer
|
|
|
|
|
.btn-group.input-group.btn-group-justified
|
2016-01-14 23:06:06 -08:00
|
|
|
|
label.btn.btn-primary.btn-lg#trigger-reset-modal Reset
|
|
|
|
|
label.btn.btn-primary.btn-lg#challenge-help-btn Help
|
|
|
|
|
label.btn.btn-primary.btn-lg#trigger-issue-modal Bug
|
2015-09-09 19:51:24 -07: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 22:25:00 +01:00
|
|
|
|
.button-spacer
|
|
|
|
|
form.code
|
|
|
|
|
.form-group.codeMirrorView
|
|
|
|
|
textarea#codeOutput(style='display: none;')
|
|
|
|
|
br
|
2016-01-14 23:06:06 -08:00
|
|
|
|
#testSuite
|
2015-08-25 22:25:00 +01:00
|
|
|
|
br
|
2015-09-17 11:53:19 -07:00
|
|
|
|
.col-md-8.col-lg-9
|
2015-08-01 20:22:02 +01:00
|
|
|
|
.editorScrollDiv(style = "overflow-y: auto; overflow-x: hidden;")
|
2015-08-01 19:55:40 +01:00
|
|
|
|
#mainEditorPanel
|
|
|
|
|
form.code
|
|
|
|
|
.codeMirrorView
|
|
|
|
|
textarea#codeEditor(autofocus=true, style='display: none;')
|
2015-02-13 20:55:49 -05:00
|
|
|
|
#complete-courseware-dialog.modal(tabindex='-1')
|
2015-09-09 18:55:20 -07:00
|
|
|
|
.modal-dialog.animated.fadeIn.fast-animation
|
2015-02-13 20:55:49 -05:00
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header.challenge-list-header= compliment
|
2015-07-10 10:12:53 -07:00
|
|
|
|
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
|
2015-07-05 17:15:54 -07:00
|
|
|
|
.modal-body
|
2015-02-13 20:55:49 -05:00
|
|
|
|
.text-center
|
2015-08-26 15:17:19 -07:00
|
|
|
|
#checkmark-container.row
|
|
|
|
|
#challenge-checkmark.animated.zoomInDown.delay-half
|
|
|
|
|
span.completion-icon.ion-checkmark-circled.text-primary
|
|
|
|
|
.spacer
|
|
|
|
|
.row
|
|
|
|
|
if (user)
|
2015-09-09 18:59:56 -07:00
|
|
|
|
#submit-challenge.animated.fadeIn.btn.btn-lg.btn-primary.btn-block Submit and go to my next challenge (ctrl + enter)
|
2015-08-26 15:17:19 -07:00
|
|
|
|
else
|
2016-01-11 22:47:49 -08:00
|
|
|
|
a#next-challenge.animated.fadeIn.btn.btn-lg.btn-primary.btn-block(href="/challenges/next-challenge?id="+id) Go to my next challenge (ctrl + enter)
|
2015-05-28 14:29:45 -07:00
|
|
|
|
include ../partials/challenge-modals
|
2015-11-06 16:35:57 -08: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)};
|
|
|
|
|
|
2016-01-11 22:47:49 -08:00
|
|
|
|
common.challengeId = !{JSON.stringify(id)};
|
2015-11-06 16:35:57 -08:00
|
|
|
|
common.challengeName = !{JSON.stringify(name)};
|
|
|
|
|
common.challengeSeed = !{JSON.stringify(challengeSeed)};
|
|
|
|
|
common.challengeType = !{JSON.stringify(challengeType)};
|
|
|
|
|
common.dashedName = !{JSON.stringify(dashedName)};
|
2016-01-02 15:50:28 +04:00
|
|
|
|
common.isCompleted = !{JSON.stringify(isCompleted)};
|
2016-01-30 00:13:41 -08:00
|
|
|
|
common.gaName = !{JSON.stringify(gaName)};
|
2015-11-06 16:35:57 -08:00
|
|
|
|
|
2016-01-11 04:54:26 +04:00
|
|
|
|
common.username = !{JSON.stringify(user && user.username || '')};
|
|
|
|
|
|
2015-11-06 16:35:57 -08:00
|
|
|
|
include ../partials/challenge-footer
|
2015-07-05 17:15:54 -07:00
|
|
|
|
script.
|
2015-11-24 15:01:22 -08:00
|
|
|
|
common.init.push(function() {
|
|
|
|
|
common.editor.setOption('mode', 'javascript');
|
|
|
|
|
});
|