freeCodeCamp/server/views/challenges/showHTML.jade

106 lines
5.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

extends ../layout-wide
block content
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')
link(rel='stylesheet', href='/css/ubuntu.css')
.row
.col-md-3.col-lg-3
.scroll-locker(id = "scroll-locker")
.innerMarginFix(style = "width: 99%;")
.row
.col-xs-12
h3.text-center.negative-10= name
if (isCompleted)
|  
i.ion-checkmark-circled.text-primary(title="Completed")
hr
.bonfire-instructions
for sentence in description
p.wrappable.negative-10!= sentence
.negative-bottom-margin-30
.button-spacer
label.negative-10.btn.btn-primary.btn-lg.btn-block#submitButton
i.fa.fa-play
|   Run tests (ctrl + enter)
.button-spacer
.btn-group.input-group.btn-group-justified
label.btn.btn-primary.btn-primary-ghost#trigger-reset-modal
i.fa.fa-refresh
|   Reset
label.btn.btn-primary.btn-primary-ghost.hidden-sm.hidden-md.hidden-lg
a(href='//gitter.im/freecodecamp/help')
i.fa.fa-medkit
|   Help
label.btn.btn-primary.btn-primary-ghost.hidden-xs#challenge-help-btn
i.fa.fa-medkit
|   Help
label.btn.btn-primary.btn-primary-ghost#trigger-issue-modal
i.fa.fa-bug
|   Bug
script.
var userLoggedIn = true;
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;
.button-spacer
#testSuite
br
.col-md-5.col-lg-6
.editorScrollDiv(style = "overflow-y: auto; overflow-x: hidden;")
#mainEditorPanel
form.code
.codeMirrorView
textarea#codeEditor(autofocus=true, style='display: none;')
.col-md-4.col-lg-3
.hidden-xs.hidden-sm
img.iphone-position.iframe-scroll(src="https://s3.amazonaws.com/freecodecamp/iphone6-frame.png", style = "z-index: -2;")
iframe.iphone.iframe-scroll#preview
.spacer
#complete-courseware-dialog.modal(tabindex='-1')
.modal-dialog.animated.fadeIn.fast-animation
.modal-content
.modal-header.challenge-list-header
= compliment
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
.text-center
#checkmark-container.row
#challenge-checkmark.animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary
.spacer
if(user)
#submit-challenge.animated.fadeIn.btn.btn-lg.btn-primary.btn-block Submit and go to my next challenge (ctrl + enter)
else
a#next-challenge.btn.btn-lg.btn-primary.btn-block(href="/challenges/next-challenge?id="+id) Go to my next challenge (ctrl + enter)
include ../partials/challenge-modals
script(type="text/javascript").
$('#next-courseware-button').attr('disabled', 'disabled');
var common = window.common || { init: [] };
common.tests = !{JSON.stringify(tests)};
common.head = !{JSON.stringify(head)};
common.tail = !{JSON.stringify(tail)};
common.challengeId = !{JSON.stringify(id)};
common.challengeName = !{JSON.stringify(name)};
common.challengeSeed = !{JSON.stringify(challengeSeed)};
common.challengeType = !{JSON.stringify(challengeType)};
common.dashedName = !{JSON.stringify(dashedName)};
common.isCompleted = !{JSON.stringify(isCompleted)};
common.init.push(function() {
common.editor.setOption('lint', false);
common.editor.setOption('mode', 'text/html');
});
include ../partials/challenge-footer
script.
document.addEventListener('gitter-sidecar-ready', function(e) {
if (window.main) {
window.main.chat.createHelpChat('freecodecamp/help', '#challenge-help-btn');
}
});