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
script(src='/js/lib/codemirror/lib/codemirror.js')
script(src='/js/lib/codemirror/addon/edit/closebrackets.js')
script(src='/js/lib/codemirror/addon/edit/matchbrackets.js')
script(src='/js/lib/codemirror/addon/lint/lint.js')
script(src='/js/lib/codemirror/addon/lint/javascript-lint.js')
script(src='//ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js')
script(src='/js/lib/chai/chai.js')
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")
script(src='/js/lib/codemirror/mode/javascript/javascript.js')
script(src='/js/lib/jailed/jailed.js')
script(src='/js/lib/bonfire/bonfireInit.js')
2015-02-21 11:38:03 +09:00
script(src="https://cdn.jsdelivr.net/ramda/0.10.0/ramda.min.js")
2015-01-22 15:49:16 -05:00
2015-01-27 15:05:51 -08:00
.row
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-02-04 13:04:51 -08:00
h1.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
p= brief
#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
p!= sentence
2015-03-23 23:57:44 -04:00
#MDN-links
h4 Here are some helpful links.
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-23 23:55:24 -04:00
2015-01-27 20:12:51 -05:00
#submitButton.btn.btn-primary.btn-big.btn-block Run code (ctrl + enter)
2015-03-22 18:22:07 -07:00
#showAllButton.btn.btn-info.btn-big.btn-block Show all bonfires
2015-01-27 20:12:51 -05:00
br
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)};
var passedBonfireHash = !{JSON.stringify(bonfireHash)};
2015-02-07 21:11:26 -08:00
var challengeName = !{JSON.stringify(name)};
2015-03-27 14:36:17 -07:00
var started = Math.floor(Date.now());
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-02-13 20:55:49 -05:00
script(src='/js/lib/bonfire/bonfireFramework_v0.1.2.js')
2015-01-25 09:41:07 -08:00
2015-01-24 03:11:01 -05:00
2015-01-24 04:14:41 -05:00
2015-01-25 09:06:30 -08:00
#complete-bonfire-dialog.modal(tabindex='-1')
.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') ×
.modal-body(ng-controller="pairedWithController")
.text-center
.animated.zoomInDown.delay-half
2015-01-30 17:42:17 -08:00
span.completion-icon.ion-checkmark-circled.text-primary
2015-03-27 14:36:17 -07:00
- if (user)
2015-01-25 09:06:30 -08:00
form.form-horizontal(novalidate='novalidate', name='completedWithForm')
.form-group.text-center
2015-01-25 09:41:07 -08:00
.col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2.animated.fadeIn
// 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="If you paired, enter your pair's username here", existing-username='', ng-model="existingUser", autofocus)
2015-01-30 12:06:21 -08:00
.col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2(ng-cloak, ng-show="completedWithForm.$error.exists && !completedWithForm.existingUser.$pristine && existingUser.length > 0")
2015-01-25 09:06:30 -08:00
alert(type='danger')
span.ion-close-circled
| Username not found
2015-02-06 16:55:48 -08:00
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block.next-bonfire-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid && existingUser.length > 0') Go to my next bonfire (ctrl + enter)
2015-01-24 03:11:01 -05:00
2015-03-27 14:36:17 -07:00
- if (user.progressTimestamps.length > 2)
2015-02-23 08:01:55 +09:00
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(target="_blank")
2015-03-08 01:36:09 -08:00
i.fa.fa-twitter  
2015-01-25 09:06:30 -08:00
= phrase
- else
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
2015-01-24 03:11:01 -05:00
2015-02-22 16:46:55 +09:00
#all-bonfires-dialog.modal(tabindex='-1')
.modal-dialog.animated.fadeInUp.fast-animation
.modal-content
.modal-header.all-list-header Bonfires
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body
2015-03-29 19:19:19 +09:00
include ../partials/bonfires
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');
}