add CTA buttons to anonymous challenge completion modal and selectively hide and show elements on the show view
This commit is contained in:
@ -47,6 +47,7 @@ exports.returnChallenge = function(req, res, next) {
|
||||
steps: c[challengeNumber].steps,
|
||||
number: challengeNumber,
|
||||
cc: req.user ? req.user.challengesHash : undefined,
|
||||
points: req.user ? req.user.points : undefined,
|
||||
verb: verbs[Math.floor(Math.random() * verbs.length)],
|
||||
phrase: phrases[Math.floor(Math.random() * phrases.length)],
|
||||
challenges: c
|
||||
|
@ -15,7 +15,7 @@ block content
|
||||
.btn.btn-primary.btn-big.btn-block.completed-challenge I've completed this challenge
|
||||
.ten-pixel-break
|
||||
.btn.btn-success.btn-large.btn-block.skip-challenge I want to skip this challenge for now
|
||||
- if (cc && cc[2] > 0)
|
||||
- if (points && points > 2 || !cc)
|
||||
.panel-footer.text-center
|
||||
span Need a break? Check out our:
|
||||
a(href="https://gitter.im/FreeCodeCamp/FreeCodeCamp", target="_blank") Chat Room
|
||||
@ -33,12 +33,14 @@ block content
|
||||
h1.animated.zoomInDown Nicely done!
|
||||
.animated.zoomInUp.delay-1
|
||||
span.landing-icon.ion-checkmark-circled.text-primary
|
||||
a.animated.fadeIn.delay-2.btn.btn-lg.btn-primary.btn-block.next-button(name='_csrf', value=_csrf, aria-hidden='true') Take me to my next challenge
|
||||
if (cc && cc[2] > 0)
|
||||
a.animated.fadeIn.delay-2.btn-twitter.btn.btn-lg.btn-info.btn-block(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20Free%20Code%20Camp%20Challenge%20%23#{number}:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{number}&hashtags=learntocode, javascript")
|
||||
i.fa.fa-twitter
|
||||
= phrase
|
||||
|
||||
- if (cc)
|
||||
a.animated.fadeIn.delay-2.btn.btn-lg.btn-primary.btn-block.next-button(name='_csrf', value=_csrf, aria-hidden='true') Take me to my next challenge
|
||||
- if (points && points > 2)
|
||||
a.animated.fadeIn.delay-2.btn-twitter.btn.btn-lg.btn-info.btn-block(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20Free%20Code%20Camp%20Challenge%20%23#{number}:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{number}&hashtags=learntocode, javascript")
|
||||
i.fa.fa-twitter
|
||||
= phrase
|
||||
- else
|
||||
a.animated.fadeIn.delay-2.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
|
||||
#skip-dialog.modal
|
||||
.modal-dialog.animated.zoomIn.fast-animation
|
||||
.modal-content
|
||||
|
@ -12,7 +12,7 @@
|
||||
.collapse.navbar-collapse
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
if !user
|
||||
a.btn.btn-primary.btn-nav.btn-sm(href='/login') Sign in
|
||||
a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in
|
||||
else
|
||||
li.dropdown(class=title=='Account Management'?'active':undefined)
|
||||
a.dropdown-toggle.text-center(href='#', data-toggle='dropdown')
|
||||
|
Reference in New Issue
Block a user