conditional logic showing links to forum and chatroom

This commit is contained in:
Michael Q Larson
2014-12-21 17:52:17 -08:00
parent 46f217f548
commit 14174ee453
2 changed files with 19 additions and 8 deletions

View File

@ -15,14 +15,15 @@ block content
.btn.btn-primary.btn-big.btn-block.completed-challenge I've completed this challenge .btn.btn-primary.btn-big.btn-block.completed-challenge I've completed this challenge
.ten-pixel-break .ten-pixel-break
.btn.btn-success.btn-large.btn-block.skip-challenge I want to skip this challenge for now .btn.btn-success.btn-large.btn-block.skip-challenge I want to skip this challenge for now
.panel-footer.text-center - if (cc[2] > 0)
span Need a break? Check out our:  .panel-footer.text-center
a(href="https://gitter.im/FreeCodeCamp/FreeCodeCamp", target="_blank") Chat Room span Need a break? Check out our: 
|  ,  a(href="https://gitter.im/FreeCodeCamp/FreeCodeCamp", target="_blank") Chat Room
a(href="http://blog.freecodecamp.com", target="_blank") Blog |  , 
|  , or  a(href="http://blog.freecodecamp.com", target="_blank") Blog
a(href="http://forum.freecodecamp.com", target="_blank") Forum |  , or 
| . a(href="http://forum.freecodecamp.com", target="_blank") Forum
| .
#complete-dialog.modal #complete-dialog.modal
.modal-dialog.animated.zoomIn.fast-animation .modal-dialog.animated.zoomIn.fast-animation
.modal-content .modal-content

View File

@ -32,11 +32,21 @@
a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp', target='_blank') a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp', target='_blank')
span.ion-coffee span.ion-coffee
| Chat Room | Chat Room
- else
li.hamburger.disabled
a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp', target='_blank')
span.ion-coffee
| Chat Room (do Challenge 1 first)
- if (cc[2] > 0) - if (cc[2] > 0)
li.hamburger li.hamburger
a(href='http://forum.freecodecamp.com/', target='_blank') a(href='http://forum.freecodecamp.com/', target='_blank')
span.ion-planet span.ion-planet
| Forum | Forum
- else
li.hamburger.disabled
a(href='http://forum.freecodecamp.com/', target='_blank')
span.ion-planet
| Forum (do Challenge 2 first)
li.hamburger li.hamburger
a(href='/account') a(href='/account')
span.ion-person span.ion-person