subtle completed challenge button for courseware and add completionMessage to coursewares

This commit is contained in:
Michael Q Larson
2015-02-12 16:48:35 -08:00
parent 93f4f6aa19
commit f8f0c3454a
5 changed files with 231 additions and 118 deletions

View File

@@ -39,6 +39,15 @@ block content
button#less-info.btn.btn-info
span.ion-help-circled
| Less information
- if (cc)
a.btn.btn-primary.btn-lg.btn-block#next-courseware-button Go to my next challenge (ctrl + enter)
script.
var userLoggedIn = true;
- else
a.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
script.
var userLoggedIn = false;
div.hidden
#submitButton.btn.btn-primary.btn-big.btn-block Run code (ctrl + enter)
br
@@ -49,6 +58,7 @@ block content
#testSuite
br
script(type="text/javascript").
$('#next-courseware-button').attr('disabled', 'disabled');
var tests = !{JSON.stringify(tests)};
var challengeSeed = !{JSON.stringify(challengeSeed)};
var passedCoursewareHash = !{JSON.stringify(coursewareHash)};
@@ -60,7 +70,7 @@ block content
form.code
.form-group.codeMirrorView
textarea#codeEditor(autofocus=true)
script(src='/js/lib/coursewares/coursewaresFramework_v0.1.0.js')
script(src='/js/lib/coursewares/coursewaresFramework_v0.1.1.js')
.col-md-4.col-lg-3
.hidden-xs.hidden-sm
img.iphone-position(src="https://s3.amazonaws.com/freecodecamp/iphone6-frame.png")
@@ -77,11 +87,4 @@ block content
.text-center
.animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary
- if (cc)
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block.next-courseware-button(name='_csrf', value=_csrf, aria-hidden='true') Go to my next challenge (ctrl + enter)
- if (points && points > 2)
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20Challenge%20%23#{number}:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{number}&hashtags=LearnToCode, JavaScript" target="_blank")
i.fa.fa-twitter  
= phrase
- else
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress